Esempio n. 1
0
 public function onContentPrepare(&$article, &$context, &$params)
 {
     $area = isset($article->created_by) ? 'articles' : 'other';
     $area = isset($article->created_by) ? 'articles' : 'other';
     $context = $params instanceof JRegistry && $params->get('nn_search') ? 'com_search.' . $params->get('readmore_limit') : $context;
     NNFrameworkHelper::processArticle($article, $context, $this, 'processArticles', array($area, $context, &$article));
 }
Esempio n. 2
0
 /**
  * Create the helper object
  *
  * @return object The plugins helper object
  */
 private function getHelper()
 {
     // Already initialized, so return
     if ($this->_init) {
         return $this->_helper;
     }
     $this->_init = true;
     if (!$this->isFrameworkEnabled()) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php';
     if (NNProtect::isAdmin()) {
         return false;
     }
     if (NNProtect::isProtectedPage($this->_alias, 1)) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/helper.php';
     $this->_helper = NNFrameworkHelper::getPluginHelper($this);
     return $this->_helper;
 }
Esempio n. 3
0
 /**
  * Create the helper object
  *
  * @return object The plugins helper object
  */
 private function getHelper()
 {
     // Already initialized, so return
     if ($this->_init) {
         return $this->_helper;
     }
     $this->_init = true;
     if (!$this->isFrameworkEnabled()) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php';
     if (!NNProtect::isSystemPluginInstalled($this->_alias)) {
         return false;
     }
     // Load plugin parameters
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
     $parameters = NNParameters::getInstance();
     $params = $parameters->getPluginParams($this->_name);
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/helper.php';
     $this->_helper = NNFrameworkHelper::getPluginHelper($this, $params);
     return $this->_helper;
 }
 /**
  * Create the helper object
  *
  * @return object The plugins helper object
  */
 private function getHelper()
 {
     // Already initialized, so return
     if ($this->_init) {
         return $this->_helper;
     }
     $this->_init = true;
     // only in html or raw (for ajax save order stuff)
     if (!in_array(JFactory::getDocument()->getType(), array('html', 'raw'))) {
         return false;
     }
     if (!$this->isFrameworkEnabled()) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php';
     if (NNProtect::isProtectedPage($this->_alias)) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/helper.php';
     $this->_helper = NNFrameworkHelper::getPluginHelper($this);
     return $this->_helper;
 }
Esempio n. 5
0
 /**
  * onContentPrepare
  */
 public function onContentPrepare(&$article, &$context)
 {
     $area = isset($article->created_by) ? 'articles' : 'other';
     if (!NNFrameworkHelper::isCategoryList($context)) {
         switch (true) {
             case isset($article->text):
                 $this->replace($article->text, $area, $article);
                 break;
             case isset($article->introtext):
                 $this->replace($article->introtext, $area, $article);
             case isset($article->fulltext):
                 $this->replace($article->fulltext, $area, $article);
                 break;
         }
     }
     if (isset($article->description)) {
         $this->replace($article->description, $area, $article);
     }
     if (isset($article->title)) {
         $this->replace($article->title, $area, $article);
     }
 }
Esempio n. 6
0
 /**
  * Create the helper object
  *
  * @return object The plugins helper object
  */
 private function getHelper()
 {
     // Already initialized, so return
     if ($this->_init) {
         return $this->_helper;
     }
     $this->_init = true;
     if (JFactory::getDocument()->getType() != 'html') {
         return false;
     }
     if (!$this->isFrameworkEnabled()) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php';
     if (!NNProtect::isComponentInstalled($this->_alias)) {
         return false;
     }
     if (NNProtect::isProtectedPage($this->_alias)) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/helper.php';
     $this->_helper = NNFrameworkHelper::getPluginHelper($this);
     return $this->_helper;
 }
Esempio n. 7
0
 public function onContentPrepare(&$article, &$context)
 {
     $this->params->message = '';
     $area = isset($article->created_by) ? 'articles' : 'other';
     NNFrameworkHelper::processArticle($article, $context, $this, 'processModules', array($area));
 }
Esempio n. 8
0
 /**
  * Create the helper object
  *
  * @return object The plugins helper object
  */
 private function getHelper()
 {
     // Already initialized, so return
     if ($this->_init) {
         return $this->_helper;
     }
     $this->_init = true;
     if (JFactory::getApplication()->input->getWord('format') == 'feed' || JFactory::getApplication()->input->getWord('type') == 'rss' || JFactory::getApplication()->input->getWord('type') == 'atom') {
         return false;
     }
     if (!$this->isFrameworkEnabled()) {
         return false;
     }
     jimport('joomla.filesystem.file');
     if (!JFile::exists(JPATH_ADMINISTRATOR . '/components/com_advancedmodules/advancedmodules.php')) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php';
     if (!NNProtect::isComponentInstalled($this->_alias)) {
         return false;
     }
     if (NNProtect::isProtectedPage($this->_alias)) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
     $params = NNParameters::getInstance()->getComponentParams('advancedmodules');
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/helper.php';
     $this->_helper = NNFrameworkHelper::getPluginHelper($this, $params);
     return $this->_helper;
 }