primo commit
This commit is contained in:
77
plugins/content/tabulizercss/tabulizercss.php
Normal file
77
plugins/content/tabulizercss/tabulizercss.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* Include CSS files required by the Tabulizer editor plugin
|
||||
*
|
||||
* @package tabulizer
|
||||
* @copyright Copyright © 2011 - All rights reserved.
|
||||
* @license GNU/GPL
|
||||
* @author Dimitrios Mourloukos
|
||||
* @author mail info@alterora.gr
|
||||
* @website www.alterora.gr
|
||||
*
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
jimport( 'joomla.plugin.plugin' );
|
||||
|
||||
if(!defined('DS')){define('DS',DIRECTORY_SEPARATOR);}
|
||||
|
||||
|
||||
class plgContentTabulizerCSS extends JPlugin
|
||||
{
|
||||
function __construct(&$subject, $config) {
|
||||
parent::__construct($subject, $config);
|
||||
$this->loadLanguage();
|
||||
}
|
||||
|
||||
public function onContentPrepare($context, &$row, &$params, $page = 0)
|
||||
{
|
||||
$JApplication=JFactory::getApplication();
|
||||
|
||||
// don't run this plugin on administrator site
|
||||
if ($JApplication->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Don't run this plugin when the content is being indexed
|
||||
if (!empty($context)) {
|
||||
if ($context == 'com_finder.indexer') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_object($row)) {
|
||||
return $this->_includeCSS($row->text);
|
||||
}
|
||||
return $this->_includeCSS($row);
|
||||
}
|
||||
|
||||
public function onPrepareContent( &$article, &$params, $limitstart = 0 )
|
||||
{
|
||||
$JApplication=JFactory::getApplication();
|
||||
|
||||
// don't run this plugin on administrator site
|
||||
if ($JApplication->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->_includeCSS($article->text);
|
||||
}
|
||||
|
||||
protected function _includeCSS(&$text) {
|
||||
// load the admin tabulizer component language, as well
|
||||
$lang = JFactory::getLanguage();
|
||||
$lang->load('com_tabulizer', JPATH_ADMINISTRATOR);
|
||||
|
||||
require_once(JPATH_ADMINISTRATOR.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_tabulizer'.DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'common'.DIRECTORY_SEPARATOR.'tags_processor.php');
|
||||
$tag_processor = new TabulizerTagsProcessor();
|
||||
$tag_processor->init('content');
|
||||
$tag_processor->processTags($text);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
20
plugins/content/tabulizercss/tabulizercss.xml
Normal file
20
plugins/content/tabulizercss/tabulizercss.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="plugin" version="1.5" group="content" method="upgrade">
|
||||
<name>Content - Tabulizer CSS</name>
|
||||
<creationDate>2019-01-17</creationDate>
|
||||
<copyright>Copyright (C) 2011. All rights reserved.</copyright>
|
||||
<license>GNU General Public License</license>
|
||||
<author>Dimitrios Mourloukos</author>
|
||||
<authorEmail>info@alterora.gr</authorEmail>
|
||||
<authorUrl>www.tabulizer.gr</authorUrl>
|
||||
<version>6.2.6</version>
|
||||
|
||||
<description>PLG_TABULIZERCSS_INSTALLATION_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename plugin="tabulizercss">tabulizercss.php</filename>
|
||||
</files>
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/en-GB.plg_content_tabulizercss.ini</language>
|
||||
<language tag="en-GB">en-GB/en-GB.plg_content_tabulizercss.sys.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||
Reference in New Issue
Block a user