| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/tabs.php.tar |
home/wuectly/www/plugins/system/tabs/tabs.php 0000604 00000006504 15245573365 0015434 0 ustar 00 <?php
/**
* @package Tabs
* @version 8.0.1
*
* @author Peter van Westen <info@regularlabs.com>
* @link http://www.regularlabs.com
* @copyright Copyright © 2021 Regular Labs All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\Extension as RL_Extension;
use RegularLabs\Library\Html as RL_Html;
use RegularLabs\Library\Language as RL_Language;
use RegularLabs\Library\Plugin as RL_Plugin;
use RegularLabs\Library\Protect as RL_Protect;
use RegularLabs\Plugin\System\Tabs\Document;
use RegularLabs\Plugin\System\Tabs\Params;
use RegularLabs\Plugin\System\Tabs\Protect;
use RegularLabs\Plugin\System\Tabs\Replace;
// Do not instantiate plugin on install pages
// to prevent installation/update breaking because of potential breaking changes
$input = JFactory::getApplication()->input;
if (in_array($input->get('option'), ['com_installer', 'com_regularlabsmanager']) && $input->get('action') != '')
{
return;
}
if ( ! is_file(__DIR__ . '/vendor/autoload.php'))
{
return;
}
require_once __DIR__ . '/vendor/autoload.php';
if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
JFactory::getLanguage()->load('plg_system_tabs', __DIR__);
JFactory::getApplication()->enqueueMessage(
JText::sprintf('TAB_EXTENSION_CAN_NOT_FUNCTION', JText::_('TABS'))
. ' ' . JText::_('TAB_REGULAR_LABS_LIBRARY_NOT_INSTALLED'),
'error'
);
return;
}
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
if (! RL_Document::isJoomlaVersion(3, 'TABS'))
{
RL_Extension::disable('tabs', 'plugin');
RL_Language::load('plg_system_regularlabs');
JFactory::getApplication()->enqueueMessage(
JText::sprintf('RL_PLUGIN_HAS_BEEN_DISABLED', JText::_('TABS')),
'error'
);
return;
}
if (true)
{
class PlgSystemTabs extends RL_Plugin
{
public $_lang_prefix = 'TAB';
public $_has_tags = true;
public $_disable_on_components = true;
public $_jversion = 3;
public function processArticle(&$string, $area = 'article', $context = '', $article = null, $page = 0)
{
Replace::replaceTags($string, $area, $context);
}
protected function loadStylesAndScripts(&$buffer)
{
Document::addHeadStuff();
}
protected function changeDocumentBuffer(&$buffer)
{
return Replace::replaceTags($buffer, 'component');
}
protected function changeFinalHtmlOutput(&$html)
{
$params = Params::get();
list($tag_start, $tag_end) = Params::getTagCharacters();
if (
strpos($html, $tag_start . $params->tag_open) === false
&& strpos($html, 'rl_tabs-scrollto') === false
)
{
Document::removeHeadStuff($html);
return true;
}
// only do stuff in body
list($pre, $body, $post) = RL_Html::getBody($html);
Replace::replaceTags($body, 'body');
$html = $pre . $body . $post;
return true;
}
protected function cleanFinalHtmlOutput(&$html)
{
$params = Params::get();
Protect::unprotectTags($html);
RL_Protect::removeFromHtmlTagContent($html, Params::getTags(true));
RL_Protect::removeInlineComments($html, 'Tabs');
if ( ! $params->place_comments)
{
RL_Protect::removeCommentTags($html, 'Tabs');
}
}
}
}
home/wuectly/www/libraries/cms/html/tabs.php 0000604 00000006221 15245611116 0015157 0 ustar 00 <?php
/**
* @package Joomla.Libraries
* @subpackage HTML
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('JPATH_PLATFORM') or die;
/**
* Utility class for Tabs elements.
*
* @since 1.6
* @deprecated 3.7.0 These helpers are dependent on the deprecated MooTools support
*/
abstract class JHtmlTabs
{
/**
* Creates a panes and creates the JavaScript object for it.
*
* @param string $group The pane identifier.
* @param array $params An array of option.
*
* @return string
*
* @since 1.6
* @deprecated 3.7.0 These helpers are dependent on the deprecated MooTools support
*/
public static function start($group = 'tabs', $params = array())
{
static::loadBehavior($group, $params);
return '<dl class="tabs" id="' . $group . '"><dt style="display:none;"></dt><dd style="display:none;">';
}
/**
* Close the current pane
*
* @return string HTML to close the pane
*
* @since 1.6
* @deprecated 3.7.0 These helpers are dependent on the deprecated MooTools support
*/
public static function end()
{
return '</dd></dl>';
}
/**
* Begins the display of a new panel.
*
* @param string $text Text to display.
* @param string $id Identifier of the panel.
*
* @return string HTML to start a new panel
*
* @since 1.6
* @deprecated 3.7.0 These helpers are dependent on the deprecated MooTools support
*/
public static function panel($text, $id)
{
return '</dd><dt class="tabs ' . $id . '"><span><h3><a href="javascript:void(0);">' . $text . '</a></h3></span></dt><dd class="tabs">';
}
/**
* Load the JavaScript behavior.
*
* @param string $group The pane identifier.
* @param array $params Array of options.
*
* @return void
*
* @since 1.6
* @deprecated 3.7.0 These helpers are dependent on the deprecated MooTools support
*/
protected static function loadBehavior($group, $params = array())
{
static $loaded = array();
if (!array_key_exists((string) $group, $loaded))
{
// Include MooTools framework
JHtml::_('behavior.framework', true);
$opt['onActive'] = isset($params['onActive']) ? '\\' . $params['onActive'] : null;
$opt['onBackground'] = isset($params['onBackground']) ? '\\' . $params['onBackground'] : null;
$opt['display'] = isset($params['startOffset']) ? (int) $params['startOffset'] : null;
$opt['titleSelector'] = 'dt.tabs';
$opt['descriptionSelector'] = 'dd.tabs';
// When use storage is set and value is false - By default we allow to use storage
$opt['useStorage'] = !(isset($params['useCookie']) && !$params['useCookie']);
$options = JHtml::getJSObject($opt);
$js = ' window.addEvent(\'domready\', function(){
$$(\'dl#' . $group . '.tabs\').each(function(tabs){
new JTabs(tabs, ' . $options . ');
});
});';
$document = JFactory::getDocument();
$document->addScriptDeclaration($js);
JHtml::_('script', 'system/tabs.js', array('version' => 'auto', 'relative' => true));
$loaded[(string) $group] = true;
}
}
}
home/wuectly/www/plugins/editors-xtd/tabs/tabs.php 0000604 00000001307 15245662471 0016347 0 ustar 00 <?php
/**
* @package Tabs
* @version 8.0.1
*
* @author Peter van Westen <info@regularlabs.com>
* @link http://www.regularlabs.com
* @copyright Copyright © 2021 Regular Labs All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
use RegularLabs\Library\Document as RL_Document;
defined('_JEXEC') or die;
if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
return;
}
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
if ( ! RL_Document::isJoomlaVersion(3))
{
return;
}
if (true)
{
class PlgButtonTabs
extends \RegularLabs\Library\EditorButtonPlugin
{
var $require_core_auth = false;
}
}
home/wuectly/www/components/com_jce/editor/libraries/classes/tabs.php 0000604 00000013102 15245673552 0022150 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
final class WFTabs extends CMSObject
{
private $_tabs = array();
private $_panels = array();
private $_paths = array();
/**
* Constructor activating the default information of the class.
*/
public function __construct($config = array())
{
if (!array_key_exists('base_path', $config)) {
$config['base_path'] = WF_EDITOR_LIBRARIES;
}
$this->setProperties($config);
if (array_key_exists('template_path', $config)) {
$this->addTemplatePath($config['template_path']);
} else {
$this->addTemplatePath($this->get('base_path') . '/tmpl');
}
}
/**
* Returns a reference to a WFTabs object.
*
* This method must be invoked as:
* <pre> $tabs = WFTabs::getInstance();</pre>
*
* @return object WFTabs
*/
public static function getInstance($config = array())
{
static $instance;
if (!is_object($instance)) {
$instance = new self($config);
}
return $instance;
}
/**
* Add a template path.
*
* @param string $path
*/
public function addTemplatePath($path)
{
$this->_paths[] = $path;
}
/**
* Load a panel view.
*
* @param object $layout Layout (panel) name
*
* @return panel WFView object
*/
private function loadPanel($panel, $state)
{
$view = new WFView(array(
'name' => $panel,
'layout' => $panel,
));
// add tab paths
foreach ($this->_paths as $path) {
$view->addTemplatePath($path);
}
// assign panel state to view
$view->state = (int) $state;
return $view;
}
public function getPanel($panel)
{
if (array_key_exists($panel, $this->_panels)) {
return $this->_panels[$panel];
}
return false;
}
/**
* Add a tab to the document. A panel is automatically created and assigned.
*
* @param object $tab Tab name
* @param int $state Tab state (active or inactive)
* @param array $values An array of values to assign to panel view
*/
public function addTab($tab, $state = 1, $values = array())
{
if (!array_key_exists($tab, $this->_tabs)) {
$this->_tabs[$tab] = (int) $state === 1 ? $tab : '';
$panel = $this->addPanel($tab, $state);
// array is not empty and is associative
if (!empty($values) && array_values($values) !== $values) {
foreach ($values as $key => $value) {
$panel->$key = $value;
}
}
}
}
/**
* Add a panel to the document.
*
* @param object $panel Panel name
*/
public function addPanel($tab, $state)
{
if (!array_key_exists($tab, $this->_panels)) {
$this->_panels[$tab] = $this->loadPanel($tab, $state);
return $this->_panels[$tab];
}
}
/**
* Remove a tab from the document.
*
* @param object $tab Tab name
*/
public function removeTab($tab)
{
if (array_key_exists($tab, $this->_tabs)) {
unset($this->_tabs[$tab]);
}
}
/**
* Render the document tabs and panels.
*/
public function render()
{
$output = '';
if (!empty($this->_tabs)) {
$output .= '<div id="tabs">';
}
// add tabs
if (count($this->_tabs) > 1) {
$output .= '<ul class="uk-tab" role="tablist">' . "\n";
$x = 0;
foreach ($this->_tabs as $name => $tab) {
$class = '';
if ($x === 0) {
$class .= ' uk-active';
}
if (!$tab) {
$class .= ' uk-hidden';
}
$output .= "\t" . '<li role="presentation" aria-selected="false" class="' . $class . '"><button type="button" class="uk-button uk-button-link uk-button-tab" tabindex="-1" value="' . $name . '">' . Text::_('WF_TAB_' . strtoupper($name)) . '</button></li>' . "\n";
++$x;
}
$output .= "</ul>\n";
}
// add panels
if (!empty($this->_panels)) {
$x = 0;
$output .= '<div class="uk-switcher">';
foreach ($this->_panels as $key => $panel) {
$class = '';
if ($panel->state === 0) {
$class .= ' uk-hidden';
}
if (!empty($this->_tabs)) {
if ($x === 0) {
$class .= ' uk-active';
} else {
$class .= ' uk-tabs-hide';
}
}
$output .= '<div id="' . $key . '_tab" class="' . $class . '" role="tabpanel" aria-hidden="true">';
$output .= $panel->loadTemplate();
$output .= '</div>';
++$x;
}
$output .= '</div>';
}
// add closing div
if (!empty($this->_tabs)) {
$output .= "</div>\n";
}
echo $output;
}
}