Exemplo n.º 1
0
 public function onBeforeControllerGet(KEvent $event)
 {
     $actor = get_viewer();
     $controller = $this->getController();
     parent::onBeforeControllerGet($event);
     $this->addNavigation('index', translate('COM-FORUMS-INDEX'), 'option=com_forums', $controller->view == 'forums' || $controller->view == 'category' || $controller->view == 'forum');
     $this->addNavigation('recent-posts', translate('COM-FORUMS-RECENT-POSTS'), 'option=forums&view=posts', $controller->view == 'posts');
     if (!$actor->guest()) {
         $this->addNavigation('your-threads', translate('COM-FORUMS-YOUR-THREADS'), array('option' => 'com_forums', 'view' => 'threads', 'oid' => $actor->uniqueAlias), $controller->view == 'threads' && $controller->oid == $actor->uniqueAlias);
     }
 }
Exemplo n.º 2
0
 /**
  * Before Controller _actionRead is executed.
  *
  * @param KEvent $event Dispatcher event
  */
 public function onBeforeControllerGet(KEvent $event)
 {
     parent::onBeforeControllerGet($event);
     if (!get_viewer()->admin()) {
         return;
     }
     $name = $identifier = $this->getController()->getIdentifier()->name;
     //packages transactions
     $this->addNavigation('nav-transactions', JText::_('COM-SUBSCRIPTIONS-TRANSACTIONS-MENU-ITEM'), JRoute::_('option=com_subscriptions&view=orders'), $name == 'order' ? true : false);
     //packages navigation
     $this->addNavigation('nav-packages', JText::_('COM-SUBSCRIPTIONS-PACKAGES-MENU-ITEM'), JRoute::_('option=com_subscriptions&view=packages'), $name == 'package' ? true : false);
     //coupons navigation
     $this->addNavigation('nav-coupons', JText::_('COM-SUBSCRIPTIONS-COUPONS-MENU-ITEM'), JRoute::_('option=com_subscriptions&view=coupons'), $name == 'coupon' ? true : false);
     //coupons navigation
     $this->addNavigation('nav-vats', JText::_('COM-SUBSCRIPTIONS-VATS-MENU-ITEM'), JRoute::_('option=com_subscriptions&view=vats'), $name == 'vat' ? true : false);
 }
Exemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     //loads the actor langauge
     JFactory::getLanguage()->load('com_actors');
 }