当前位置: 首页>>代码示例>>PHP>>正文


PHP JPluginHelper::importPlugin方法代码示例

本文整理汇总了PHP中JPluginHelper::importPlugin方法的典型用法代码示例。如果您正苦于以下问题:PHP JPluginHelper::importPlugin方法的具体用法?PHP JPluginHelper::importPlugin怎么用?PHP JPluginHelper::importPlugin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JPluginHelper的用法示例。


在下文中一共展示了JPluginHelper::importPlugin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save

 function save(&$element)
 {
     $old = $this->get($element->tax_namekey);
     JPluginHelper::importPlugin('hikashop');
     $dispatcher = JDispatcher::getInstance();
     $do = true;
     if (!empty($old)) {
         $element->old =& $old;
         $dispatcher->trigger('onBeforeTaxUpdate', array(&$element, &$do));
     } else {
         $dispatcher->trigger('onBeforeTaxCreate', array(&$element, &$do));
     }
     if (!$do) {
         return false;
     }
     if (!empty($old)) {
         $result = parent::save($element);
     } else {
         $this->database->setQuery($this->_getInsert($this->getTable(), $element));
         $result = $this->database->query();
     }
     if (!empty($old)) {
         $dispatcher->trigger('onAfterTaxUpdate', array(&$element));
     } else {
         $dispatcher->trigger('onAfterTaxCreate', array(&$element));
     }
     return $result;
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:28,代码来源:tax.php

示例2: sendMemberDaytimeToAdmin

 function sendMemberDaytimeToAdmin($member_id, $service_id, $daytime_id)
 {
     define("BodyMemberDaytimeToAdmin", "<h1>Nouvelle inscription à une tranche horaire</h1><p>Un bénévole s'est inscrit à un secteur / tranche horaire.</p><p><strong>Nom :</strong> %s <br /><strong>Secteur :</strong> %s<br /><strong>Date :</strong> %s<br /><strong>Tranche horaire :</strong> %s</p><p><a href=\"" . JURI::root() . "/administrator/index.php?option=com_estivole&view=member&layout=edit&member_id=%s\">Cliquez ici</a> pour valider l'inscription et/ou recontacter le bénévole.</p>");
     define("SubjectMemberDaytimeToAdmin", "Nouvelle inscription à une tranche horaire");
     $db = JFactory::getDBO();
     $query = $db->getQuery(TRUE);
     $this->user = JFactory::getUser();
     // Get the dispatcher and load the user's plugins.
     $dispatcher = JEventDispatcher::getInstance();
     JPluginHelper::importPlugin('user');
     $data = new JObject();
     $data->id = $this->user->id;
     // Trigger the data preparation event.
     $dispatcher->trigger('onContentPrepareData', array('com_users.profilestivole', &$data));
     $userProfilEstivole = $data;
     $userName = $userProfilEstivole->profilestivole['firstname'] . ' ' . $userProfilEstivole->profilestivole['lastname'];
     $query->select('*');
     $query->from('#__estivole_members as b, #__estivole_services as s, #__estivole_daytimes as d');
     $query->where('b.member_id = ' . (int) $member_id);
     $query->where('s.service_id = ' . (int) $service_id);
     $query->where('d.daytime_id = ' . (int) $daytime_id);
     $db->setQuery($query);
     $mailModel = $db->loadObject();
     $mail = JFactory::getMailer();
     $mail->setBody(sprintf(constant("BodyMemberDaytimeToAdmin"), $userName, $mailModel->service_name, date('d-m-Y', strtotime($mailModel->daytime_day)), date('H:i', strtotime($mailModel->daytime_hour_start)) . ' - ' . date('H:i', strtotime($mailModel->daytime_hour_end)), $mailModel->member_id));
     $mail->setSubject(constant("SubjectMemberDaytimeToAdmin"));
     $mail->isHtml();
     $recipient = array('benevoles@estivale.ch', $mailModel->email_responsable);
     $mail->addRecipient($recipient);
     $mail->Send('estivole@estivale.ch');
 }
开发者ID:gorgozilla,项目名称:Estivole,代码行数:31,代码来源:mail.php

示例3: array

 /**
  * Helper method to return button list.
  *
  * This method returns the array by reference so it can be
  * used to add custom buttons or remove default ones.
  *
  * @param	JRegistry	The module parameters.
  *
  * @return	array	An array of buttons
  * @since	1.6
  */
 public static function &getButtons($params)
 {
     $key = (string) $params;
     if (!isset(self::$buttons[$key])) {
         $context = $params->get('context', 'mod_quickicon');
         if ($context == 'mod_quickicon') {
             // Load mod_quickicon language file in case this method is called before rendering the module
             JFactory::getLanguage()->load('mod_quickicon');
             self::$buttons[$key] = array(array('link' => JRoute::_('index.php?option=com_content&task=article.add'), 'image' => 'header/icon-48-article-add.png', 'text' => JText::_('MOD_QUICKICON_ADD_NEW_ARTICLE'), 'access' => array('core.manage', 'com_content', 'core.create', 'com_content')), array('link' => JRoute::_('index.php?option=com_content'), 'image' => 'header/icon-48-article.png', 'text' => JText::_('MOD_QUICKICON_ARTICLE_MANAGER'), 'access' => array('core.manage', 'com_content')), array('link' => JRoute::_('index.php?option=com_categories&extension=com_content'), 'image' => 'header/icon-48-category.png', 'text' => JText::_('MOD_QUICKICON_CATEGORY_MANAGER'), 'access' => array('core.manage', 'com_content')), array('link' => JRoute::_('index.php?option=com_media'), 'image' => 'header/icon-48-media.png', 'text' => JText::_('MOD_QUICKICON_MEDIA_MANAGER'), 'access' => array('core.manage', 'com_media')), array('link' => JRoute::_('index.php?option=com_menus'), 'image' => 'header/icon-48-menumgr.png', 'text' => JText::_('MOD_QUICKICON_MENU_MANAGER'), 'access' => array('core.manage', 'com_menus')), array('link' => JRoute::_('index.php?option=com_users'), 'image' => 'header/icon-48-user.png', 'text' => JText::_('MOD_QUICKICON_USER_MANAGER'), 'access' => array('core.manage', 'com_users')), array('link' => JRoute::_('index.php?option=com_modules'), 'image' => 'header/icon-48-module.png', 'text' => JText::_('MOD_QUICKICON_MODULE_MANAGER'), 'access' => array('core.manage', 'com_modules')), array('link' => JRoute::_('index.php?option=com_installer'), 'image' => 'header/icon-48-extension.png', 'text' => JText::_('MOD_QUICKICON_EXTENSION_MANAGER'), 'access' => array('core.manage', 'com_installer')), array('link' => JRoute::_('index.php?option=com_languages'), 'image' => 'header/icon-48-language.png', 'text' => JText::_('MOD_QUICKICON_LANGUAGE_MANAGER'), 'access' => array('core.manage', 'com_languages')), array('link' => JRoute::_('index.php?option=com_config'), 'image' => 'header/icon-48-config.png', 'text' => JText::_('MOD_QUICKICON_GLOBAL_CONFIGURATION'), 'access' => array('core.manage', 'com_config', 'core.admin', 'com_config')), array('link' => JRoute::_('index.php?option=com_templates'), 'image' => 'header/icon-48-themes.png', 'text' => JText::_('MOD_QUICKICON_TEMPLATE_MANAGER'), 'access' => array('core.manage', 'com_templates')), array('link' => JRoute::_('index.php?option=com_admin&task=profile.edit&id=' . JFactory::getUser()->id), 'image' => 'header/icon-48-user-profile.png', 'text' => JText::_('MOD_QUICKICON_PROFILE'), 'access' => true));
         } else {
             self::$buttons[$key] = array();
         }
         // Include buttons defined by published quickicon plugins
         JPluginHelper::importPlugin('quickicon');
         $app = JFactory::getApplication();
         $arrays = (array) $app->triggerEvent('onGetIcons', array($context));
         foreach ($arrays as $response) {
             foreach ($response as $icon) {
                 $default = array('link' => null, 'image' => 'header/icon-48-config.png', 'text' => null, 'access' => true);
                 $icon = array_merge($default, $icon);
                 if (!is_null($icon['link']) && !is_null($icon['text'])) {
                     self::$buttons[$key][] = $icon;
                 }
             }
         }
     }
     return self::$buttons[$key];
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:39,代码来源:helper.php

示例4: array

 /**
  * Helper method to return button list.
  *
  * This method returns the array by reference so it can be
  * used to add custom buttons or remove default ones.
  *
  * @param	JRegistry	The module parameters.
  *
  * @return	array	An array of buttons
  * @since	1.6
  */
 public static function &getButtons($params)
 {
     $key = (string) $params;
     if (!isset(self::$buttons[$key])) {
         $context = $params->get('context', 'mod_pj_quickicon');
         if ($context == 'mod_pj_quickicon') {
             // Load mod_quickicon language file in case this method is called before rendering the module
             JFactory::getLanguage()->load('mod_pj_quickicon');
             self::$buttons[$key] = array(array('link' => JRoute::_('index.php?option=com_playjoom&view=audiotracks'), 'params' => null, 'id' => null, 'imagePath' => null, 'image' => ' fa fa-list-alt', 'text' => JText::_('MOD_PJ_QUICKICON_TRACKSMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_TRACKS'), array('link' => JRoute::_('index.php?option=com_playjoom&view=media'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-music', 'text' => JText::_('MOD_PJ_QUICKICON_ADD_TRACKS'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_TRACKS'), array('link' => JRoute::_('index.php?option=com_playjoom&view=artists'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-users', 'text' => JText::_('MOD_PJ_QUICKICON_ARTISTSMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_TRACKS'), array('link' => JRoute::_('index.php?option=com_playjoom&view=albums'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-picture-o', 'text' => JText::_('MOD_PJ_QUICKICON_ALBUMSMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_TRACKS'), array('link' => JRoute::_('index.php?option=com_playjoom&view=covers'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-file-image-o', 'text' => JText::_('MOD_PJ_QUICKICON_COVERSMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_TRACKS'), array('link' => JRoute::_('index.php?option=com_categories&view=categories&extension=com_playjoom'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-folder-o', 'text' => JText::_('MOD_PJ_QUICKICON_GENRESMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_CATEGORIES'), array('link' => JRoute::_('index.php?option=com_categories&view=categories&extension=com_playjoom.playlist'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-play', 'text' => JText::_('MOD_PJ_QUICKICON_PLAYLISTSMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_CATEGORIES'), array('link' => JRoute::_('index.php?option=com_categories&view=categories&extension=com_playjoom.trackfilter'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-filter', 'text' => JText::_('MOD_PJ_QUICKICON_TRACKFILTERMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_CATEGORIES'));
             //Get user objects
             $user = JFactory::getUser();
             if ($user->authorise('core.admin', 'com_playjoom')) {
                 $PJbuttons = array(array('link' => JRoute::_('index.php?option=com_users'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-user', 'text' => JText::_('MOD_QUICKICON_USER_MANAGER'), 'access' => array('core.manage', 'com_users'), 'group' => 'MOD_PJ_QUICKICON_USERS'), array('link' => JRoute::_('index.php?option=com_config'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-cogs', 'text' => JText::_('MOD_QUICKICON_GLOBAL_CONFIGURATION'), 'access' => array('core.manage', 'com_config', 'core.admin', 'com_config'), 'group' => 'MOD_PJ_QUICKICON_CONFIGURATIONS'), array('link' => JRoute::_('index.php?option=com_config&view=component&component=com_playjoom'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-cog', 'text' => JText::_('MOD_PJ_QUICKICON_PLAYJOOM_OPTIONS'), 'access' => array('core.manage', 'com_config', 'core.admin', 'com_config'), 'group' => 'MOD_PJ_QUICKICON_CONFIGURATIONS'));
                 //Marge standard icons with PlayJoom admin icons
                 self::$buttons[$key] = array_merge(self::$buttons[$key], $PJbuttons);
                 // Include buttons defined by published quickicon plugins
                 JPluginHelper::importPlugin('quickicon');
                 $app = JFactory::getApplication();
                 $arrays = (array) $app->triggerEvent('onGetIcons', array($context));
                 foreach ($arrays as $response) {
                     foreach ($response as $icon) {
                         $default = array('link' => null, 'image' => 'cog', 'text' => null, 'access' => true, 'group' => 'MOD_QUICKICON_EXTENSIONS');
                         $icon = array_merge($default, $icon);
                         if (!is_null($icon['link']) && !is_null($icon['text'])) {
                             self::$buttons[$key][] = $icon;
                         }
                     }
                 }
             }
         } else {
             self::$buttons[$key] = array();
         }
     }
     return self::$buttons[$key];
 }
开发者ID:TFToto,项目名称:playjoom-builds,代码行数:46,代码来源:helper.php

示例5: getOptions

 /**
  * Method to get the field options.
  *
  * @return	array	The field option objects.
  * @since	1.6
  */
 protected function getOptions()
 {
     $options = array();
     $params = JComponentHelper::getParams('com_joomdle');
     $app = $params->get('activities');
     $option = array('value' => 'no', 'text' => JText::_('COM_JOOMDLE_NONE'));
     $options[] = $option;
     $option = array('value' => 'jomsocial', 'text' => 'Jomsocial');
     $options[] = $option;
     // Add sources added via plugins
     JPluginHelper::importPlugin('joomdleactivities');
     $dispatcher = JDispatcher::getInstance();
     $more_sources = $dispatcher->trigger('onGetActivitiesSource', array());
     if (is_array($more_sources)) {
         foreach ($more_sources as $source) {
             $keys = array_keys($source);
             $key = $keys[0];
             $source_name = array_shift($source);
             $option['value'] = $key;
             $option['text'] = $source_name;
             $options[] = $option;
         }
     }
     return $options;
 }
开发者ID:esyacelga,项目名称:sisadmaca,代码行数:31,代码来源:activities.php

示例6: plugin_init

function plugin_init()
{
    //invoke plugins.
    JPluginHelper::importPlugin('civicrm');
    $app =& JFactory::getApplication();
    $app->triggerEvent('onCiviLoad');
}
开发者ID:ksecor,项目名称:civicrm,代码行数:7,代码来源:admin.civicrm.php

示例7: display

 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     JPluginHelper::importPlugin('content');
     $vName = JRequest::getCmd('view', 'images');
     switch ($vName) {
         case 'imagesList':
             $mName = 'list';
             $vLayout = JRequest::getCmd('layout', 'default');
             break;
         case 'images':
         default:
             $vLayout = JRequest::getCmd('layout', 'default');
             $mName = 'manager';
             $vName = 'images';
             break;
     }
     $document = JFactory::getDocument();
     $vType = $document->getType();
     // Get/Create the view
     $view = $this->getView($vName, $vType);
     $view->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR . '/views/' . strtolower($vName) . '/tmpl');
     // Get/Create the model
     if ($model = $this->getModel($mName)) {
         // Push the model into the view (as default)
         $view->setModel($model, true);
     }
     // Set the layout
     $view->setLayout($vLayout);
     // Display the view
     $view->display();
     return $this;
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:41,代码来源:controller.php

示例8: approve

 function approve(&$pks, $value = 1)
 {
     // Initialise variables.
     $dispatcher = JDispatcher::getInstance();
     $user = JFactory::getUser();
     $table = $this->getTable('phocagalleryuser');
     $pks = (array) $pks;
     // Include the content plugins for the change of state event.
     JPluginHelper::importPlugin('content');
     // Access checks.
     foreach ($pks as $i => $pk) {
         if ($table->load($pk)) {
             if (!$this->canEditState($table)) {
                 // Prune items that you can't change.
                 unset($pks[$i]);
                 JError::raiseWarning(403, JText::_('JLIB_APPLICATION_ERROR_EDIT_STATE_NOT_PERMITTED'));
             }
         }
     }
     // Attempt to change the state of the records.
     if (!$table->approve($pks, $value, $user->get('id'))) {
         $this->setError($table->getError());
         return false;
     }
     $context = $this->option . '.' . $this->name;
     // Trigger the onContentChangeState event.
     /*$result = $dispatcher->trigger($this->event_change_state, array($context, $pks, $value));
     		if (in_array(false, $result, true)) {
     			$this->setError($table->getError());
     			return false;
     		}*/
     return true;
 }
开发者ID:scarsroga,项目名称:blog-soa,代码行数:33,代码来源:phocagalleryuser.php

示例9: load

 function load($type = '')
 {
     $this->allValues = array();
     $this->allValues["text"] = JText::_('K2STORE_TEXT');
     $this->allValues["email"] = JText::_('K2STORE_EMAIL');
     //	$this->allValues["link"] = JText::_('K2STORE_LINK');
     $this->allValues["textarea"] = JText::_('K2STORE_TEXTAREA');
     $this->allValues["wysiwyg"] = JText::_('K2STORE_WYSIWYG');
     $this->allValues["radio"] = JText::_('K2STORE_RADIO');
     $this->allValues["checkbox"] = JText::_('K2STORE_CHECKBOX');
     $this->allValues["singledropdown"] = JText::_('K2STORE_SINGLEDROPDOWN');
     //	$this->allValues["multipledropdown"] = JText::_('K2STORE_MULTIPLEDROPDOWN');
     $this->allValues["zone"] = JText::_('K2STORE_ZONE');
     $this->allValues["date"] = JText::_('K2STORE_DATE');
     $this->allValues["time"] = JText::_('K2STORE_TIME');
     $this->allValues["datetime"] = JText::_('K2STORE_DATETIME');
     $this->allValues["customtext"] = JText::_('K2STORE_CUSTOM_TEXT');
     if ($this->externalValues == null) {
         $this->externalValues = array();
         JPluginHelper::importPlugin('k2store');
         $dispatcher = JDispatcher::getInstance();
         $dispatcher->trigger('onK2StoreFieldsLoad', array(&$this->externalValues));
         if (!empty($this->externalValues)) {
             foreach ($this->externalValues as $value) {
                 if (substr($value->name, 0, 4) != 'plg.') {
                     $value->name = 'plg.' . $value->name;
                 }
                 $this->allValues[$value->name] = $value->text;
             }
         }
     }
 }
开发者ID:A-Bush,项目名称:pprod,代码行数:32,代码来源:fields.php

示例10: loadJoomlaList

 function loadJoomlaList()
 {
     JPluginHelper::importPlugin('nextendmenutheme');
     $dispatcher = JDispatcher::getInstance();
     $this->_list = array();
     $results = $dispatcher->trigger('onNextendMenuThemeList', array(&$this->_list));
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:7,代码来源:menutheme.php

示例11: pluginAjax

 /**
  * Ajax action called from element
  * 11/07/2011 - I've updated things so that any plugin ajax call uses 'view=plugin' rather than controller=plugin
  * this means that the controller used is now plugin.php and not plugin.raw.php
  *
  * @return  null
  */
 public function pluginAjax()
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $plugin = $input->get('plugin', '');
     $method = $input->get('method', '');
     $group = $input->get('g', 'element');
     /**
      * $$$ hugh - playing around trying to fix a viz AJAX issue, figured we might need
      * to set up the dispatcher first and pass it to importPlugin, which doesn't hurt, but
      * didn't fix the issue.  But leaving these two lines, as I think this might be necessary
      * at some point, to get the methods into the dispatcher?
      *
      * $dispatcher = JDispatcher::getInstance();
      * if (!JPluginHelper::importPlugin('fabrik_'.$group, $plugin, true, $dispatcher))
      */
     if (!JPluginHelper::importPlugin('fabrik_' . $group, $plugin)) {
         $o = new stdClass();
         $o->err = 'unable to import plugin fabrik_' . $group . ' ' . $plugin;
         echo json_encode($o);
         return;
     }
     if (substr($method, 0, 2) !== 'on') {
         $method = 'on' . JString::ucfirst($method);
     }
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger($method);
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:35,代码来源:plugin.php

示例12: onAfterRoute

 function onAfterRoute()
 {
     if (defined('T3_PLUGIN')) {
         T3Bot::preload();
         $template = T3::detect();
         if ($template) {
             // load the language
             $this->loadLanguage();
             T3Bot::beforeInit();
             T3::init($template);
             T3Bot::afterInit();
             //load T3 plugins
             JPluginHelper::importPlugin('t3');
             if (is_file(T3_TEMPLATE_PATH . '/templateHook.php')) {
                 include_once T3_TEMPLATE_PATH . '/templateHook.php';
             }
             $tplHookCls = preg_replace('/(^[^A-Z_]+|[^A-Z0-9_])/i', '', T3_TEMPLATE . 'Hook');
             $dispatcher = JDispatcher::getInstance();
             if (class_exists($tplHookCls)) {
                 new $tplHookCls($dispatcher, array());
             }
             $dispatcher->trigger('onT3Init');
             //check and execute the t3action
             T3::checkAction();
             //check and change template for ajax
             T3::checkAjax();
         }
     }
 }
开发者ID:lazarch,项目名称:t3,代码行数:29,代码来源:t3.php

示例13: before

 /**
  * Prepare message actions display.
  *
  * @return void
  */
 protected function before()
 {
     parent::before();
     $catid = $this->input->getInt('id');
     $me = KunenaUserHelper::getMyself();
     $this->category = KunenaForumCategory::getInstance($catid);
     $token = JSession::getFormToken();
     $task = "index.php?option=com_kunena&view=category&task=%s&catid={$catid}&{$token}=1";
     $layout = "index.php?option=com_kunena&view=topic&layout=%s&catid={$catid}";
     $this->template = KunenaFactory::getTemplate();
     $this->categoryButtons = new JObject();
     // Is user allowed to post new topic?
     if ($this->category->getNewTopicCategory()->exists()) {
         $this->categoryButtons->set('create', $this->getButton(sprintf($layout, 'create'), 'create', 'topic', 'communication', true));
     }
     // Is user allowed to mark forums as read?
     if ($me->exists()) {
         $this->categoryButtons->set('markread', $this->getButton(sprintf($task, 'markread'), 'markread', 'category', 'user', true));
     }
     // Is user allowed to subscribe category?
     if ($this->category->isAuthorised('subscribe')) {
         $subscribed = $this->category->getSubscribed($me->userid);
         if (!$subscribed) {
             $this->categoryButtons->set('subscribe', $this->getButton(sprintf($task, 'subscribe'), 'subscribe', 'category', 'user', true));
         } else {
             $this->categoryButtons->set('unsubscribe', $this->getButton(sprintf($task, 'unsubscribe'), 'unsubscribe', 'category', 'user', true));
         }
     }
     JPluginHelper::importPlugin('kunena');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onKunenaGetButtons', array('category.action', $this->categoryButtons, $this));
 }
开发者ID:giabmf11,项目名称:Kunena-Forum,代码行数:37,代码来源:display.php

示例14: __construct

 function __construct($config = array())
 {
     parent::__construct($config);
     JPluginHelper::importPlugin('jshoppingcheckout');
     JPluginHelper::importPlugin('jshoppingorder');
     JDispatcher::getInstance()->trigger('onConstructJshoppingControllerUser', array(&$this));
 }
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:7,代码来源:user.php

示例15: prepareArticleDB

 /**
  *  Funkce pro načtení dat 1 článku z databáze
  */
 private function prepareArticleDB($articleId, $text = 'all', $skipPlugins = false)
 {
     $db =& JFactory::getDBO();
     $db->setQuery("SELECT * FROM #__content WHERE id='{$articleId}' LIMIT 1;");
     $rows = $db->loadObjectList();
     if (count($rows) == 1) {
         $article = $rows[0]->introtext . $rows[0]->fulltext;
     } else {
         return false;
     }
     //připravíme text
     if ($text == 'introtext') {
         $rows[0]->text = $rows[0]->introtext;
     } elseif ($text == 'fulltext') {
         $rows[0]->text = $rows[0]->fulltext;
     } else {
         $rows[0]->text = $rows[0]->introtext . $rows[0]->fulltext;
     }
     if (!$skipPlugins) {
         $dispatcher =& JDispatcher::getInstance();
         JPluginHelper::importPlugin("content");
         //naimportujeme všechny pluginy pro zpracování obsahu
         $rows[0]->parameters = new JParameter($rows[0]->attribs);
         //vytvoříme objekt s parametry článku
         $results = $dispatcher->trigger('onPrepareContent', array(&$rows[0], &$rows[0]->parameters, 0));
         //načtení pluginů
     }
     /*nahradíme event. špatný tvar komentářů*/
     $rows[0]->text = str_replace('<!--gInclude{', '<!-- gInclude{', $rows[0]->text);
     $rows[0]->text = str_replace('}-->', '} -->', $rows[0]->text);
     /**/
     return $rows[0];
 }
开发者ID:KIZI,项目名称:sewebar-cms,代码行数:36,代码来源:ginclude.php


注:本文中的JPluginHelper::importPlugin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。