Файловый менеджер - Редактировать - /home/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 } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка