Exemplo n.º 1
0
 public function display($tpl = null)
 {
     // Add default admin CSS
     $cssPath = JPATH_SITE . "/media/{$this->option}/css/admin-default.css";
     if (file_exists($cssPath)) {
         $doc = Factory::getDocument();
         $doc->addStyleSheet($cssPath);
     }
     parent::display($tpl);
     $this->displayFooter();
 }
Exemplo n.º 2
0
 /**
  * Plugin that loads module positions within content
  *
  * @param   string   $context   The context of the content being passed to the plugin.
  * @param   object   &$article  The article object.  Note $article->text is also available
  * @param   mixed    &$params   The article params
  * @param   integer  $page      The 'page' number
  *
  * @return  mixed   true if there is an error. Void otherwise.
  *
  * @since   1.6
  */
 public function onContentPrepare($context, &$article, &$params, $page = 0)
 {
     // Don't run this plugin when the content is being indexed
     if ($context == 'com_finder.indexer' || !$this->allowedToRun) {
         return true;
     }
     $versionUID = md5($this->extension->getVersion());
     JHtml::_('jquery.framework');
     $doc = Framework\Factory::getDocument();
     $doc->addStyleSheetVersion('media/plg_content_osembed/css/osembed.css', $versionUID);
     $doc->addScriptVersion('media/plg_content_osembed/js/osembed.js', $versionUID);
     $embedClass = $this->getEmbedClass();
     $article->text = $embedClass::parseContent($article->text, false);
 }
Exemplo n.º 3
0
 public function init()
 {
     $doc = Factory::getDocument();
     $doc->addStyleSheet(OSDOWNLOADS_MEDIA_URI . "/css/frontend.css");
     parent::init();
 }