static function &getInstance() { static $instance; if ($instance) { return $instance; } $session = JCKUser::getSession(); //get Session incase it has not been set $instance = $session->get('user'); return $instance; }
function beforeSetFilePath(&$params) { $plugin = JPluginHelper::getPlugin('content', 'jw_allvideos'); if (!isset($plugin->params)) { return; } $avParams = new JParameter($plugin->params); $avBasePath = $avParams->get('afolder', 'images/stories/audio'); jckimport('ckeditor.user.user'); $user =& JCKUser::getInstance(); $mediatype = $user->mediatype; if ($mediatype == 'video') { $avBasePath = $avParams->get('vfolder', 'images/stories/video'); } //now set filepath $params->set('filePath', $avBasePath); }
jimport('joomla.environment.request'); jimport('joomla.environment.response'); jimport('joomla.user.user'); jimport('joomla.application.component.model'); jimport('joomla.html.parameter'); //This is required for the User Params jimport('joomla.utilities.arrayhelper'); //lets set DB configuration $config = new JConfig(); // Get the global configuration object $registry = JFactory::getConfig(); // Load the configuration values into the registry $registry->loadObject($config); //lets set session jckimport('ckeditor.user.user'); $session = JCKUser::getSession(); /*** End load joomla core classe **/ /** * Simple function required by config.php - discover the server side path * to the directory relative to the "$baseUrl" attribute * * @package CKEditor * @subpackage Connector * @param string $baseUrl * @return string */ function resolveUrl($baseUrl) { $fileSystem =& CKEditor_Connector_Core_Factory::getInstance("Utils_FileSystem"); return $fileSystem->getDocumentRootPath() . $baseUrl; }
/** * Loads the published plugins * * @access private */ function _load() { static $plugins; if (isset($plugins)) { return $plugins; } $session =& JCKUser::getSession(); $jckplugins =& $session->get('jckplugins'); if (!empty($jckplugins)) { $plugins =& $jckplugins; } else { return false; } return $plugins; }
function check() { jckimport('ckeditor.user.user'); $user =& JCKUser::getInstance(); return $user->gid > 0; }
function authorise() { jckimport('ckeditor.user.user'); $user = JCKUser::getInstance(); return $user->gid > 0; }