first commit

This commit is contained in:
2026-02-08 21:16:11 +01:00
commit e17b7026fd
8881 changed files with 1160453 additions and 0 deletions

View File

@@ -0,0 +1,116 @@
<?php
/**
* @name Slider CK
* @package com_pagebuilderck
* @copyright Copyright (C) 2016. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
*/
// no direct access
defined('_JEXEC') or die;
if (!defined('PAGEBUILDERCK_MEDIA_URI'))
{
define('PAGEBUILDERCK_MEDIA_URI', JUri::root(true) . '/media/com_pagebuilderck');
}
$imagespath = PAGEBUILDERCK_MEDIA_URI .'/images/';
$input = JFactory::getApplication()->input;
$fieldid = $input->get('fieldid', '', 'string');
JHtml::_('jquery.framework');
$doc = JFactory::getDocument();
$doc->addStylesheet(PAGEBUILDERCK_MEDIA_URI . '/assets/ckbrowse.css');
$doc->addScript(PAGEBUILDERCK_MEDIA_URI . '/assets/ckbrowse.js');
?>
<h3><?php echo JText::_('CK_MENU_ITEMS') ?></h3>
<p><?php echo JText::_('CK_MENU_ITEMS_DESC') ?></p>
<div class="ckfoldertreelist" style="width:90%">
<?php
// Access filter
$com_path = JPATH_SITE . '/components/com_content/';
JLoader::register('ContentHelperRoute', $com_path . 'helpers/route.php');
$access = !JComponentHelper::getParams('com_content')->get('show_noauth');
$authorised = JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id'));
foreach ($this->articles as $item) {
// check if category or article
if ($item->type == 'article') {
$item->slug = $item->id . ':' . $item->alias;
if ($access || in_array($item->access, $authorised))
{
// We know that user has the privilege to view the article
$item->link = ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language);
} else {
continue;
}
} else {
if ($access || in_array($item->access, $authorised))
{
$item->link = ContentHelperRoute::getCategoryRoute($item->id);
} else {
continue;
}
}
?>
<div class="ckfoldertree parent">
<div class="ckfoldertreetoggler" onclick="ckLinksArticlesToggleTreeSub(this, <?php echo $item->id; ?>)" data-id="<?php echo $item->id; ?>"></div>
<div class="ckfoldertreename hasTip" title="<?php echo $item->link ?>" onclick="ckSetLinksArticlesUrl('<?php echo $item->link ?>')"><span class="icon-folder"></span><?php echo PagebuilderckHelper::utf8_encode($item->title); ?></div>
</div>
<?php
}
?>
</div>
<script>
var $ck = window.$ck || jQuery.noConflict();
var URIROOT = window.URIROOT || '<?php echo JUri::root(true) ?>';
var URIBASE = window.URIBASE || '<?php echo JUri::base(true) ?>';
var cktoken = '<?php echo JSession::getFormToken() ?>';
//ckMakeTooltip();
function ckLinksArticlesToggleTreeSub(btn, parentid) {
var item = $ck(btn).parent();
if (item.hasClass('ckopened')) {
item.removeClass('ckopened');
} else {
item.addClass('ckopened');
// load only the items if not already there
if (! item.find('.cksubfolder').length) {
// var parentid = $ck(btn).attr('data-id');
ckLinksArticlesShowItems(btn, parentid);
}
}
}
function ckLinksArticlesShowItems(btn, parentid) {
if ($ck(btn).hasClass('empty')) return;
ckAddWaitIcon(btn);
var item = $ck(btn).parent();
// ajax call to code and return items layout
var myurl = PAGEBUILDERCK.URIPBCK + "&task=links.ajaxShowArticles&" + PAGEBUILDERCK.TOKEN;
$ck.ajax({
type: "POST",
url: myurl,
data: {
// menutype: menutype,
parentid: parentid
}
}).done(function(code) {
if (code.trim().length == 0) {
$ck(btn).css('opacity', 0).addClass('empty');
} else {
item.append(code);
ckInitTooltips();
}
ckRemoveWaitIcon(btn);
}).fail(function() {
alert(Joomla.JText._('CK_FAILED', 'Failed'));
});
}
function ckSetLinksArticlesUrl(url) {
window.parent.document.getElementById('<?php echo $fieldid ?>').value = url;
$ck(window.parent.document.getElementById('<?php echo $fieldid ?>')).trigger('change');
window.parent.CKBox.close('#ckfilesmodal .ckboxmodal-button');
}
</script>

