| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/modules.php.tar |
home/wuectly/www/components/com_modules/modules.php 0000604 00000001707 15245551706 0016703 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_modules
*
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Load the required admin language files
$lang = JFactory::getLanguage();
$app = JFactory::getApplication();
$config = array();
$lang->load('com_modules', JPATH_ADMINISTRATOR);
if ($app->input->get('view') === 'modules' && $app->input->get('layout') === 'modal')
{
if (!JFactory::getUser()->authorise('core.create', 'com_modules'))
{
$app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'warning');
return;
}
}
if ($app->input->get('task') === 'module.orderPosition')
{
$config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
}
// Trigger the controller
$controller = JControllerLegacy::getInstance('Modules', $config);
$controller->execute($app->input->get('task'));
$controller->redirect();
home/wuectly/www/administrator/templates/isis/html/modules.php 0000604 00000004030 15245571347 0020774 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage Templates.isis
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* This is a file to add template specific chrome to module rendering. To use it you would
* set the style attribute for the given module(s) include in your template to use the style
* for each given modChrome function.
*
* eg. To render a module mod_test in the submenu style, you would use the following include:
* <jdoc:include type="module" name="test" style="submenu" />
*
* This gives template designers ultimate control over how modules are rendered.
*
* NOTICE: All chrome wrapping methods should be named: modChrome_{STYLE} and take the same
* two arguments.
*/
/*
* Module chrome for rendering the module in a submenu
*/
function modChrome_title($module, &$params, &$attribs)
{
if ($module->content)
{
echo '<div class="module-title"><h6>' . $module->title . '</h6></div>';
echo $module->content;
}
}
function modChrome_no($module, &$params, &$attribs)
{
if ($module->content)
{
echo $module->content;
}
}
function modChrome_well($module, &$params, &$attribs)
{
if ($module->content)
{
$moduleTag = $params->get('module_tag', 'div');
$bootstrapSize = (int) $params->get('bootstrap_size');
$moduleClass = $bootstrapSize ? ' span' . $bootstrapSize : '';
$headerTag = htmlspecialchars($params->get('header_tag', 'h2'), ENT_COMPAT, 'UTF-8');
// Temporarily store header class in variable
$headerClass = $params->get('header_class');
$headerClass = $headerClass ? ' ' . htmlspecialchars($headerClass, ENT_COMPAT, 'UTF-8') : '';
echo '<' . $moduleTag . ' class="well well-small' . $moduleClass . '">';
if ($module->showtitle)
{
echo '<' . $headerTag . ' class="module-title nav-header' . $headerClass . '">' . $module->title . '</' . $headerTag . '>';
}
echo $module->content;
echo '</' . $moduleTag . '>';
}
}
home/wuectly/www/components/com_config/model/modules.php 0000604 00000015022 15245572100 0017562 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_config
*
* @copyright (C) 2014 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Config Module model.
*
* @since 3.2
*/
class ConfigModelModules extends ConfigModelForm
{
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
* @since 3.2
*/
protected function populateState()
{
$app = JFactory::getApplication('administrator');
// Load the User state.
$pk = $app->input->getInt('id');
$state = $this->loadState();
$state->set('module.id', $pk);
$this->setState($state);
}
/**
* Method to get the record form.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return JForm A JForm object on success, false on failure
*
* @since 3.2
*/
public function getForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm('com_config.modules', 'modules', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
{
return false;
}
$form->setFieldAttribute('position', 'client', 'site');
return $form;
}
/**
* Method to preprocess the form
*
* @param JForm $form A form object.
* @param mixed $data The data expected for the form.
* @param string $group The name of the plugin group to import (defaults to "content").
*
* @return void
*
* @since 3.2
* @throws Exception if there is an error loading the form.
*/
protected function preprocessForm(JForm $form, $data, $group = 'content')
{
jimport('joomla.filesystem.path');
$lang = JFactory::getLanguage();
$module = $this->getState()->get('module.name');
$basePath = JPATH_BASE;
$formFile = JPath::clean($basePath . '/modules/' . $module . '/' . $module . '.xml');
// Load the core and/or local language file(s).
$lang->load($module, $basePath, null, false, true)
|| $lang->load($module, $basePath . '/modules/' . $module, null, false, true);
if (file_exists($formFile))
{
// Get the module form.
if (!$form->loadFile($formFile, false, '//config'))
{
throw new Exception(JText::_('JERROR_LOADFILE_FAILED'));
}
// Attempt to load the xml file.
if (!$xml = simplexml_load_file($formFile))
{
throw new Exception(JText::_('JERROR_LOADFILE_FAILED'));
}
}
// Load the default advanced params
JForm::addFormPath(JPATH_BASE . '/components/com_config/model/form');
$form->loadFile('modules_advanced', false);
// Trigger the default form events.
parent::preprocessForm($form, $data, $group);
}
/**
* Method to get list of module positions in current template
*
* @return array
*
* @since 3.2
*/
public function getPositions()
{
$lang = JFactory::getLanguage();
$templateName = JFactory::getApplication()->getTemplate();
// Load templateDetails.xml file
$path = JPath::clean(JPATH_BASE . '/templates/' . $templateName . '/templateDetails.xml');
$currentTemplatePositions = array();
if (file_exists($path))
{
$xml = simplexml_load_file($path);
if (isset($xml->positions[0]))
{
// Load language files
$lang->load('tpl_' . $templateName . '.sys', JPATH_BASE, null, false, true)
|| $lang->load('tpl_' . $templateName . '.sys', JPATH_BASE . '/templates/' . $templateName, null, false, true);
foreach ($xml->positions[0] as $position)
{
$value = (string) $position;
$text = preg_replace('/[^a-zA-Z0-9_\-]/', '_', 'TPL_' . strtoupper($templateName) . '_POSITION_' . strtoupper($value));
// Construct list of positions
$currentTemplatePositions[] = self::createOption($value, JText::_($text) . ' [' . $value . ']');
}
}
}
$templateGroups = array();
// Add an empty value to be able to deselect a module position
$option = self::createOption();
$templateGroups[''] = self::createOptionGroup('', array($option));
$templateGroups[$templateName] = self::createOptionGroup($templateName, $currentTemplatePositions);
// Add custom position to options
$customGroupText = JText::_('COM_MODULES_CUSTOM_POSITION');
$editPositions = true;
$customPositions = self::getActivePositions(0, $editPositions);
$templateGroups[$customGroupText] = self::createOptionGroup($customGroupText, $customPositions);
return $templateGroups;
}
/**
* Get a list of modules positions
*
* @param integer $clientId Client ID
* @param boolean $editPositions Allow to edit the positions
*
* @return array A list of positions
*
* @since 3.6.3
*/
public static function getActivePositions($clientId, $editPositions = false)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('DISTINCT position')
->from($db->quoteName('#__modules'))
->where($db->quoteName('client_id') . ' = ' . (int) $clientId)
->order($db->quoteName('position'));
$db->setQuery($query);
try
{
$positions = $db->loadColumn();
$positions = is_array($positions) ? $positions : array();
}
catch (RuntimeException $e)
{
JError::raiseWarning(500, $e->getMessage());
return;
}
// Build the list
$options = array();
foreach ($positions as $position)
{
if (!$position && !$editPositions)
{
$options[] = JHtml::_('select.option', 'none', ':: ' . JText::_('JNONE') . ' ::');
}
else
{
$options[] = JHtml::_('select.option', $position, $position);
}
}
return $options;
}
/**
* Create and return a new Option
*
* @param string $value The option value [optional]
* @param string $text The option text [optional]
*
* @return object The option as an object (stdClass instance)
*
* @since 3.6.3
*/
private static function createOption($value = '', $text = '')
{
if (empty($text))
{
$text = $value;
}
$option = new stdClass;
$option->value = $value;
$option->text = $text;
return $option;
}
/**
* Create and return a new Option Group
*
* @param string $label Value and label for group [optional]
* @param array $options Array of options to insert into group [optional]
*
* @return array Return the new group as an array
*
* @since 3.6.3
*/
private static function createOptionGroup($label = '', $options = array())
{
$group = array();
$group['value'] = $label;
$group['text'] = $label;
$group['items'] = $options;
return $group;
}
}
home/wuectly/www/plugins/system/t3/base/html/modules.php 0000604 00000015430 15245606723 0017417 0 ustar 00 <?php
/**
*------------------------------------------------------------------------------
* @package T3 Framework for Joomla!
*------------------------------------------------------------------------------
* @copyright Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @authors JoomlArt, JoomlaBamboo, (contribute to this project at github
* & Google group to become co-author)
* @Google group: https://groups.google.com/forum/#!forum/t3fw
* @Link: http://t3-framework.org
*------------------------------------------------------------------------------
*/
defined('_JEXEC') or die('Restricted access');
/**
* This is a file to add template specific chrome to module rendering. To use it you would
* set the style attribute for the given module(s) include in your template to use the style
* for each given modChrome function.
*
* eg. To render a module mod_test in the sliders style, you would use the following include:
* <jdoc:include type="module" name="test" style="slider" />
*
* This gives template designers ultimate control over how modules are rendered.
*
* NOTICE: All chrome wrapping methods should be named: modChrome_{STYLE} and take the same
* three arguments.
*/
/*
* Default Module Chrome that has sematic markup and has best SEO support
*/
function modChrome_T3Xhtml($module, &$params, &$attribs)
{
$badge = !empty($params->get('moduleclass_sfx')) && preg_match('/badge/', $params->get('moduleclass_sfx'))
? '<span class="badge"> </span>' : '';
$moduleTag = htmlspecialchars($params->get('module_tag', 'div'));
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'));
$headerClass = $params->get('header_class');
$bootstrapSize = $params->get('bootstrap_size');
$moduleClass = !empty($bootstrapSize) ? ' span' . (int) $bootstrapSize . '' : '';
$moduleClassSfx = !empty($params->get('moduleclass_sfx'))
? htmlspecialchars($params->get('moduleclass_sfx')) : '';
if (!empty ($module->content)) {
$html = "<{$moduleTag} class=\"t3-module module{$moduleClassSfx} {$moduleClass}\" id=\"Mod{$module->id}\">" .
"<div class=\"module-inner\">" . $badge;
if ($module->showtitle != 0) {
$html .= "<{$headerTag} class=\"module-title {$headerClass}\"><span>{$module->title}</span></{$headerTag}>";
}
$html .= "<div class=\"module-ct\">{$module->content}</div></div></{$moduleTag}>";
echo $html;
}
}
function modChrome_t3tabs($module, $params, $attribs)
{
$area = isset($attribs['id']) ? (int) $attribs['id'] :'1';
$area = 'area-'.$area;
static $modulecount;
static $modules;
if ($modulecount < 1) {
$modulecount = count(JModuleHelper::getModules($attribs['name']));
$modules = array();
}
if ($modulecount == 1) {
$temp = new stdClass;
$temp->content = $module->content;
$temp->title = $module->title;
$temp->params = $module->params;
$temp->id = $module->id;
$modules[] = $temp;
// list of moduletitles
echo '<ul class="nav nav-tabs" id="tab'.$temp->id .'">';
foreach($modules as $rendermodule) {
echo '<li><a data-toggle="tab" href="#module-'.$rendermodule->id.'" >'.$rendermodule->title.'</a></li>';
}
echo '</ul>';
echo '<div class="tab-content">';
$counter = 0;
// modulecontent
foreach($modules as $rendermodule) {
$counter ++;
echo '<div class="tab-pane fade in" id="module-'.$rendermodule->id.'">';
echo $rendermodule->content;
echo '</div>';
}
echo '</div>';
echo '<script type="text/javascript">';
echo 'jQuery(document).ready(function(){';
echo 'jQuery("#tab'.$temp->id.' a:first").tab("show")';
echo '});';
echo '</script>';
$modulecount--;
} else {
$temp = new stdClass;
$temp->content = $module->content;
$temp->params = $module->params;
$temp->title = $module->title;
$temp->id = $module->id;
$modules[] = $temp;
$modulecount--;
}
}
function modChrome_t3slider($module, &$params, &$attribs)
{
$badge = !empty($params->get('moduleclass_sfx')) && preg_match ('/badge/', $params->get('moduleclass_sfx'))?"<span class=\"badge\"> </span>\n":"";
$headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
?>
<div class="moduleslide-<?php echo $module->id ?> collapse-trigger collapsed" data-toggle="collapse" data-target="#slidecontent-<?php echo $module->id ?>">
<h<?php echo $headerLevel; ?>><span><?php echo $module->title; ?></span></h<?php echo $headerLevel; ?>>
</div>
<div id="slidecontent-<?php echo $module->id ?>" class="collapse-<?php echo $module->id ?> in"><?php echo $module->content; ?></div>
<script type="text/javascript">;
jQuery(document).ready(function(){;
jQuery(".collapse-<?php echo $module->id ?>").collapse({toggle: 1});
});
</script>
<?php
}
function modChrome_t3modal($module, &$params, &$attribs)
{
$headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
if (!empty ($module->content)) : ?>
<div class="moduletable <?php echo $params->get('moduleclass_sfx'); ?> modalmodule">
<div class="t3-module-title">
<a href="#module<?php echo $module->id ?>" role="button" class="btn" data-toggle="modal">
<h<?php echo $headerLevel; ?>><span><?php echo $module->title; ?></span></h<?php echo $headerLevel; ?>>
</a>
</div>
<div id="module<?php echo $module->id ?>" class="modal hide fade" aria-hidden="true">
<div class="modal-header">
<h<?php echo $headerLevel; ?>><span><?php echo $module->title; ?></span></h<?php echo $headerLevel; ?>>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="t3-module-body">
<?php echo $module->content; ?>
</div>
</div>
</div>
<?php endif;
}
function modChrome_popover($module, &$params, &$attribs)
{
$position = !empty($params->get('moduleclass_sfx')) && preg_match ('/left/', $params->get('moduleclass_sfx'))?"":"";
$headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
if (!empty ($module->content)) : ?>
<div class="moduletable <?php echo $params->get('moduleclass_sfx'); ?> popovermodule">
<a id="popover<?php echo $module->id ?>" href="#" rel="popover" data-placement="right" class="btn">
<h<?php echo $headerLevel; ?>><span><?php echo $module->title; ?></span></h<?php echo $headerLevel; ?>>
</a>
<div id="popover_content_wrapper-<?php echo $module->id ?>" style="display: none">
<div><?php echo $module->content; ?></div>
</div>
<script type="text/javascript">;
jQuery(document).ready(function(){
jQuery("#popover<?php echo $module->id ?>").popover({
html: true,
content: function() {
return jQuery('#popover_content_wrapper-<?php echo $module->id ?>').html();
}
}).click(function(e) {
e.preventDefault();
});
});
</script>
</div>
<?php endif;
} home/wuectly/www/administrator/components/com_modules/modules.php 0000604 00000001340 15245615150 0021546 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_modules
*
* @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('behavior.tabstate');
$user = JFactory::getUser();
$input = JFactory::getApplication()->input;
if (($input->get('layout') !== 'modal' && $input->get('view') !== 'modules')
&& !$user->authorise('core.manage', 'com_modules'))
{
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}
$controller = JControllerLegacy::getInstance('Modules');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();
home/wuectly/www/templates/protostar/html/modules.php 0000604 00000003521 15245617074 0017204 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Templates.protostar
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* This is a file to add template specific chrome to module rendering. To use it you would
* set the style attribute for the given module(s) include in your template to use the style
* for each given modChrome function.
*
* eg. To render a module mod_test in the submenu style, you would use the following include:
* <jdoc:include type="module" name="test" style="submenu" />
*
* This gives template designers ultimate control over how modules are rendered.
*
* NOTICE: All chrome wrapping methods should be named: modChrome_{STYLE} and take the same
* two arguments.
*/
/*
* Module chrome for rendering the module in a submenu
*/
function modChrome_no($module, &$params, &$attribs)
{
if ($module->content)
{
echo $module->content;
}
}
function modChrome_well($module, &$params, &$attribs)
{
$moduleTag = htmlspecialchars($params->get('module_tag', 'div'), ENT_QUOTES, 'UTF-8');
$bootstrapSize = (int) $params->get('bootstrap_size', 0);
$moduleClass = $bootstrapSize !== 0 ? ' span' . $bootstrapSize : '';
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$headerClass = htmlspecialchars($params->get('header_class', 'page-header'), ENT_COMPAT, 'UTF-8');
if ($module->content)
{
echo '<' . $moduleTag . ' class="well ' . htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8') . $moduleClass . '">';
if ($module->showtitle)
{
echo '<' . $headerTag . ' class="' . $headerClass . '">' . $module->title . '</' . $headerTag . '>';
}
echo $module->content;
echo '</' . $moduleTag . '>';
}
}
home/wuectly/www/administrator/templates/hathor/html/modules.php 0000604 00000002327 15245617234 0021315 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage Template.hathor
*
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* This is a file to add template specific chrome to module rendering. To use it you would
* set the style attribute for the given module(s) include in your template to use the style
* for each given modChrome function.
*
* eg. To render a module mod_test in the submenu style, you would use the following include:
* <jdoc:include type="module" name="test" style="submenu" />
*
* This gives template designers ultimate control over how modules are rendered.
*
* NOTICE: All chrome wrapping methods should be named: modChrome_{STYLE} and take the same
* two arguments.
*/
/*
* Module chrome for rendering the module in a submenu
*/
function modChrome_xhtmlid($module, &$params, &$attribs)
{
if ($module->content)
{
?>
<div id="<?php echo (int) $attribs['id'] ?>">
<?php echo $module->content; ?>
<div class="clr"></div>
</div>
<?php
} elseif ($attribs['id'] == 'submenu-box')
{
?>
<div id="no-submenu"></div>
<?php
}
}
?>
home/wuectly/www/templates/beez3/html/modules.php 0000604 00000007012 15245627647 0016165 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Templates.beez3
*
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* beezDivision chrome.
*
* @since 3.0
*/
function modChrome_beezDivision($module, &$params, &$attribs)
{
$headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
if (!empty ($module->content)) : ?>
<div class="moduletable<?php echo htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); ?>">
<?php if ($module->showtitle) : ?>
<h<?php echo $headerLevel; ?>><?php echo $module->title; ?></h<?php echo $headerLevel; ?>>
<?php endif; ?>
<?php echo $module->content; ?></div>
<?php endif;
}
/**
* beezHide chrome.
*
* @since 3.0
*/
function modChrome_beezHide($module, &$params, &$attribs)
{
$headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
$state = isset($attribs['state']) ? (int) $attribs['state'] : 0;
if (!empty ($module->content)) { ?>
<div
class="moduletable_js <?php echo htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');?>"><?php if ($module->showtitle) : ?>
<h<?php echo $headerLevel; ?> class="js_heading"> <?php echo $module->title; ?> <a href="#"
title="<?php echo JText::_('TPL_BEEZ3_CLICK'); ?>"
onclick="auf('module_<?php echo $module->id; ?>'); return false"
class="opencloselink" id="link_<?php echo $module->id?>"> <span
class="no"><img src="templates/beez3/images/plus.png"
alt="<?php if ($state === 1) { echo JText::_('TPL_BEEZ3_ALTOPEN');} else {echo JText::_('TPL_BEEZ3_ALTCLOSE');} ?>" />
</span></a></h<?php echo $headerLevel; ?>> <?php endif; ?>
<div class="module_content <?php if ($state === 1){echo 'open';} ?>"
id="module_<?php echo $module->id; ?>" tabindex="-1"><?php echo $module->content; ?></div>
</div>
<?php }
}
/**
* beezTabs chrome.
*
* @since 3.0
*/
function modChrome_beezTabs($module, $params, $attribs)
{
$area = isset($attribs['id']) ? (int) $attribs['id'] : '1';
$area = 'area-'.$area;
static $modulecount;
static $modules;
if ($modulecount < 1)
{
$modulecount = count(JModuleHelper::getModules($module->position));
$modules = array();
}
if ($modulecount === 1)
{
$temp = new stdClass;
$temp->content = $module->content;
$temp->title = $module->title;
$temp->params = $module->params;
$temp->id = $module->id;
$modules[] = $temp;
// list of moduletitles
// list of moduletitles
echo '<div id="'. $area.'" class="tabouter"><ul class="tabs">';
foreach ($modules as $rendermodule)
{
echo '<li class="tab"><a href="#" id="link_'.$rendermodule->id.'" class="linkopen" onclick="tabshow(\'module_'. $rendermodule->id.'\');return false">'.$rendermodule->title.'</a></li>';
}
echo '</ul>';
$counter = 0;
// modulecontent
foreach ($modules as $rendermodule)
{
$counter ++;
echo '<div tabindex="-1" class="tabcontent tabopen" id="module_'.$rendermodule->id.'">';
echo $rendermodule->content;
if ($counter !== count($modules))
{
echo '<a href="#" class="unseen" onclick="nexttab(\'module_'. $rendermodule->id.'\');return false;" id="next_'.$rendermodule->id.'">'.JText::_('TPL_BEEZ3_NEXTTAB').'</a>';
}
echo '</div>';
}
$modulecount--;
echo '</div>';
} else {
$temp = new stdClass;
$temp->content = $module->content;
$temp->params = $module->params;
$temp->title = $module->title;
$temp->id = $module->id;
$modules[] = $temp;
$modulecount--;
}
}
home/wuectly/www/templates/system/html/modules.php 0000604 00000012006 15245657521 0016472 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Template.system
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/*
* none (output raw module content)
*/
function modChrome_none($module, &$params, &$attribs)
{
echo $module->content;
}
/*
* html5 (chosen html5 tag and font header tags)
*/
function modChrome_html5($module, &$params, &$attribs)
{
$moduleTag = htmlspecialchars($params->get('module_tag', 'div'), ENT_QUOTES, 'UTF-8');
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$bootstrapSize = (int) $params->get('bootstrap_size', 0);
$moduleClass = $bootstrapSize !== 0 ? ' span' . $bootstrapSize : '';
// Temporarily store header class in variable
$headerClass = $params->get('header_class');
$headerClass = !empty($headerClass) ? ' class="' . htmlspecialchars($headerClass, ENT_COMPAT, 'UTF-8') . '"' : '';
if (!empty ($module->content)) : ?>
<<?php echo $moduleTag; ?> class="moduletable<?php echo htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8') . $moduleClass; ?>">
<?php if ((bool) $module->showtitle) :?>
<<?php echo $headerTag . $headerClass . '>' . $module->title; ?></<?php echo $headerTag; ?>>
<?php endif; ?>
<?php echo $module->content; ?>
</<?php echo $moduleTag; ?>>
<?php endif;
}
/*
* Module chrome that wraps the module in a table
*/
function modChrome_table($module, &$params, &$attribs)
{ ?>
<table cellpadding="0" cellspacing="0" class="moduletable<?php echo htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); ?>">
<?php if ((bool) $module->showtitle) : ?>
<tr>
<th>
<?php echo $module->title; ?>
</th>
</tr>
<?php endif; ?>
<tr>
<td>
<?php echo $module->content; ?>
</td>
</tr>
</table>
<?php
}
/*
* Module chrome that wraps the tabled module output in a <td> tag of another table
*/
function modChrome_horz($module, &$params, &$attribs)
{ ?>
<table cellspacing="1" cellpadding="0" width="100%">
<tr>
<td>
<?php modChrome_table($module, $params, $attribs); ?>
</td>
</tr>
</table>
<?php
}
/*
* xhtml (divs and font header tags)
* With the new advanced parameter it does the same as the html5 chrome
*/
function modChrome_xhtml($module, &$params, &$attribs)
{
$moduleTag = htmlspecialchars($params->get('module_tag', 'div'), ENT_QUOTES, 'UTF-8');
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$bootstrapSize = (int) $params->get('bootstrap_size', 0);
$moduleClass = $bootstrapSize !== 0 ? ' span' . $bootstrapSize : '';
// Temporarily store header class in variable
$headerClass = $params->get('header_class');
$headerClass = $headerClass ? ' class="' . htmlspecialchars($headerClass, ENT_COMPAT, 'UTF-8') . '"' : '';
if (!empty ($module->content)) : ?>
<<?php echo $moduleTag; ?> class="moduletable<?php echo htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8') . $moduleClass; ?>">
<?php if ((bool) $module->showtitle) : ?>
<<?php echo $headerTag . $headerClass . '>' . $module->title; ?></<?php echo $headerTag; ?>>
<?php endif; ?>
<?php echo $module->content; ?>
</<?php echo $moduleTag; ?>>
<?php endif;
}
/*
* Module chrome that allows for rounded corners by wrapping in nested div tags
*/
function modChrome_rounded($module, &$params, &$attribs)
{ ?>
<div class="module<?php echo htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); ?>">
<div>
<div>
<div>
<?php if ((bool) $module->showtitle) : ?>
<h3><?php echo $module->title; ?></h3>
<?php endif; ?>
<?php echo $module->content; ?>
</div>
</div>
</div>
</div>
<?php
}
/*
* Module chrome that add preview information to the module
*/
function modChrome_outline($module, &$params, &$attribs)
{
static $css = false;
if (!$css)
{
$css = true;
$doc = JFactory::getDocument();
$doc->addStyleDeclaration('
.mod-preview {
background: rgba(100,100,100,.08);
box-shadow: 0 0 0 4px #f4f4f4, 0 0 0 5px rgba(100,100,100,.2);
border-radius: 1px;
margin: 8px 0;
}
.mod-preview-info {
padding: 4px 6px;
margin-bottom: 5px;
font-family: Arial, sans-serif;
font-size: .75rem;
line-height: 1rem;
color: white;
background-color: #33373f;
border-radius: 3px;
box-shadow: 0 -10px 20px rgba(0,0,0,.2) inset;
}
.mod-preview-info span {
font-weight: bold;
color: #ccc;
}
.mod-preview-wrapper {
margin-bottom: .5rem;
}
');
}
?>
<div class="mod-preview">
<div class="mod-preview-info">
<div class="mod-preview-position">
<?php echo JText::sprintf('JGLOBAL_PREVIEW_POSITION', $module->position); ?>
</div>
<div class="mod-preview-style">
<?php echo JText::sprintf('JGLOBAL_PREVIEW_STYLE', $module->style); ?>
</div>
</div>
<div class="mod-preview-wrapper">
<?php echo $module->content; ?>
</div>
</div>
<?php
}
home/wuectly/www/libraries/regularlabs/fields/modules.php 0000604 00000013156 15245700471 0017731 0 ustar 00 <?php
/**
* @package Regular Labs Library
* @version 21.4.10972
*
* @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\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\Form as RL_Form;
use RegularLabs\Library\RegEx as RL_RegEx;
if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
return;
}
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
class JFormFieldRL_Modules extends \RegularLabs\Library\Field
{
public $type = 'Modules';
protected function getInput()
{
JHtml::_('behavior.modal', 'a.modal');
$size = $this->get('size') ? 'style="width:' . $this->get('size') . 'px"' : '';
$multiple = $this->get('multiple');
$showtype = $this->get('showtype');
$showid = $this->get('showid');
$showinput = $this->get('showinput');
$showlink = ! $multiple ? $this->get('showlink') : false;
// load the list of modules
$query = $this->db->getQuery(true)
->select('m.id, m.title, m.position, m.module, m.published, m.language')
->from('#__modules AS m')
->where('m.client_id = 0')
->where('m.published > -2')
->order('m.position, m.title, m.ordering, m.id');
$this->db->setQuery($query);
$modules = $this->db->loadObjectList();
// assemble menu items to the array
$options = [];
$selected_title = '';
$p = 0;
foreach ($modules as $item)
{
if ($p !== $item->position)
{
$pos = $item->position;
if ($pos == '')
{
$pos = ':: ' . JText::_('JNONE') . ' ::';
}
$options[] = JHtml::_('select.option', '-', '[ ' . $pos . ' ]', 'value', 'text', true);
}
$p = $item->position;
$item->title = $item->title;
if ($showtype)
{
$item->title .= ' [' . $item->module . ']';
}
if ($showinput || $showid)
{
$item->title .= ' [' . $item->id . ']';
}
if ($item->language && $item->language != '*')
{
$item->title .= ' (' . $item->language . ')';
}
$item->title = RL_Form::prepareSelectItem($item->title, $item->published);
$options[] = JHtml::_('select.option', $item->id, $item->title);
if ($showlink && $this->value == $item->id)
{
$selected_title = $item->title;
}
}
if ($showinput)
{
array_unshift($options, JHtml::_('select.option', '-', ' ', 'value', 'text', true));
array_unshift($options, JHtml::_('select.option', '-', '- ' . JText::_('Select Item') . ' -'));
if ($multiple)
{
$onchange = 'if ( this.value ) { if ( ' . $this->id . '.value ) { ' . $this->id . '.value+=\',\'; } ' . $this->id . '.value+=this.value; } this.value=\'\';';
}
else
{
$onchange = 'if ( this.value ) { ' . $this->id . '.value=this.value;' . $this->id . '_text.value=this.options[this.selectedIndex].innerHTML.replace( /^((&|&| )nbsp;|-)*/gm, \'\' ).trim(); } this.value=\'\';';
}
$attribs = 'class="inputbox" onchange="' . $onchange . '"';
$html = '<table cellpadding="0" cellspacing="0"><tr><td style="padding: 0px;">' . "\n";
if ( ! $multiple)
{
$val_name = $this->value;
if ($this->value)
{
foreach ($modules as $item)
{
if ($item->id == $this->value)
{
$val_name = $item->title;
if ($showtype)
{
$val_name .= ' [' . $item->module . ']';
}
$val_name .= ' [' . $this->value . ']';
break;
}
}
}
$html .= '<input type="text" id="' . $this->id . '_text" value="' . $val_name . '" class="inputbox" ' . $size . ' disabled="disabled">';
$html .= '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '" value="' . $this->value . '">';
}
else
{
$html .= '<input type="text" name="' . $this->name . '" id="' . $this->id . '" value="' . $this->value . '" class="inputbox" ' . $size . '>';
}
$html .= '</td><td style="padding: 0px;"padding-left: 5px;>' . "\n";
$html .= JHtml::_('select.genericlist', $options, '', $attribs, 'value', 'text', '', '');
$html .= '</td></tr></table>' . "\n";
}
else
{
$attr = $size;
$attr .= $multiple ? ' multiple="multiple"' : '';
$attr .= ' class="input-xxlarge"';
if ($showlink)
{
$link = '\'<a'
. ' href="index.php?option=com_advancedmodules&task=module.edit&id=\'+this.value+\'"'
. ' target="_blank" class="btn btn-small">\''
. '+\'<span class="icon-edit"></span>\' '
. '+\'' . JText::_('JACTION_EDIT', true) . ' :\' '
. '+(this.options[this.selectedIndex].text)'
. '+\'</a>\'';
$function = 'document.getElementById(\'module_link_' . $this->id . '\').innerHTML = \'\';'
. 'if(this.value){'
. 'document.getElementById(\'module_link_' . $this->id . '\').innerHTML = ' . $link . ';'
. '}';
$attr .= ' onchange="' . $function . '"';
}
$html = JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);
if ($showlink)
{
$link = $this->value
? '<a href="index.php?option=com_advancedmodules&task=module.edit&id=' . $this->value . '"'
. ' target="_blank" class="btn btn-small">'
. '<span class="icon-edit"></span> '
. JText::_('JACTION_EDIT') . ': ' . $selected_title
. '</a>'
: '';
$html .= '<div id="module_link_' . $this->id . '" class="alert-block">'
. $link
. '</div>';
}
$html = '<div class="input-maximize">' . $html . '</div>';
}
return RL_RegEx::replace('>\[\[\:(.*?)\:\]\]', ' style="\1">', $html);
}
}
home/wuectly/www/administrator/templates/system/html/modules.php 0000604 00000005415 15245703342 0021351 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage Template.system
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/*
* none (output raw module content)
*/
function modChrome_none($module, &$params, &$attribs)
{
echo $module->content;
}
/*
* html5 (chosen html5 tag and font header tags)
*/
function modChrome_html5($module, &$params, &$attribs)
{
$moduleTag = $params->get('module_tag');
$headerTag = htmlspecialchars($params->get('header_tag'), ENT_COMPAT, 'UTF-8');
$headerClass = $params->get('header_class');
$bootstrapSize = $params->get('bootstrap_size');
$moduleClass = !empty($bootstrapSize) ? ' span' . (int) $bootstrapSize . '' : '';
$moduleClassSfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
if (!empty ($module->content))
{
$html = "<{$moduleTag} class=\"moduletable{$moduleClassSfx} {$moduleClass}\">";
if ((bool) $module->showtitle)
{
$html .= "<{$headerTag} class=\"{$headerClass}\">{$module->title}</{$headerTag}>";
}
$html .= $module->content;
$html .= "</{$moduleTag}>";
echo $html;
}
}
/*
* xhtml (divs and font header tags)
* With the new advanced parameter it does the same as the html5 chrome
*/
function modChrome_xhtml($module, &$params, &$attribs)
{
$moduleTag = $params->get('module_tag', 'div');
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_COMPAT, 'UTF-8');
$bootstrapSize = (int) $params->get('bootstrap_size', 0);
$moduleClass = $bootstrapSize != 0 ? ' span' . $bootstrapSize : '';
// Temporarily store header class in variable
$headerClass = $params->get('header_class');
$headerClass = $headerClass ? ' class="' . htmlspecialchars($headerClass, ENT_COMPAT, 'UTF-8') . '"' : '';
$content = trim($module->content);
if (!empty ($content)) : ?>
<<?php echo $moduleTag; ?> class="module<?php echo htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8') . $moduleClass; ?>">
<?php if ($module->showtitle != 0) : ?>
<<?php echo $headerTag . $headerClass . '>' . $module->title; ?></<?php echo $headerTag; ?>>
<?php endif; ?>
<?php echo $content; ?>
</<?php echo $moduleTag; ?>>
<?php endif;
}
/*
* allows sliders
*/
function modChrome_sliders($module, &$params, &$attribs)
{
$content = trim($module->content);
if (!empty($content))
{
echo JHtml::_('sliders.panel', $module->title, 'module' . $module->id);
echo $content;
}
}
/*
* allows tabs
*/
function modChrome_tabs($module, &$params, &$attribs)
{
$content = trim($module->content);
if (!empty($content))
{
echo JHtml::_('tabs.panel', $module->title, 'module' . $module->id);
echo $content;
}
}