| Server IP : 46.105.57.169 / Your IP : 216.73.216.144 Web Server : Apache System : Linux webd003.cluster120.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : maitricfuz ( 93378) PHP Version : 8.4.10 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/m/a/i/maitricfuz/www/new-saint-martin/plugins/pagebuilderck/slider/ |
Upload File : |
<?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 plgPagebuilderckSlider extends \Joomla\CMS\Plugin\CMSPlugin {
private $context = 'PLG_PAGEBUILDERCK_SLIDER';
private $type = 'slider';
function __construct(&$subject, $params) {
parent::__construct($subject, $params);
}
public function callAssets() {
// load the script in the page in admin and front
\Joomla\CMS\HTML\HTMLHelper::_('jquery.framework', true);
$doc = \Joomla\CMS\Factory::getDocument();
PagebuilderckFrontHelper::addStylesheet(\Joomla\CMS\Uri\Uri::root(true) . '/plugins/pagebuilderck/slider/assets/slider.css');
if (file_exists(JPATH_ROOT . '/media/com_pagebuilderck/presets/slider/presets.css')) PagebuilderckFrontHelper::addStylesheet(\Joomla\CMS\Uri\Uri::root(true) . '/media/com_pagebuilderck/presets/slider/presets.css');
$doc->addScript(\Joomla\CMS\Uri\Uri::root(true) . '/plugins/pagebuilderck/slider/assets/slider.js');
}
/*
* Construct the Menu Item to drag into the interface
*
* Return Object with item data
*/
public function onPagebuilderckAddItemToMenu() {
$this->callAssets();
// load the language files of the plugin
$this->loadLanguage();
// create the menu item
$menuitem = new stdClass();
$menuitem->type = $this->type;
$menuitem->group = 'image';
$menuitem->title = \Joomla\CMS\Language\Text::_($this->context . '_MENUITEM_TITLE');
$menuitem->description = \Joomla\CMS\Language\Text::_($this->context . '_MENUITEM_DESC');
$menuitem->image = \Joomla\CMS\Uri\Uri::root(true) . '/plugins/pagebuilderck/slider/assets/images/slider.svg';
return $menuitem;
}
/*
* Display the html code for the item to be used into the interface
*
* Return String the html code
*/
public function onPagebuilderckLoadItemContentSlider() {
$input = \Joomla\CMS\Factory::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).attr('id'));">
<div class="tab_titlestyles ckprops" titlebackgroundcolorstart="#222222" titlebackgroundpositionend="100" titlebackgrounddirection="topbottom" titlebackgroundopacity="100" titlebackgroundimageattachment="scroll" titlebackgroundimagerepeat="no-repeat" titlebackgroundimagesize="auto" titlecolor="#ffffff" titlebordertopstyle="solid" titleborderrightstyle="solid" titleborderbottomstyle="solid" titleborderleftstyle="solid" titlebordersstyle="solid" titleshadowopacity="50" titleshadowinset="0" fieldslist="titlebackgroundcolorstart,titlebackgroundpositionend,titlebackgrounddirection,titlebackgroundopacity,titlebackgroundimageattachment,titlebackgroundimagerepeat,titlebackgroundimagesize,titlecolor,titlealignementleft,titlealignementcenter,titlealignementright,titlealignementjustify,titlebordertopstyle,titleborderrightstyle,titleborderbottomstyle,titleborderleftstyle,titlebordersstyle,titleshadowopacity,titleshadowinset"></div>
<div class="tab_descstyles ckprops" descbackgroundcolorstart="#222222" descbackgroundpositionend="100" descbackgrounddirection="topbottom" descbackgroundopacity="100" descbackgroundimageattachment="scroll" descbackgroundimagerepeat="no-repeat" descbackgroundimagesize="auto" desccolor="#ffffff" descbordertopstyle="solid" descborderrightstyle="solid" descborderbottomstyle="solid" descborderleftstyle="solid" descbordersstyle="solid" descshadowopacity="50" descshadowinset="0" fieldslist="descbackgroundcolorstart,descbackgroundpositionend,descbackgrounddirection,descbackgroundopacity,descbackgroundimageattachment,descbackgroundimagerepeat,descbackgroundimagesize,desccolor,descalignementleft,descalignementcenter,descalignementright,descalignementjustify,descbordertopstyle,descborderrightstyle,descborderbottomstyle,descborderleftstyle,descbordersstyle,descshadowopacity,descshadowinset"></div>
<div class="ckstyle">
<style>
#<?php echo $id; ?> .pbck_slide_title {
background-color: #222222;
background-color: rgba(34,34,34,1);
color: #ffffff;
}
#<?php echo $id; ?> .pbck_slide_desc {
background-color: #222222;
background-color: rgba(34,34,34,1);
color: #ffffff;
}
#<?php echo $id; ?> .titleck {
background-color: #222222;
background-color: rgba(34,34,34,1);
color: #ffffff;
}
#<?php echo $id; ?> .pbck_slide_thumb { width : 150px; height: 150px;}
#<?php echo $id; ?> .pbck_wrap_thumbs { width : calc(0 * 150px + -5px); height: 150px;}
</style>
</div>
<div class="pbck_slider inner">
<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 Joomlack</div>
</figcaption>
<img class="pbck_slide_img" src="<?php echo \Joomla\CMS\Uri\Uri::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 \Joomla\CMS\Uri\Uri::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 \Joomla\CMS\Uri\Uri::root(true); ?>/plugins/pagebuilderck/slider/assets/images/slide3.jpg">
</figure>
</div>
</div>
<div class="pbck_slider_controls">
<div class="pbck_slider_control control_next"></div>
<div class="pbck_slider_control control_prev"></div>
</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) {
$this->callAssets();
// replace the readmore for multilanguage
foreach ($item->find('.pbck_slide_link_button') as $e) {
$e->innertext = \Joomla\CMS\Language\Text::_('PLG_PAGEBUILDERCK_BLOG_READMORE');
}
$html = $item->innertext;
return $html;
}
}