View File

@@ -0,0 +1,86 @@
<?php
// no direct access
defined('_JEXEC') or die;
use Pagebuilderck\CKFof;
if (!defined('PAGEBUILDERCK_MEDIA_URI'))
{
define('PAGEBUILDERCK_MEDIA_URI', JUri::root(true) . '/media/com_pagebuilderck');
}
$imagespath = PAGEBUILDERCK_MEDIA_URI .'/images/';
$input = JFactory::getApplication()->input;
$fieldid = $input->get('fieldid', '', 'string');
$type = $input->get('type', 'all', 'string');
$folder = $this->input->get('folder', '', 'string');
JHtml::_('jquery.framework');
$doc = JFactory::getDocument();
$doc->addStylesheet(PAGEBUILDERCK_MEDIA_URI . '/assets/ckbrowse.css');
$doc->addScript(PAGEBUILDERCK_MEDIA_URI . '/assets/ckbrowse.js');
?>
<link rel="stylesheet" href="<?php echo PAGEBUILDERCK_MEDIA_URI ?>/assets/pagebuilderck.css?ver=<?php echo PAGEBUILDERCK_VERSION ?>" type="text/css" />
<div id="maincktabcontent">
<?php if ($type !== 'image') { ?>
<div class="mainmenulink menulink <?php echo ($type !== 'image' ? 'current' : '') ?>" tab="tab_menus"><h3><?php echo JText::_('CK_MENUS'); ?></h3></div>
<div class="mainmenulink menulink" tab="tab_articles"><h3><?php echo JText::_('CK_ARTICLES'); ?></h3></div>
<?php } ?>
<div class="mainmenulink menulink <?php echo ($type === 'image' ? 'current' : '') ?>" tab="tab_files"><h3><?php echo JText::_('CK_FILES'); ?></h3></div>
<?php if (CKFof::userCan('core.pixabay')) { ?>
<div class="mainmenulink menulink" tab="tab_pixabay"><h3><?php echo JText::_('Pixabay'); ?></h3></div>
<?php } ?>
<div class="clr"></div>
<?php if ($type !== 'image') { ?>
<div class="maintab <?php echo ($type !== 'image' ? 'current' : '') ?>" id="tab_menus">
<?php
require_once PAGEBUILDERCK_PATH . '/views/menus/tmpl/default.php';
?>
</div>
<div class="maintab" id="tab_articles">
<?php
if (PagebuilderckHelper::getParams()) {
include PAGEBUILDERCK_PATH . '/views/links/tmpl/articles.php';
} else {
echo PagebuilderckHelper::showParamsMessage();
}
?>
</div>
<?php } ?>
<div class="maintab <?php echo ($type === 'image' ? 'current' : '') ?>" id="tab_files">
<?php
include PAGEBUILDERCK_PATH . '/views/browse/tmpl/default.php';
?>
<?php /*<iframe style="width:100%;height:100vh;" src="<?php echo JUri::root(true) . '/administrator/index.php?option=com_media&view=media&e_name=' . $fieldid . '&tmpl=component'; ?>"></iframe>*/ ?>
</div>
<?php if (CKFof::userCan('core.pixabay')) { ?>
<div class="maintab" id="tab_pixabay">
<?php
if (PagebuilderckHelper::getParams()) {
include PAGEBUILDERCK_PATH . '/views/pixabay/tmpl/default.php';
} else {
echo PagebuilderckHelper::showParamsMessage();
}
?>
</div>
<?php } ?>
</div>
<script>
var $ck = window.$ck || jQuery.noConflict();
$ck('#maincktabcontent div.maintab:not(.current)').hide();
$ck('.mainmenulink', $ck('#maincktabcontent')).each(function(i, tab) {
$ck(tab).click(function() {
if ($ck('#popup_favoriteck').length) {
ckCloseFavoritePopup(true);
}
$ck('#maincktabcontent div.maintab').hide();
$ck('.mainmenulink', $ck('#maincktabcontent')).removeClass('current');
if ($ck('#' + $ck(tab).attr('tab')).length)
$ck('#' + $ck(tab).attr('tab')).show();
$ck(this).addClass('current');
});
});
</script>

View File

@@ -0,0 +1 @@
<html><body></body></html>