File manager - Edit - /home/jardides/www/Jardi-design/j37/plugins/pagebuilderck/slider/slider.php
Back
<?php /** * @copyright Copyright (C) 2015 Cédric KEIFLIN alias ced1870 * http://www.template-creator.com * http://www.joomlack.fr * @license GNU/GPL * */ defined('_JEXEC') or die('Restricted access'); jimport('joomla.event.plugin'); class plgPagebuilderckSlider extends JPlugin { private $context = 'PLG_PAGEBUILDERCK_SLIDER'; private $type = 'slider'; function __construct(&$subject, $params) { // load the script in the page in admin and front JHtml::_('jquery.framework', true); $doc = JFactory::getDocument(); $doc->addStylesheet(JUri::root(true) . '/plugins/pagebuilderck/slider/assets/slider.css'); $doc->addScript(JUri::root(true) . '/plugins/pagebuilderck/slider/assets/slider.js'); 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->title = JText::_($this->context . '_MENUITEM_TITLE'); $menuitem->description = JText::_($this->context . '_MENUITEM_DESC'); $menuitem->image = JUri::root(true) . '/plugins/pagebuilderck/slider/assets/images/slider.png'; return $menuitem; } /* * Display the html code for the item to be used into the interface * * Return String the html code */ public function onPagebuilderckLoadItemContentSlider() { $input = JFactory::getApplication()->input; $id = $input->get('ckid', '', 'string'); ?> <div id="<?php echo $id; ?>" class="cktype" data-type="<?php echo $this->type ?>" onshow="pbck_slider_init(jQuery(this).find('.pbck_slider').attr('id'));"> <div class="ckstyle"> </div> <div class="pbck_slider inner" id="<?php echo $id; ?>_pbck_slider"> <div class="pbck_slides"> <div class="pbck_wrap"> <div class="pbck_wrapinner"> <figure class="pbck_slide current"> <figcaption class="pbck_slide_caption"> <div class="pbck_slide_title">Nice Images Slider</div> <br /> <div class="pbck_slide_desc">Created by <a href="http://www.joomlack.fr">Joomlack</a></div> </figcaption> <img class="pbck_slide_img" src="<?php echo JUri::root(true); ?>/plugins/pagebuilderck/slider/assets/images/slide1.jpg"> </figure> <figure class="pbck_slide"> <figcaption class="pbck_slide_caption"> <div class="pbck_slide_title">Water in the sun</div> <br /> <div class="pbck_slide_desc">Some time for your holidays</div> </figcaption> <img class="pbck_slide_img" src="<?php echo JUri::root(true); ?>/plugins/pagebuilderck/slider/assets/images/slide2.jpg"> </figure> <figure class="pbck_slide"> <figcaption class="pbck_slide_caption"> <div class="pbck_slide_title">Over the mountain</div> <br /> <div class="pbck_slide_desc">Are you a climber ?</div> </figcaption> <img class="pbck_slide_img" src="<?php echo JUri::root(true); ?>/plugins/pagebuilderck/slider/assets/images/slide3.jpg"> </figure> </div> </div> </div> <div class="pbck_slider_controls"> <div onclick="pbck_slider_show(this)" class="pbck_slider_control control_next"></div> <div onclick="pbck_slider_show(this)" class="pbck_slider_control control_prev"></div> </div> </div> </div> <?php } /* * Display the html code for the item to be used into the interface * * Return String the html code */ public function onPagebuilderckLoadItemOptionsSlider() { // load the language files of the plugin $this->loadLanguage(); // load the interface for the options $tpl = JPATH_SITE . '/plugins/pagebuilderck/slider/layouts/edit_slider.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 onPagebuilderckRenderItemSlider($item) { $html = $item->innertext; return $html; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings