Skip to content

Commit

Permalink
deleted unnecessary files
Browse files Browse the repository at this point in the history
  • Loading branch information
adeshrd committed Nov 29, 2014
1 parent 217520c commit 4765ffa
Show file tree
Hide file tree
Showing 49 changed files with 3,267 additions and 3 deletions.
18 changes: 15 additions & 3 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
codopm
======
CODOPM

Codoforum PM plugin

CODOPM is a simple and beautiful private messaging system developed for Joomla .


Requirements:
PDO-MYSQL must be installed.


Installation:

1. Extract the codopm zip file
2. Copy the extracted folder to sites/default/plugins
3. Open Codoforum backend->plugins
4. Install and enable
41 changes: 41 additions & 0 deletions adapters/Codoforum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

/*
* @CODOLICENSE
*/

define('_JEXEC', 'JOOMLA_ADAPTER');

class Adapter {

public function __construct() {

}

public function setup_tables() {

codopm::$table['mail_column'] = 'mail';
codopm::$upload_path = PLUGIN_DIR . "codopm/";
}

public function get_user() {

return \CODOF\User\User::get();
}

public function add_js($js) {

add_js($js, array('type' => 'defer'));
}

public function add_css($css) {

add_css($css);
}

public function get_abs_path() {

return PLUGIN_PATH . 'codopm/';
}

}
53 changes: 53 additions & 0 deletions adapters/Joomla.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php


/*
* @CODOLICENSE
*/

//define('_JEXEC', 'JOOMLA_ADAPTER');

class Adapter {

private $doc;

public function __construct() {

$this->doc = JFactory::getDocument();

}

public function setup_tables() {

codopm::$table['mail_column'] = 'email';
}

public function get_user() {

return JFactory::getUser();
}

public function add_js($js) {

$this->doc->addScript($js);
}

public function add_css($css) {

$this->doc->addStyleSheet($css);
}

public function get_abs_path() {

if (@$_SERVER["HTTPS"] == "on") {
$protocol = "https://";
} else {
$protocol = "http://";
}

$sn = $_SERVER['SCRIPT_NAME'];
$sn = str_replace("index.php", "components/com_codopm/", $sn);

return $protocol . $_SERVER['HTTP_HOST'] . $sn;
}
}
59 changes: 59 additions & 0 deletions arg.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php

/*
* @CODOLICENSE
*/

defined('_JEXEC') or die;

class codopm {

public static $secret = "DEd56g3@34azFfGv";
public static $path = "";
public static $xhash = "";
public static $db_prefix = "";
public static $db = null;
public static $config;
public static $language = "english";
public static $sef_q = "";
public static $req_path;
public static $table = array();
public static $upload_path;
public static $profile_id;
public static $profile_path;
public static $profile_name;

protected static $trans = false;

public static function get_lang() {

//$codopm_trans is declared in all language files
//For backward compatibility purposes always include english.php
require 'lang/english.php';

if (self::$language != "english") {

//Overwrite english with the new language
require 'lang/' . self::$language . '.php';
}

return $codopm_trans;
}

public static function t($index) {

if (!self::$trans) {

self::$trans = self::get_lang();
}

if (isset(self::$trans[$index])) {

echo self::$trans[$index];
} else {

echo $index; //echo passed if not found
}
}

}
Loading

0 comments on commit 4765ffa

Please sign in to comment.