public function __construct() { global $CMS_INSTALL_PAGE, $CMS_PHAR_INSTALL; if (isset($CMS_INSTALL_PAGE) || isset($CMS_PHAR_INSTALL)) { return; } parent::__construct(); $fn = __DIR__ . '/class.cgsimple.php'; require_once $fn; $smarty = cmsms()->GetSmarty(); if (!$smarty) { return; } $cgsimple = new cgsimple(); $smarty->assign('cgsimple', $cgsimple); $smarty->registerClass('cgsimple', 'cgsimple'); $smarty->register_function('module_action_link', 'module_action_link'); $smarty->register_function('module_action_url', 'module_action_url'); $smarty->register_function('cgrepeat', 'smarty_function_cgrepeat'); $smarty->register_function('session_put', 'smarty_function_session_put'); $smarty->register_function('session_erase', 'smarty_function_session_erase'); $smarty->register_function('cgsi_array_set', array($this, 'plugin_array_set')); $smarty->register_function('cgsi_array_unset', array($this, 'plugin_array_unset')); $smarty->register_function('anchor_link', array($this, 'plugin_anchorlink')); }
public function __construct() { parent::__construct(); $smarty = cms_utils::get_smarty(); $this->check_compiler(); $smarty->assign('module_url_path',$this->GetModuleURLPath()); $smarty->assign('module_root_path',$this->GetModulePath()); }
function TinyMCE() { parent::CMSModule(); $this->plugins_always_enabled = -1; $this->plugins_default_enabled = "paste,advimage,advlink,contextmenu,inlinepopups,spellchecker"; $this->plugins_ignore = "cmsmslink,simplepaste"; $this->templateid = -1; $this->module_plugins = array(); }
public function __construct() { parent::__construct(); $this->_loaded = false; $smarty = CmsApp::get_instance()->GetSmarty(); if (!$smarty) { return; } $smarty->register_modifier('markdown', array($this, 'exec_parser')); }
/** * Get a form for displaying a 'start' template. A start template * is read from a file, stored in the database, and is used when creating * a new template of that type. * * @param CMSModule $module The module that this template is for * @param string $id The module instance id. * @param int $returnid The returnid (usually empty) * @param string $prefname The preference (relative to the module supplied) that will hold this start template. * @param string $action The return action (usually defaultadmin) * @param string $active_tab The name of the tab to return to. * @param string $title The title for this form. Usually indicates to the administrator what template he is editing. * @param string $filename The file name (relative to the modules templates directory) where the system default version of the 'start' template is. * @param string $info The info string for the form. * @param bool $simple A flag indicating a simple form. * @return string An HTML form. */ public static function get_start_template_form(&$module, $id, $returnid, $prefname, $action, $active_tab, $title, $filename, $info = '', $simple = false) { static $counter = 0; $cgextensions = cge_utils::get_module(MOD_CGEXTENSIONS); $the_template = $module->GetTemplate($prefname); if (!$the_template) { $the_template = $module->GetPreference($prefname); } $tpl = $cgextensions->CreateSmartyTemplate('editdefaulttemplate.tpl'); $tpl->assign('simple', $simple); $tpl->assign('defaulttemplateform_title', $title); $tpl->assign('info_title', $info); $tpl->assign('startform', $cgextensions->CreateFormStart($id, 'setdefaulttemplate', $returnid, 'post', '', false, '', array('prefname' => $prefname, 'destmodule' => $module->GetName(), 'destaction' => $action, 'cg_activetab' => $active_tab, 'filename' => $filename))); $tpl->assign('prompt_template', $cgextensions->Lang('template')); $tpl->assign('input_template', $cgextensions->CreateTextArea(false, $id, $the_template, 'input_template')); $tpl->assign('submit', $cgextensions->CreateInputSubmit($id, 'submit', $cgextensions->Lang('submit'))); $tpl->assign('reset', $cgextensions->CreateInputSubmit($id, 'resettodefault', $cgextensions->Lang('resettofactory'))); $tpl->assign('endform', $cgextensions->CreateFormEnd()); $tpl->assign('prefname', $prefname); $tpl->assign('dflt_tpl_counter', $counter++); return $tpl->fetch(); }
public function __construct() { parent::__construct(); $fn = dirname(__FILE__) . '/class.cgsimple.php'; require_once $fn; $smarty = cmsms()->GetSmarty(); $obj = new cgsimple(); $smarty->assign('cgsimple', $obj); $smarty->register_function('module_action_link', 'module_action_link'); $smarty->register_function('cgrepeat', 'smarty_function_cgrepeat'); $smarty->register_function('session_put', 'smarty_function_session_put'); $smarty->register_function('session_erase', 'smarty_function_session_erase'); }
function DoAction($action, $id, $params, $returnid = -1) { switch ($action) { case 'installmodule': if ($this->CheckAccess($id, $params, $returnid, 'Modify Modules')) { $this->_DoRecursiveInstall($id, $params, $returnid); } break; case 'doinstall': if ($this->CheckAccess($id, $params, $returnid, 'Modify Modules')) { $this->_DoInstallLoop($id, $params, $returnid); } break; case 'modulehelp': $this->_DisplayAdminSoapModuleHelp($id, $params, $returnid); break; case 'moduledepends': $this->_DisplayAdminSoapModuleDepends($id, $params, $returnid); break; case 'moduleabout': $this->_DisplayAdminSoapModuleAbout($id, $params, $returnid); break; case 'recurseinstall': $this->_DoRecursiveInstall($id, $params, $returnid); // fallback through to call the action.xxxx.php file // fallback through to call the action.xxxx.php file default: parent::DoAction($action, $id, $params, $returnid); break; } }
function DoAction($action, $id, $params, $returnid = -1) { global $gCms; $smarty =& $gCms->GetSmarty(); $smarty->assign_by_ref('mod', $this); switch ($action) { case 'default': break; case 'setadminprefs': $this->_SetAdminPrefs($id, $params, $returnid); break; default: parent::DoAction($action, $id, $params, $returnid); } }
/** * A replacement for the built in SetTabHeader. * This method is a smart replacement that will automatically handle an active tab on the * requiest. * * @param string $name The tab name (for coding purposes) * @param string $str The human readable label for the tab. * @param mixed $state If Empty or 'unknown' then detect any currently set tab. */ function SetTabHeader($name, $str, $state = 'unknown') { if ($state == 'unknown' || $state == '') { $state = $name == $this->_current_tab; } return parent::SetTabHeader($name, $str, $state); }
public function __construct() { parent::__construct(); $this->templateid = -1; }
function __construct() { parent::__construct(); $this->_tools_loaded = false; }
public function DoAction($action, $id, $params, $returnid = '') { switch ($action) { case 'deleteMultiInput': case 'deleteMultiInputTpl': case 'default': case 'savePrefs': case 'defaultadmin': case 'addMultiInput': case 'editMultiInput': case 'addMultiInputTpl': case 'editMultiInputTpl': parent::DoAction($action, $id, $params, $returnid); break; default: break; } }
public function DoAction($name, $id, $params, $returnid = '') { //diversions switch ($name) { case 'default': $name = 'payplus'; break; } parent::DoAction($name, $id, $params, $returnid); }
function DoAction($name, $id, $params, $returnid = '') { //diversions switch ($name) { case 'addedit_comp': if (!empty($params['real_action'])) { //'real_action' will be correctly set only if js is enabled $task = substr($params['real_action'], strlen($id)); switch ($task) { case 'apply': case 'cancel': case 'submit': $name = 'save_comp'; break; case 'addteam': $name = 'addedit_team'; break; case 'delteams': $name = 'delete_team'; break; case 'notify': case 'abandon': case 'getscore': case 'export': $name = 'multi_task'; break; case 'chart': case 'list': case 'print': $name = 'show_comp'; break; case 'reset': $name = 'schedule'; break; case 'connect': $params['real_action'] = $task; break; case 'import_team': case 'schedule': case 'upload_css': case 'changelog': $name = $task; break; } if (substr($task, 0, 4) == 'edit') { $name = 'addedit_team'; } elseif (substr($task, 0, 6) == 'update') { $name = 'save_comp'; } elseif (substr($task, 0, 11) == 'delete_team') { $name = 'delete_team'; } elseif (substr($task, 0, 8) == 'movedown') { $params['real_action'] = $task; } elseif (substr($task, 0, 6) == 'moveup') { $params['real_action'] = $task; } } break; case 'process_items': if (!empty($params['import'])) { $name = 'import_comp'; } break; case 'default': if (!empty($params['result'])) { $name = 'result'; } break; case 'result': if (empty($params['send'])) { $name = 'default'; } break; case 'addgroup': $name = 'defaultadmin'; $params = array('showtab' => 1, 'addgroup' => TRUE); break; } parent::DoAction($name, $id, $params, $returnid); }
function DoAction($name, $id, $params, $returnid = '') { $smarty = cmsms()->GetSmarty(); $this->module_id = $id; parent::DoAction($name, $id, $params, $returnid); }
/** * Trigger an event. * This function will call all registered event handlers for the event * * @param string $modulename The name of the module that is sending the event * @param string $eventname The name of the event * @param array $params The parameters associated with this event. * @return void */ public static function SendEvent($modulename, $eventname, $params = array()) { global $CMS_INSTALL_PAGE; if (isset($CMS_INSTALL_PAGE)) { return; } $gCms = cmsms(); $results = Events::ListEventHandlers($modulename, $eventname); if ($results != false) { foreach ($results as $row) { if (isset($row['tag_name']) && $row['tag_name'] != '') { debug_buffer('calling user tag ' . $row['tag_name'] . ' from event ' . $eventname); $usertagops = $gCms->GetUserTagOperations(); $usertagops->CallUserTag($row['tag_name'], $params); } else { if (isset($row['module_name']) && $row['module_name'] != '') { // here's a quick check to make sure that we're not calling the module // DoEvent function for an event originated by the same module. if ($row['module_name'] == $modulename) { continue; } // and call the module event handler. $obj =& CMSModule::GetModuleInstance($row['module_name']); if ($obj) { debug_buffer('calling module ' . $row['module_name'] . ' from event ' . $eventname); $obj->DoEvent($modulename, $eventname, $params); } } } } } }
function __construct() { $this->acdev = false; parent::CMSModule(); }
function DoAction($action, $id, $params, $returnid = -1) { @set_time_limit(9999); switch ($action) { case 'recurseinstall': die('call installmodule action'); // fallback through to call the action.xxxx.php file // fallback through to call the action.xxxx.php file default: parent::DoAction($action, $id, $params, $returnid); break; } }
function DoAction($name, $id, $params, $returnid = '') { global $gCms; $smarty =& $gCms->GetSmarty(); $this->module_id = $id; parent::DoAction($name, $id, $params, $returnid); }