| 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/maitricfuz/www/new-saint-martin/plugins/pagebuilderck/carousel/ |
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 plgPagebuilderckCarousel extends \Joomla\CMS\Plugin\CMSPlugin {
private $context = 'PLG_PAGEBUILDERCK_CAROUSEL';
private $type = 'carousel';
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/carousel/assets/carousel.css');
if (file_exists(JPATH_ROOT . '/media/com_pagebuilderck/presets/carousel/presets.css')) PagebuilderckFrontHelper::addStylesheet(\Joomla\CMS\Uri\Uri::root(true) . '/media/com_pagebuilderck/presets/carousel/presets.css');
$doc->addScript(\Joomla\CMS\Uri\Uri::root(true) . '/plugins/pagebuilderck/carousel/assets/carousel.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/carousel/assets/images/carousel.svg';
return $menuitem;
}
/*
* Display the html code for the item to be used into the interface
*
* Return String the html code
*/
public function onPagebuilderckLoadItemContentCarousel() {
$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_carousel_init(jQuery(this).attr('id'));">
<div class="tab_carouseloptions ckprops" nbcols="3" thumbs="0" autolinkimages0="checked" uselightbox0="checked" showlightboxtitle0="checked" showlightboxdesc0="checked" fieldslist="nbcols,thumbs,autolinkimages1,autolinkimages0,uselightbox1,uselightbox0,showlightboxtitle1,showlightboxtitle0,showlightboxdesc1,showlightboxdesc0"></div>
<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_wrapinner {
width: calc(100% * 3 + 2 * 10px);
}
#<?php echo $id; ?> .pbck_slide {
width: calc((100% - (8 * 10px)) / (9));
}
#<?php echo $id; ?> .pbck_slide:not(:first-child) {
margin-left: 10px;
}
#<?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_carousel 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 Carousel</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/carousel/assets/images/picsum-photo-1.jpg">
</figure>
<figure class="pbck_slide">
<figcaption class="pbck_slide_caption">
<div class="pbck_slide_title">Random images</div>
<br />
<div class="pbck_slide_desc">https://picsum.photos/</div>
</figcaption>
<img class="pbck_slide_img" src="<?php echo \Joomla\CMS\Uri\Uri::root(true); ?>/plugins/pagebuilderck/carousel/assets/images/picsum-photo-2.jpg">
</figure>
<figure class="pbck_slide">
<figcaption class="pbck_slide_caption">
<div class="pbck_slide_title">Nice Images Carousel</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/carousel/assets/images/picsum-photo-3.jpg">
</figure>
<figure class="pbck_slide">
<figcaption class="pbck_slide_caption">
<div class="pbck_slide_title">Nice Images Carousel</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/carousel/assets/images/picsum-photo-4.jpg">
</figure>
<figure class="pbck_slide">
<figcaption class="pbck_slide_caption">
<div class="pbck_slide_title">Nice Images Carousel</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/carousel/assets/images/picsum-photo-5.jpg">
</figure>
<figure class="pbck_slide">
<figcaption class="pbck_slide_caption">
<div class="pbck_slide_title">Nice Images Carousel</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/carousel/assets/images/picsum-photo-6.jpg">
</figure>
<figure class="pbck_slide">
<figcaption class="pbck_slide_caption">
<div class="pbck_slide_title">Nice Images Carousel</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/carousel/assets/images/picsum-photo-7.jpg">
</figure>
<figure class="pbck_slide">
<figcaption class="pbck_slide_caption">
<div class="pbck_slide_title">Nice Images Carousel</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/carousel/assets/images/picsum-photo-8.jpg">
</figure>
<figure class="pbck_slide">
<figcaption class="pbck_slide_caption">
<div class="pbck_slide_title">Nice Images Carousel</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/carousel/assets/images/picsum-photo-9.jpg">
</figure>
</div>
</div>
<div class="pbck_carousel_controls">
<div class="pbck_carousel_control control_next"></div>
<div class="pbck_carousel_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 onPagebuilderckLoadItemOptionsCarousel() {
// load the language files of the plugin
$this->loadLanguage();
// load the interface for the options
$tpl = JPATH_SITE . '/plugins/pagebuilderck/carousel/layouts/edit_carousel.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 onPagebuilderckRenderItemCarousel($item) {
$this->callAssets();
$html = $item->innertext;
return $html;
}
}