File manager - Edit - /home/jardides/www/Jardi-design/plugins/pagebuilderck/page/page.php
Back
<?php /** * @copyright Copyright (C) 2015 Cédric KEIFLIN alias ced1870 * https://www.template-creator.com * https://www.joomlack.fr * @license GNU/GPL * */ defined('_JEXEC') or die('Restricted access'); jimport('joomla.event.plugin'); class plgPagebuilderckPage extends JPlugin { private $context = 'PLG_PAGEBUILDERCK_PAGE'; private $type = 'page'; function __construct(&$subject, $params) { parent::__construct($subject, $params); } /* * Construct the Menu Item to drag into the interface * * Return Object with item data */ public function onPagebuilderckAddItemToMenu() { // load the language files of the plugin $this->loadLanguage(); // create the menu item $menuitem = new stdClass(); $menuitem->type = $this->type; $menuitem->group = 'other'; $menuitem->title = JText::_($this->context . '_MENUITEM_TITLE'); $menuitem->description = JText::_($this->context . '_MENUITEM_DESC'); $menuitem->image = JUri::root(true) . '/plugins/pagebuilderck/page/assets/images/page.png'; return $menuitem; } /* * Display the html code for the item to be used into the interface * * Return String the html code */ public function onPagebuilderckLoadItemContentPage() { // load the language files of the plugin $this->loadLanguage(); $input = JFactory::getApplication()->input; $id = $input->get('ckid', '', 'string'); // ckstyle and inner classes are needed to get the styles from the interface ?> <div id="<?php echo $id; ?>" class="cktype" data-type="page" > <div class="ckstyle"> </div> <div class="pageck inner"> <svg class="pageck_icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"/></svg> <h4 class="pagerow_title"><?php echo JText::_('CK_PAGE') ?></h4> <div class="pageck_content"><?php echo JText::_('PLG_PAGEBUILDERCK_PAGE_NOT_SELECTED') ?></div> </div> </div> <?php } /* * Load the interface for the item edition * * Return String the html code */ public function onPagebuilderckLoadItemOptionsPage() { // load the language files of the plugin $this->loadLanguage(); // load the interface for the options $tpl = JPATH_SITE . '/plugins/pagebuilderck/page/layouts/edit_page.php'; return $tpl; } /* * Display the html code for the item to be used into the frontend page * @param string the item object from simple_html_dom * * Return String the html code */ public function onPagebuilderckRenderItemPage($item) { return $item->innertext; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings