-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
3,267 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/'; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.