Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/modules.zip
Назад
PK Q~!]WÝ� � cancel.phpnu &1i� <?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; /** * Cancel Controller for module editing * * @package Joomla.Site * @subpackage com_config * @since 3.2 */ class ConfigControllerModulesCancel extends ConfigControllerCanceladmin { /** * Method to cancel module editing. * * @return boolean True on success. * * @since 3.2 */ public function execute() { // Check if the user is authorized to do this. $user = JFactory::getUser(); if (!$user->authorise('module.edit.frontend', 'com_modules.module.' . $this->input->get('id'))) { $this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR')); $this->app->redirect('index.php'); } $this->context = 'com_config.config.global'; // Get returnUri $returnUri = $this->input->post->get('return', null, 'base64'); if (!empty($returnUri)) { $this->redirect = base64_decode(urldecode($returnUri)); } else { $this->redirect = JUri::base(); } $id = $this->input->getInt('id'); // Access backend com_module JLoader::register('ModulesControllerModule', JPATH_ADMINISTRATOR . '/components/com_modules/controllers/module.php'); JLoader::register('ModulesViewModule', JPATH_ADMINISTRATOR . '/components/com_modules/views/module/view.json.php'); JLoader::register('ModulesModelModule', JPATH_ADMINISTRATOR . '/components/com_modules/models/module.php'); $cancelClass = new ModulesControllerModule; $cancelClass->cancel($id); parent::execute(); } } PK Q~!]j��_ _ display.phpnu &1i� <?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; /** * Display Controller for module editing * * @package Joomla.Site * @subpackage com_config * @since 3.2 */ class ConfigControllerModulesDisplay extends ConfigControllerDisplay { /** * Method to display module editing. * * @return boolean True on success, false on failure. * * @since 3.2 */ public function execute() { // Get the application $app = $this->getApplication(); // Get the document object. $document = JFactory::getDocument(); $viewName = $this->input->getWord('view', 'modules'); $viewFormat = $document->getType(); $layoutName = $this->input->getWord('layout', 'default'); $returnUri = $this->input->get->get('return', null, 'base64'); // Construct redirect URI if (!empty($returnUri)) { $redirect = base64_decode(urldecode($returnUri)); // Don't redirect to an external URL. if (!JUri::isInternal($redirect)) { $redirect = JUri::base(); } } else { $redirect = JUri::base(); } // Access backend com_module JLoader::register('ModulesController', JPATH_ADMINISTRATOR . '/components/com_modules/controller.php'); JLoader::register('ModulesViewModule', JPATH_ADMINISTRATOR . '/components/com_modules/views/module/view.json.php'); JLoader::register('ModulesModelModule', JPATH_ADMINISTRATOR . '/components/com_modules/models/module.php'); $displayClass = new ModulesController; // Get the parameters of the module with Id $document->setType('json'); // Execute backend controller if (!($serviceData = json_decode($displayClass->display(), true))) { $app->redirect($redirect); } // Reset params back after requesting from service $document->setType('html'); $app->input->set('view', $viewName); // Register the layout paths for the view $paths = new SplPriorityQueue; $paths->insert(JPATH_COMPONENT . '/view/' . $viewName . '/tmpl', 'normal'); $viewClass = 'ConfigView' . ucfirst($viewName) . ucfirst($viewFormat); $modelClass = 'ConfigModel' . ucfirst($viewName); if (class_exists($viewClass)) { $model = new $modelClass; // Access check. $user = JFactory::getUser(); if (!$user->authorise('module.edit.frontend', 'com_modules.module.' . $serviceData['id'])) { $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $app->redirect($redirect); } // Need to add module name to the state of model $model->getState()->set('module.name', $serviceData['module']); $view = new $viewClass($model, $paths); $view->setLayout($layoutName); // Push document object into the view. $view->document = $document; // Load form and bind data $form = $model->getForm(); if ($form) { $form->bind($serviceData); } // Set form and data to the view $view->form = &$form; $view->item = &$serviceData; // Render view. echo $view->render(); } return true; } } PK Q~!]��� � save.phpnu &1i� <?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; /** * Save Controller for module editing * * @package Joomla.Site * @subpackage com_config * @since 3.2 */ class ConfigControllerModulesSave extends JControllerBase { /** * Method to save module editing. * * @return boolean True on success. * * @since 3.2 */ public function execute() { // Check for request forgeries. if (!JSession::checkToken()) { $this->app->enqueueMessage(JText::_('JINVALID_TOKEN')); $this->app->redirect('index.php'); } // Check if the user is authorized to do this. $user = JFactory::getUser(); if (!$user->authorise('module.edit.frontend', 'com_modules.module.' . $this->input->get('id'))) { $this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $this->app->redirect('index.php'); } // Set FTP credentials, if given. JClientHelper::setCredentialsFromRequest('ftp'); // Get submitted module id $moduleId = '&id=' . $this->input->get('id'); // Get returnUri $returnUri = $this->input->post->get('return', null, 'base64'); $redirect = ''; if (!empty($returnUri)) { $redirect = '&return=' . $returnUri; } // Access backend com_modules to be done JLoader::register('ModulesControllerModule', JPATH_ADMINISTRATOR . '/components/com_modules/controllers/module.php'); JLoader::register('ModulesModelModule', JPATH_ADMINISTRATOR . '/components/com_modules/models/module.php'); $controllerClass = new ModulesControllerModule; // Get a document object $document = JFactory::getDocument(); // Set backend required params $document->setType('json'); // Execute backend controller $return = $controllerClass->save(); // Reset params back after requesting from service $document->setType('html'); // Check the return value. if ($return === false) { // Save the data in the session. $data = $this->input->post->get('jform', array(), 'array'); $this->app->setUserState('com_config.modules.global.data', $data); // Save failed, go back to the screen and display a notice. $this->app->enqueueMessage(JText::_('JERROR_SAVE_FAILED')); $this->app->redirect(JRoute::_('index.php?option=com_config&controller=config.display.modules' . $moduleId . $redirect, false)); } // Redirect back to com_config display $this->app->enqueueMessage(JText::_('COM_CONFIG_MODULES_SAVE_SUCCESS')); // Set the redirect based on the task. switch ($this->options[3]) { case 'apply': $this->app->redirect(JRoute::_('index.php?option=com_config&controller=config.display.modules' . $moduleId . $redirect, false)); break; case 'save': default: if (!empty($returnUri)) { $redirect = base64_decode(urldecode($returnUri)); // Don't redirect to an external URL. if (!JUri::isInternal($redirect)) { $redirect = JUri::base(); } } else { $redirect = JUri::base(); } $this->app->redirect($redirect); break; } } } PK V�!]Ecٍ html.phpnu &1i� <?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; /** * View to edit a module. * * @package Joomla.Site * @subpackage com_config * @since 3.2 */ class ConfigViewModulesHtml extends ConfigViewCmsHtml { public $item; public $form; /** * Display the view * * @return string The rendered view. * * @since 3.2 */ public function render() { $lang = JFactory::getApplication()->getLanguage(); $lang->load('', JPATH_ADMINISTRATOR, $lang->getTag()); $lang->load('com_modules', JPATH_ADMINISTRATOR, $lang->getTag()); return parent::render(); } } PK V�!]�*�Q Q tmpl/default_positions.phpnu &1i� <?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; $positions = $this->model->getPositions(); // Add custom position to options $customGroupText = JText::_('COM_MODULES_CUSTOM_POSITION'); // Build field $attr = array( 'id' => 'jform_position', 'list.select' => $this->item['position'], 'list.attr' => 'class="chzn-custom-value" ' . 'data-custom_group_text="' . $customGroupText . '" ' . 'data-no_results_text="' . JText::_('COM_MODULES_ADD_CUSTOM_POSITION') . '" ' . 'data-placeholder="' . JText::_('COM_MODULES_TYPE_OR_SELECT_POSITION') . '" ' ); echo JHtml::_('select.groupedlist', $positions, 'jform[position]', $attr); PK V�!]EDC� � tmpl/default_options.phpnu &1i� <?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; $fieldSets = $this->form->getFieldsets('params'); echo JHtml::_('bootstrap.startAccordion', 'collapseTypes'); $i = 0; foreach ($fieldSets as $name => $fieldSet) : $label = !empty($fieldSet->label) ? $fieldSet->label : 'COM_MODULES_' . $name . '_FIELDSET_LABEL'; $class = isset($fieldSet->class) && !empty($fieldSet->class) ? $fieldSet->class : ''; if (isset($fieldSet->description) && trim($fieldSet->description)) : echo '<p class="tip">' . $this->escape(JText::_($fieldSet->description)) . '</p>'; endif; ?> <?php echo JHtml::_('bootstrap.addSlide', 'collapseTypes', JText::_($label), 'collapse' . ($i++)); ?> <ul class="nav nav-tabs nav-stacked"> <?php foreach ($this->form->getFieldset($name) as $field) : ?> <li> <?php // If multi-language site, make menu-type selection read-only ?> <?php if (JLanguageMultilang::isEnabled() && $this->item['module'] === 'mod_menu' && $field->getAttribute('name') === 'menutype') : ?> <?php $field->readonly = true; ?> <?php endif; ?> <?php echo $field->renderField(); ?> </li> <?php endforeach; ?> </ul> <?php echo JHtml::_('bootstrap.endSlide'); ?> <?php endforeach; ?> <?php echo JHtml::_('bootstrap.endAccordion'); ?> PK V�!]��&gE$ E$ tmpl/default.phpnu &1i� <?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::_('bootstrap.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); $clientId = (int) $this->state->get('client_id', 0); $user = JFactory::getUser(); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $saveOrder = ($listOrder == 'a.ordering'); if ($saveOrder) { $saveOrderingUrl = 'index.php?option=com_modules&task=modules.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'moduleList', 'adminForm', strtolower($listDirn), $saveOrderingUrl); } $colSpan = $clientId === 1 ? 8 : 10; ?> <form action="<?php echo JRoute::_('index.php?option=com_modules'); ?>" method="post" name="adminForm" id="adminForm"> <?php if (!empty( $this->sidebar)) : ?> <div id="j-sidebar-container" class="span2"> <?php echo $this->sidebar; ?> </div> <div id="j-main-container" class="span10"> <?php else : ?> <div id="j-main-container"> <?php endif;?> <?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> <?php if ($this->total > 0) : ?> <table class="table table-striped" id="moduleList"> <thead> <tr> <th width="1%" class="nowrap center hidden-phone"> <?php echo JHtml::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> </th> <th width="1%" class="nowrap center"> <?php echo JHtml::_('grid.checkall'); ?> </th> <th width="1%" class="nowrap center" style="min-width:55px"> <?php echo JHtml::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?> </th> <th class="title"> <?php echo JHtml::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> </th> <th width="15%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'COM_MODULES_HEADING_POSITION', 'a.position', $listDirn, $listOrder); ?> </th> <th width="10%" class="nowrap hidden-phone hidden-tablet"> <?php echo JHtml::_('searchtools.sort', 'COM_MODULES_HEADING_MODULE', 'name', $listDirn, $listOrder); ?> </th> <?php if ($clientId === 0) : ?> <th width="10%" class="nowrap hidden-phone hidden-tablet"> <?php echo JHtml::_('searchtools.sort', 'COM_MODULES_HEADING_PAGES', 'pages', $listDirn, $listOrder); ?> </th> <?php endif; ?> <th width="10%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'ag.title', $listDirn, $listOrder); ?> </th> <?php if ($clientId === 0) : ?> <th width="10%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'l.title', $listDirn, $listOrder); ?> </th> <?php elseif ($clientId === 1 && JModuleHelper::isAdminMultilang()) : ?> <th width="10%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?> </th> <?php endif; ?> <th width="1%" class="nowrap center hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> </th> </tr> </thead> <tfoot> <tr> <td colspan="<?php echo $colSpan; ?>"> <?php echo $this->pagination->getListFooter(); ?> </td> </tr> </tfoot> <tbody> <?php foreach ($this->items as $i => $item) : $ordering = ($listOrder == 'a.ordering'); $canCreate = $user->authorise('core.create', 'com_modules'); $canEdit = $user->authorise('core.edit', 'com_modules.module.' . $item->id); $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->get('id')|| $item->checked_out == 0; $canChange = $user->authorise('core.edit.state', 'com_modules.module.' . $item->id) && $canCheckin; ?> <tr class="row<?php echo $i % 2; ?>" sortable-group-id="<?php echo $item->position ?: 'none'; ?>"> <td class="order nowrap center hidden-phone"> <?php $iconClass = ''; if (!$canChange) { $iconClass = ' inactive'; } elseif (!$saveOrder) { $iconClass = ' inactive tip-top hasTooltip" title="' . JHtml::_('tooltipText', 'JORDERINGDISABLED'); } ?> <span class="sortable-handler<?php echo $iconClass; ?>"> <span class="icon-menu"></span> </span> <?php if ($canChange && $saveOrder) : ?> <input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->ordering; ?>" class="width-20 text-area-order" /> <?php endif; ?> </td> <td class="center"> <?php if ($item->enabled > 0) : ?> <?php echo JHtml::_('grid.id', $i, $item->id); ?> <?php endif; ?> </td> <td class="center"> <div class="btn-group"> <?php // Check if extension is enabled ?> <?php if ($item->enabled > 0) : ?> <?php echo JHtml::_('jgrid.published', $item->published, $i, 'modules.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?> <?php // Create dropdown items and render the dropdown list. if ($canCreate) { JHtml::_('actionsdropdown.duplicate', 'cb' . $i, 'modules'); } if ($canChange) { JHtml::_('actionsdropdown.' . ((int) $item->published === -2 ? 'un' : '') . 'trash', 'cb' . $i, 'modules'); } if ($canCreate || $canChange) { echo JHtml::_('actionsdropdown.render', $this->escape($item->title)); } ?> <?php else : ?> <?php // Extension is not enabled, show a message that indicates this. ?> <button class="btn btn-micro hasTooltip" title="<?php echo JText::_('COM_MODULES_MSG_MANAGE_EXTENSION_DISABLED'); ?>"> <span class="icon-ban-circle" aria-hidden="true"></span> </button> <?php endif; ?> </div> </td> <td class="has-context"> <div class="pull-left"> <?php if ($item->checked_out) : ?> <?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'modules.', $canCheckin); ?> <?php endif; ?> <?php if ($canEdit) : ?> <a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_modules&task=module.edit&id=' . (int) $item->id); ?>" title="<?php echo JText::_('JACTION_EDIT'); ?>"> <?php echo $this->escape($item->title); ?></a> <?php else : ?> <?php echo $this->escape($item->title); ?> <?php endif; ?> <?php if (!empty($item->note)) : ?> <div class="small"> <?php echo JText::sprintf('JGLOBAL_LIST_NOTE', $this->escape($item->note)); ?> </div> <?php endif; ?> </div> </td> <td class="small hidden-phone"> <?php if ($item->position) : ?> <span class="label label-info"> <?php echo $item->position; ?> </span> <?php else : ?> <span class="label"> <?php echo JText::_('JNONE'); ?> </span> <?php endif; ?> </td> <td class="small hidden-phone hidden-tablet"> <?php echo $item->name; ?> </td> <?php if ($clientId === 0) : ?> <td class="small hidden-phone hidden-tablet"> <?php echo $item->pages; ?> </td> <?php endif; ?> <td class="small hidden-phone"> <?php echo $this->escape($item->access_level); ?> </td> <?php if ($clientId === 0) : ?> <td class="small hidden-phone"> <?php echo JLayoutHelper::render('joomla.content.language', $item); ?> </td> <?php elseif ($clientId === 1 && JModuleHelper::isAdminMultilang()) : ?> <td class="small hidden-phone"> <?php if ($item->language == ''):?> <?php echo JText::_('JUNDEFINED'); ?> <?php elseif ($item->language == '*'):?> <?php echo JText::alt('JALL', 'language'); ?> <?php else:?> <?php echo $this->escape($item->language); ?> <?php endif; ?> </td> <?php endif; ?> <td class="hidden-phone"> <?php echo (int) $item->id; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php endif; ?> <?php // Load the batch processing form. ?> <?php if ($user->authorise('core.create', 'com_modules') && $user->authorise('core.edit', 'com_modules') && $user->authorise('core.edit.state', 'com_modules')) : ?> <?php echo JHtml::_( 'bootstrap.renderModal', 'collapseModal', array( 'title' => JText::_('COM_MODULES_BATCH_OPTIONS'), 'footer' => $this->loadTemplate('batch_footer'), ), $this->loadTemplate('batch_body') ); ?> <?php endif; ?> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <?php echo JHtml::_('form.token'); ?> </div> </form> PK K�!]I�m$ $ view.html.phpnu &1i� <?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; /** * View class for a list of modules. * * @since 1.6 */ class ModulesViewModules extends JViewLegacy { protected $items; protected $pagination; protected $state; /** * Display the view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ public function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->total = $this->get('Total'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); $this->clientId = $this->state->get('client_id'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } // We do not need the Language filter when modules are not filtered if ($this->clientId == 1 && !JModuleHelper::isAdminMultilang()) { unset($this->activeFilters['language']); $this->filterForm->removeField('language', 'filter'); } // We don't need the toolbar in the modal window. if ($this->getLayout() !== 'modal') { $this->addToolbar(); } // If in modal layout. else { // Client id selector should not exist. $this->filterForm->removeField('client_id', ''); // If in the frontend state and language should not activate the search tools. if (JFactory::getApplication()->isClient('site')) { unset($this->activeFilters['state']); unset($this->activeFilters['language']); } } // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); return parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = JHelperContent::getActions('com_modules'); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolbar::getInstance('toolbar'); if ($state->get('client_id') == 1) { JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES_ADMIN'), 'cube module'); } else { JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES_SITE'), 'cube module'); } if ($canDo->get('core.create')) { // Instantiate a new JLayoutFile instance and render the layout $layout = new JLayoutFile('toolbar.newmodule'); $bar->appendButton('Custom', $layout->render(array()), 'new'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('module.edit'); } if ($canDo->get('core.create')) { JToolbarHelper::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('modules.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::checkin('modules.checkin'); } // Add a batch button if ($user->authorise('core.create', 'com_modules') && $user->authorise('core.edit', 'com_modules') && $user->authorise('core.edit.state', 'com_modules')) { JHtml::_('bootstrap.renderModal', 'collapseModal'); $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('modules.trash'); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_modules'); } JToolbarHelper::help('JHELP_EXTENSIONS_MODULE_MANAGER'); if (JHtmlSidebar::getEntries()) { $this->sidebar = JHtmlSidebar::render(); } } /** * Returns an array of fields the table can be sorted by * * @return array Array containing the field name to sort by as the key and display text as value * * @since 3.0 */ protected function getSortFields() { $this->state = $this->get('State'); if ($this->state->get('client_id') == 0) { if ($this->getLayout() == 'default') { return array( 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.title' => JText::_('JGLOBAL_TITLE'), 'position' => JText::_('COM_MODULES_HEADING_POSITION'), 'name' => JText::_('COM_MODULES_HEADING_MODULE'), 'pages' => JText::_('COM_MODULES_HEADING_PAGES'), 'a.access' => JText::_('JGRID_HEADING_ACCESS'), 'language_title' => JText::_('JGRID_HEADING_LANGUAGE'), 'a.id' => JText::_('JGRID_HEADING_ID') ); } return array( 'a.title' => JText::_('JGLOBAL_TITLE'), 'position' => JText::_('COM_MODULES_HEADING_POSITION'), 'name' => JText::_('COM_MODULES_HEADING_MODULE'), 'pages' => JText::_('COM_MODULES_HEADING_PAGES'), 'a.access' => JText::_('JGRID_HEADING_ACCESS'), 'language_title' => JText::_('JGRID_HEADING_LANGUAGE'), 'a.id' => JText::_('JGRID_HEADING_ID') ); } else { if ($this->getLayout() == 'default') { return array( 'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), 'a.title' => JText::_('JGLOBAL_TITLE'), 'position' => JText::_('COM_MODULES_HEADING_POSITION'), 'name' => JText::_('COM_MODULES_HEADING_MODULE'), 'a.access' => JText::_('JGRID_HEADING_ACCESS'), 'a.language' => JText::_('JGRID_HEADING_LANGUAGE'), 'a.id' => JText::_('JGRID_HEADING_ID') ); } return array( 'a.title' => JText::_('JGLOBAL_TITLE'), 'position' => JText::_('COM_MODULES_HEADING_POSITION'), 'name' => JText::_('COM_MODULES_HEADING_MODULE'), 'a.access' => JText::_('JGRID_HEADING_ACCESS'), 'a.language' => JText::_('JGRID_HEADING_LANGUAGE'), 'a.id' => JText::_('JGRID_HEADING_ID') ); } } } PK K�!]~�R� � tmpl/modal.phpnu &1i� <?php /** * @package Joomla.Administrator * @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; if (JFactory::getApplication()->isClient('site')) { JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN')); } // Load needed scripts JHtml::_('behavior.core'); JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom')); JHtml::_('formbehavior.chosen', 'select'); // Scripts for the modules xtd-button JHtml::_('behavior.polyfill', array('event'), 'lt IE 9'); JHtml::_('script', 'com_modules/admin-modules-modal.min.js', array('version' => 'auto', 'relative' => true)); // Special case for the search field tooltip. $searchFilterDesc = $this->filterForm->getFieldAttribute('search', 'description', null, 'filter'); JHtml::_('bootstrap.tooltip', '#filter_search', array('title' => JText::_($searchFilterDesc), 'placement' => 'bottom')); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $editor = JFactory::getApplication()->input->get('editor', '', 'cmd'); $link = 'index.php?option=com_modules&view=modules&layout=modal&tmpl=component&' . JSession::getFormToken() . '=1'; if (!empty($editor)) { $link = 'index.php?option=com_modules&view=modules&layout=modal&tmpl=component&editor=' . $editor . '&' . JSession::getFormToken() . '=1'; } ?> <div class="container-popup"> <form action="<?php echo JRoute::_($link); ?>" method="post" name="adminForm" id="adminForm"> <?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> <?php if ($this->total > 0) : ?> <table class="table table-striped" id="moduleList"> <thead> <tr> <th width="1%" class="nowrap center"> <?php echo JHtml::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?> </th> <th class="title"> <?php echo JHtml::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> </th> <th width="15%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'COM_MODULES_HEADING_POSITION', 'a.position', $listDirn, $listOrder); ?> </th> <th width="10%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'COM_MODULES_HEADING_MODULE', 'name', $listDirn, $listOrder); ?> </th> <th width="10%" class="nowrap hidden-phone hidden-tablet"> <?php echo JHtml::_('searchtools.sort', 'COM_MODULES_HEADING_PAGES', 'pages', $listDirn, $listOrder); ?> </th> <th width="10%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'ag.title', $listDirn, $listOrder); ?> </th> <th width="10%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'l.title', $listDirn, $listOrder); ?> </th> <th width="1%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> </th> </tr> </thead> <tfoot> <tr> <td colspan="8"> <?php echo $this->pagination->getListFooter(); ?> </td> </tr> </tfoot> <tbody> <?php $iconStates = array( -2 => 'icon-trash', 0 => 'icon-unpublish', 1 => 'icon-publish', 2 => 'icon-archive', ); foreach ($this->items as $i => $item) : ?> <tr class="row<?php echo $i % 2; ?>"> <td class="center"> <span class="<?php echo $iconStates[$this->escape($item->published)]; ?>" aria-hidden="true"></span> </td> <td class="has-context"> <a class="js-module-insert btn btn-small btn-block btn-success" href="#" data-module="<?php echo $item->id; ?>" data-editor="<?php echo $this->escape($editor); ?>"> <?php echo $this->escape($item->title); ?> </a> </td> <td class="small hidden-phone"> <?php if ($item->position) : ?> <a class="js-position-insert btn btn-small btn-block btn-warning" href="#" data-position="<?php echo $this->escape($item->position); ?>" data-editor="<?php echo $this->escape($editor); ?>"><?php echo $this->escape($item->position); ?></a> <?php else : ?> <span class="label"><?php echo JText::_('JNONE'); ?></span> <?php endif; ?> </td> <td class="small hidden-phone"> <?php echo $item->name; ?> </td> <td class="small hidden-phone hidden-tablet"> <?php echo $item->pages; ?> </td> <td class="small hidden-phone"> <?php echo $this->escape($item->access_level); ?> </td> <td class="small hidden-phone"> <?php echo JLayoutHelper::render('joomla.content.language', $item); ?> </td> <td class="hidden-phone"> <?php echo (int) $item->id; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php endif; ?> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="editor" value="<?php echo $editor; ?>" /> <?php echo JHtml::_('form.token'); ?> </form> </div> PK K�!]�vBT� � tmpl/default_batch_footer.phpnu &1i� <?php /** * @package Joomla.Administrator * @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; ?> <button type="button" class="btn" onclick="document.getElementById('batch-position-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value=''" data-dismiss="modal"> <?php echo JText::_('JCANCEL'); ?> </button> <button type="submit" class="btn btn-success" onclick="Joomla.submitbutton('module.batch');return false;"> <?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?> </button> PK K�!]Ј�� � tmpl/default_batch_body.phpnu &1i� <?php /** * @package Joomla.Administrator * @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; $clientId = $this->state->get('client_id'); // Show only Module Positions of published Templates $published = 1; $positions = JHtml::_('modules.positions', $clientId, $published); $positions['']['items'][] = ModulesHelper::createOption('nochange', JText::_('COM_MODULES_BATCH_POSITION_NOCHANGE')); $positions['']['items'][] = ModulesHelper::createOption('noposition', JText::_('COM_MODULES_BATCH_POSITION_NOPOSITION')); // Add custom position to options $customGroupText = JText::_('COM_MODULES_CUSTOM_POSITION'); // Build field $attr = array( 'id' => 'batch-position-id', 'list.attr' => 'class="chzn-custom-value input-xlarge" ' . 'data-custom_group_text="' . $customGroupText . '" ' . 'data-no_results_text="' . JText::_('COM_MODULES_ADD_CUSTOM_POSITION') . '" ' . 'data-placeholder="' . JText::_('COM_MODULES_TYPE_OR_SELECT_POSITION') . '" ' ); ?> <div class="container-fluid"> <p><?php echo JText::_('COM_MODULES_BATCH_TIP'); ?></p> <div class="row-fluid"> <?php if ($clientId != 1) : ?> <div class="control-group span6"> <div class="controls"> <?php echo JLayoutHelper::render('joomla.html.batch.language', array()); ?> </div> </div> <?php elseif ($clientId == 1 && JModuleHelper::isAdminMultilang()) : ?> <div class="control-group span6"> <div class="controls"> <?php echo JLayoutHelper::render('joomla.html.batch.adminlanguage', array()); ?> </div> </div> <?php endif; ?> <div class="control-group span6"> <div class="controls"> <?php echo JHtml::_('batch.access'); ?> </div> </div> </div> <div class="row-fluid"> <?php if ($published >= 0) : ?> <div class="span6"> <div class="controls"> <label id="batch-choose-action-lbl" for="batch-choose-action"> <?php echo JText::_('COM_MODULES_BATCH_POSITION_LABEL'); ?> </label> <div id="batch-choose-action" class="control-group"> <?php echo JHtml::_('select.groupedlist', $positions, 'batch[position_id]', $attr); ?> <div id="batch-copy-move" class="control-group radio"> <?php echo JHtml::_('modules.batchOptions'); ?> </div> </div> </div> </div> <?php endif; ?> </div> </div> PK K�!]��� � tmpl/default.xmlnu &1i� <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="COM_MODULES_MODULES_VIEW_DEFAULT_TITLE"> <message> <![CDATA[COM_MODULES_MODULES_VIEW_DEFAULT_DESC]]> </message> </layout> </metadata> PK �!] r�MJ J mod_logged/tmpl/default.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_logged * * @copyright (C) 2007 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::_('bootstrap.tooltip'); ?> <div class="row-striped"> <?php foreach ($users as $user) : ?> <div class="row-fluid"> <div class="span8"> <?php if ($user->client_id == 0) : ?> <a title="<?php echo JHtml::_('tooltipText', 'MOD_LOGGED_LOGOUT'); ?>" href="<?php echo $user->logoutLink; ?>" class="btn btn-danger btn-mini hasTooltip"> <span class="icon-remove icon-white" aria-hidden="true"><span class="element-invisible"><?php echo JText::_('JLOGOUT'); ?></span></span> </a> <?php endif; ?> <strong class="row-title"> <?php if (isset($user->editLink)) : ?> <a href="<?php echo $user->editLink; ?>" class="hasTooltip" title="<?php echo JHtml::_('tooltipText', 'JGRID_HEADING_ID'); ?> : <?php echo $user->id; ?>"> <?php echo $user->name; ?></a> <?php else : ?> <?php echo $user->name; ?> <?php endif; ?> </strong> <small class="small hasTooltip" title="<?php echo JHtml::_('tooltipText', 'JCLIENT'); ?>"> <?php if ($user->client_id === null) : ?> <?php // Don't display a client ?> <?php elseif ($user->client_id) : ?> <?php echo JText::_('JADMINISTRATION'); ?> <?php else : ?> <?php echo JText::_('JSITE'); ?> <?php endif; ?> </small> </div> <div class="span4"> <div class="small pull-right hasTooltip" title="<?php echo JHtml::_('tooltipText', 'MOD_LOGGED_LAST_ACTIVITY'); ?>"> <span class="icon-calendar" aria-hidden="true"></span> <?php echo JHtml::_('date', $user->time, JText::_('DATE_FORMAT_LC5')); ?> </div> </div> </div> <?php endforeach; ?> </div> PK �!]V��@ @ mod_logged/helper.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_logged * * @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; /** * Helper for mod_logged * * @since 1.5 */ abstract class ModLoggedHelper { /** * Get a list of logged users. * * @param \Joomla\Registry\Registry &$params The module parameters. * * @return mixed An array of users, or false on error. * * @throws RuntimeException */ public static function getList(&$params) { $db = JFactory::getDbo(); $user = JFactory::getUser(); $query = $db->getQuery(true) ->select('s.time, s.client_id, u.id, u.name, u.username') ->from('#__session AS s') ->join('LEFT', '#__users AS u ON s.userid = u.id') ->where('s.guest = 0'); $db->setQuery($query, 0, $params->get('count', 5)); try { $results = $db->loadObjectList(); } catch (RuntimeException $e) { throw $e; } foreach ($results as $k => $result) { $results[$k]->logoutLink = ''; if ($user->authorise('core.manage', 'com_users')) { $results[$k]->editLink = JRoute::_('index.php?option=com_users&task=user.edit&id=' . $result->id); $results[$k]->logoutLink = JRoute::_('index.php?option=com_login&task=logout&uid=' . $result->id . '&' . JSession::getFormToken() . '=1'); } if ($params->get('name', 1) == 0) { $results[$k]->name = $results[$k]->username; } } return $results; } /** * Get the alternate title for the module * * @param \Joomla\Registry\Registry $params The module parameters. * * @return string The alternate title for the module. */ public static function getTitle($params) { return JText::plural('MOD_LOGGED_TITLE', $params->get('count', 5)); } } PK �!]Ȗ�q q mod_logged/mod_logged.xmlnu &1i� <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="administrator" method="upgrade"> <name>mod_logged</name> <author>Joomla! Project</author> <creationDate>January 2005</creationDate> <copyright>(C) 2005 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>MOD_LOGGED_XML_DESCRIPTION</description> <files> <filename module="mod_logged">mod_logged.php</filename> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.mod_logged.ini</language> <language tag="en-GB">en-GB.mod_logged.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_LOGGED" /> <config> <fields name="params"> <fieldset name="basic"> <field name="count" type="number" label="MOD_LOGGED_FIELD_COUNT_LABEL" description="MOD_LOGGED_FIELD_COUNT_DESC" default="5" filter="integer" /> <field name="name" type="list" label="MOD_LOGGED_NAME" description="MOD_LOGGED_FIELD_NAME_DESC" default="1" filter="integer" > <option value="1">MOD_LOGGED_NAME</option> <option value="0">JGLOBAL_USERNAME</option> </field> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> <field name="automatic_title" type="radio" label="COM_MODULES_FIELD_AUTOMATIC_TITLE_LABEL" description="COM_MODULES_FIELD_AUTOMATIC_TITLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </config> </extension> PK �!]�:�H H mod_logged/mod_logged.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_logged * * @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Include dependencies. JLoader::register('ModLoggedHelper', __DIR__ . '/helper.php'); $users = ModLoggedHelper::getList($params); if ($params->get('automatic_title', 0)) { $module->title = ModLoggedHelper::getTitle($params); } require JModuleHelper::getLayoutPath('mod_logged', $params->get('layout', 'default')); PK �!]k�&� � # mod_stats_admin/mod_stats_admin.xmlnu &1i� <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="administrator" method="upgrade"> <name>mod_stats_admin</name> <author>Joomla! Project</author> <creationDate>July 2004</creationDate> <copyright>(C) 2005 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>MOD_STATS_XML_DESCRIPTION</description> <files> <filename module="mod_stats_admin">mod_stats_admin.php</filename> <folder>tmpl</folder> <folder>language</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_stats.ini</language> <language tag="en-GB">en-GB.mod_stats.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_STATISTICS" /> <config> <fields name="params"> <fieldset name="basic"> <field name="serverinfo" type="radio" label="MOD_STATS_FIELD_SERVERINFO_LABEL" description="MOD_STATS_FIELD_SERVERINFO_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="siteinfo" type="radio" label="MOD_STATS_FIELD_SITEINFO_LABEL" description="MOD_STATS_FIELD_SITEINFO_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="counter" type="radio" label="MOD_STATS_FIELD_COUNTER_LABEL" description="MOD_STATS_FIELD_COUNTER_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="increase" type="number" label="MOD_STATS_FIELD_INCREASECOUNTER_LABEL" description="MOD_STATS_FIELD_INCREASECOUNTER_DESC" default="0" filter="integer" /> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> <field name="cache" type="list" label="COM_MODULES_FIELD_CACHING_LABEL" description="COM_MODULES_FIELD_CACHING_DESC" default="1" filter="integer" > <option value="1">JGLOBAL_USE_GLOBAL</option> <option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option> </field> <field name="cache_time" type="number" label="COM_MODULES_FIELD_CACHE_TIME_LABEL" description="COM_MODULES_FIELD_CACHE_TIME_DESC" default="900" filter="integer" /> <field name="cachemode" type="hidden" default="static" > <option value="static"></option> </field> </fieldset> </fields> </config> </extension> PK �!]��Fp� � # mod_stats_admin/mod_stats_admin.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_stats_admin * * @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; // Include the mod_stats functions only once JLoader::register('ModStatsHelper', __DIR__ . '/helper.php'); $serverinfo = $params->get('serverinfo'); $siteinfo = $params->get('siteinfo'); $list = ModStatsHelper::getStats($params); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_stats_admin', $params->get('layout', 'default')); PK �!]�k�� � 6 mod_stats_admin/language/en-GB.mod_stats_admin.sys.ininu &1i� ; Joomla! Project ; (C) 2012 Open Source Matters, Inc. <https://www.joomla.org> ; License GNU General Public License version 2 or later; see LICENSE.txt ; Note : All ini files need to be saved as UTF-8 MOD_STATS_ADMIN="Statistics" MOD_STATS_XML_DESCRIPTION="The Statistics Module shows information about your server installation together with statistics on the website users and the number of Articles in your database." MOD_STATS_LAYOUT_DEFAULT="Default" PK �!] ��p p 2 mod_stats_admin/language/en-GB.mod_stats_admin.ininu &1i� ; Joomla! Project ; (C) 2012 Open Source Matters, Inc. <https://www.joomla.org> ; License GNU General Public License version 2 or later; see LICENSE.txt ; Note : All ini files need to be saved as UTF-8 MOD_STATS_ADMIN="Statistics" MOD_STATS_ARTICLES="Articles" MOD_STATS_ARTICLES_VIEW_HITS="Articles View Hits" MOD_STATS_CACHING="Caching" MOD_STATS_FIELD_COUNTER_DESC="Display hit counter." MOD_STATS_FIELD_COUNTER_LABEL="Hit Counter" MOD_STATS_FIELD_INCREASECOUNTER_DESC="Enter the number of hits to increase the counter by." MOD_STATS_FIELD_INCREASECOUNTER_LABEL="Increase Counter" MOD_STATS_FIELD_SERVERINFO_DESC="Display server information." MOD_STATS_FIELD_SERVERINFO_LABEL="Server Information" MOD_STATS_FIELD_SITEINFO_DESC="Display site information." MOD_STATS_FIELD_SITEINFO_LABEL="Site Information" MOD_STATS_GZIP="Gzip" MOD_STATS_OS="OS" MOD_STATS_PHP="PHP" MOD_STATS_TIME="Time" MOD_STATS_USERS="Users" MOD_STATS_WEBLINKS="Web Links" MOD_STATS_XML_DESCRIPTION="The Statistics Module shows information about your server installation together with statistics on the website users and the number of Articles in your database." PK �!]<�#� mod_stats_admin/helper.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_stats_admin * * @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; /** * Helper class for admin stats module * * @since 3.0 */ class ModStatsHelper { /** * Method to retrieve information about the site * * @param JObject &$params Params object * * @return array Array containing site information * * @since 3.0 */ public static function getStats(&$params) { $app = JFactory::getApplication(); $db = JFactory::getDbo(); $rows = array(); $query = $db->getQuery(true); $serverinfo = $params->get('serverinfo', 0); $siteinfo = $params->get('siteinfo', 0); $counter = $params->get('counter', 0); $increase = $params->get('increase', 0); $i = 0; if ($serverinfo) { $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_OS'); $rows[$i]->icon = 'screen'; $rows[$i]->data = substr(php_uname(), 0, 7); $i++; $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_PHP'); $rows[$i]->icon = 'cogs'; $rows[$i]->data = phpversion(); $i++; $rows[$i] = new stdClass; $rows[$i]->title = JText::_($db->name); $rows[$i]->icon = 'database'; $rows[$i]->data = $db->getVersion(); $i++; $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_TIME'); $rows[$i]->icon = 'clock'; $rows[$i]->data = JHtml::_('date', 'now', 'H:i'); $i++; $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_CACHING'); $rows[$i]->icon = 'dashboard'; $rows[$i]->data = $app->get('caching') ? JText::_('JENABLED') : JText::_('JDISABLED'); $i++; $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_GZIP'); $rows[$i]->icon = 'lightning'; $rows[$i]->data = $app->get('gzip') ? JText::_('JENABLED') : JText::_('JDISABLED'); $i++; } if ($siteinfo) { $query->select('COUNT(id) AS count_users') ->from('#__users'); $db->setQuery($query); try { $users = $db->loadResult(); } catch (RuntimeException $e) { $users = false; } $query->clear() ->select('COUNT(id) AS count_items') ->from('#__content') ->where('state = 1'); $db->setQuery($query); try { $items = $db->loadResult(); } catch (RuntimeException $e) { $items = false; } if ($users) { $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_USERS'); $rows[$i]->icon = 'users'; $rows[$i]->data = $users; $rows[$i]->link = JRoute::_('index.php?option=com_users'); $i++; } if ($items) { $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_ARTICLES'); $rows[$i]->icon = 'file'; $rows[$i]->data = $items; $rows[$i]->link = JRoute::_('index.php?option=com_content&view=articles&filter[published]=1'); $i++; } } if ($counter) { $query->clear() ->select('SUM(hits) AS count_hits') ->from('#__content') ->where('state = 1'); $db->setQuery($query); try { $hits = $db->loadResult(); } catch (RuntimeException $e) { $hits = false; } if ($hits) { $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_ARTICLES_VIEW_HITS'); $rows[$i]->icon = 'eye'; $rows[$i]->data = number_format($hits + $increase, 0, JText::_('DECIMALS_SEPARATOR'), JText::_('THOUSANDS_SEPARATOR')); $i++; } } // Include additional data defined by published system plugins JPluginHelper::importPlugin('system'); $app = JFactory::getApplication(); $arrays = (array) $app->triggerEvent('onGetStats', array('mod_stats_admin')); foreach ($arrays as $response) { foreach ($response as $row) { // We only add a row if the title and data are given if (isset($row['title']) && isset($row['data'])) { $rows[$i] = new stdClass; $rows[$i]->title = $row['title']; $rows[$i]->icon = isset($row['icon']) ? $row['icon'] : 'info'; $rows[$i]->data = $row['data']; $rows[$i]->link = isset($row['link']) ? $row['link'] : null; $i++; } } } return $rows; } } PK �!]( ~Џ � mod_stats_admin/tmpl/default.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_stats_admin * * @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; JHtml::_('jquery.framework'); JFactory::getDocument()->addScriptDeclaration(' jQuery(document).ready(function($) { $("a.js-revert").on("click", function(e) { e.preventDefault(); e.stopPropagation(); var activeTab = []; activeTab.push("#" + e.target.href.split("#")[1]); var path = window.location.pathname; localStorage.removeItem(e.target.href.replace(/&return=[a-zA-Z0-9%]+/, "").replace(/&[a-zA-Z-_]+=[0-9]+/, "")); localStorage.setItem(path + e.target.href.split("index.php")[1].split("#")[0], JSON.stringify(activeTab)); return window.location.href = e.target.href.split("#")[0]; }); }); '); ?> <div class="row-striped"> <?php foreach ($list as $item) : ?> <div class="row-fluid"> <div class="span4"> <span class="icon-<?php echo $item->icon; ?>" aria-hidden="true"></span> <?php echo $item->title; ?> </div> <div class="span8"> <?php if (isset($item->link)) : ?> <a class="btn btn-info btn-small js-revert" href="<?php echo $item->link; ?>"><?php echo $item->data; ?></a> <?php else : ?> <?php echo $item->data; ?> <?php endif; ?> </div> </div> <?php endforeach; ?> </div> PK �!]���� � mod_quickicon/mod_quickicon.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_quickicon * * @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::register('ModQuickIconHelper', __DIR__ . '/helper.php'); $buttons = ModQuickIconHelper::getButtons($params); require JModuleHelper::getLayoutPath('mod_quickicon', $params->get('layout', 'default')); PK �!]U�I+9 9 mod_quickicon/mod_quickicon.xmlnu &1i� <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="administrator" method="upgrade"> <name>mod_quickicon</name> <author>Joomla! Project</author> <creationDate>November 2005</creationDate> <copyright>(C) 2005 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>MOD_QUICKICON_XML_DESCRIPTION</description> <files> <filename module="mod_quickicon">mod_quickicon.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_quickicon.ini</language> <language tag="en-GB">en-GB.mod_quickicon.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_QUICKICON" /> <config> <fields name="params"> <fieldset name="basic"> <field name="context" type="text" label="MOD_QUICKICON_GROUP_LABEL" description="MOD_QUICKICON_GROUP_DESC" default="mod_quickicon" /> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> <field name="cache" type="list" label="COM_MODULES_FIELD_CACHING_LABEL" description="COM_MODULES_FIELD_CACHING_DESC" default="1" filter="integer" > <option value="1">JGLOBAL_USE_GLOBAL</option> <option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option> </field> <field name="cache_time" type="number" label="COM_MODULES_FIELD_CACHE_TIME_LABEL" description="COM_MODULES_FIELD_CACHE_TIME_DESC" default="900" filter="integer" /> </fieldset> </fields> </config> </extension> PK �!]���� � mod_quickicon/helper.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_quickicon * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Helper for mod_quickicon * * @since 1.6 */ abstract class ModQuickIconHelper { /** * Stack to hold buttons * * @since 1.6 */ protected static $buttons = array(); /** * Helper method to return button list. * * This method returns the array by reference so it can be * used to add custom buttons or remove default ones. * * @param JObject $params The module parameters. * * @return array An array of buttons * * @since 1.6 */ public static function &getButtons($params) { $key = (string) $params; if (!isset(self::$buttons[$key])) { $context = $params->get('context', 'mod_quickicon'); if ($context == 'mod_quickicon') { // Load mod_quickicon language file in case this method is called before rendering the module JFactory::getLanguage()->load('mod_quickicon'); self::$buttons[$key] = array( array( 'link' => JRoute::_('index.php?option=com_content&task=article.add'), 'image' => 'pencil-2', 'icon' => 'header/icon-48-article-add.png', 'text' => JText::_('MOD_QUICKICON_ADD_NEW_ARTICLE'), 'access' => array('core.manage', 'com_content', 'core.create', 'com_content'), 'group' => 'MOD_QUICKICON_CONTENT', ), array( 'link' => JRoute::_('index.php?option=com_content'), 'image' => 'stack', 'icon' => 'header/icon-48-article.png', 'text' => JText::_('MOD_QUICKICON_ARTICLE_MANAGER'), 'access' => array('core.manage', 'com_content'), 'group' => 'MOD_QUICKICON_CONTENT', ), array( 'link' => JRoute::_('index.php?option=com_categories&extension=com_content'), 'image' => 'folder', 'icon' => 'header/icon-48-category.png', 'text' => JText::_('MOD_QUICKICON_CATEGORY_MANAGER'), 'access' => array('core.manage', 'com_content'), 'group' => 'MOD_QUICKICON_CONTENT', ), array( 'link' => JRoute::_('index.php?option=com_media'), 'image' => 'pictures', 'icon' => 'header/icon-48-media.png', 'text' => JText::_('MOD_QUICKICON_MEDIA_MANAGER'), 'access' => array('core.manage', 'com_media'), 'group' => 'MOD_QUICKICON_CONTENT', ), array( 'link' => JRoute::_('index.php?option=com_menus'), 'image' => 'list-view', 'icon' => 'header/icon-48-menumgr.png', 'text' => JText::_('MOD_QUICKICON_MENU_MANAGER'), 'access' => array('core.manage', 'com_menus'), 'group' => 'MOD_QUICKICON_STRUCTURE', ), array( 'link' => JRoute::_('index.php?option=com_users'), 'image' => 'users', 'icon' => 'header/icon-48-user.png', 'text' => JText::_('MOD_QUICKICON_USER_MANAGER'), 'access' => array('core.manage', 'com_users'), 'group' => 'MOD_QUICKICON_USERS', ), array( 'link' => JRoute::_('index.php?option=com_modules'), 'image' => 'cube', 'icon' => 'header/icon-48-module.png', 'text' => JText::_('MOD_QUICKICON_MODULE_MANAGER'), 'access' => array('core.manage', 'com_modules'), 'group' => 'MOD_QUICKICON_STRUCTURE', ), array( 'link' => JRoute::_('index.php?option=com_config'), 'image' => 'cog', 'icon' => 'header/icon-48-config.png', 'text' => JText::_('MOD_QUICKICON_GLOBAL_CONFIGURATION'), 'access' => array('core.manage', 'com_config', 'core.admin', 'com_config'), 'group' => 'MOD_QUICKICON_CONFIGURATION', ), array( 'link' => JRoute::_('index.php?option=com_templates'), 'image' => 'eye', 'icon' => 'header/icon-48-themes.png', 'text' => JText::_('MOD_QUICKICON_TEMPLATE_MANAGER'), 'access' => array('core.manage', 'com_templates'), 'group' => 'MOD_QUICKICON_CONFIGURATION', ), array( 'link' => JRoute::_('index.php?option=com_languages'), 'image' => 'comments-2', 'icon' => 'header/icon-48-language.png', 'text' => JText::_('MOD_QUICKICON_LANGUAGE_MANAGER'), 'access' => array('core.manage', 'com_languages'), 'group' => 'MOD_QUICKICON_CONFIGURATION', ), array( 'link' => JRoute::_('index.php?option=com_installer'), 'image' => 'download', 'icon' => 'header/icon-48-extension.png', 'text' => JText::_('MOD_QUICKICON_INSTALL_EXTENSIONS'), 'access' => array('core.manage', 'com_installer'), 'group' => 'MOD_QUICKICON_EXTENSIONS', ), ); } else { self::$buttons[$key] = array(); } // Include buttons defined by published quickicon plugins JPluginHelper::importPlugin('quickicon'); $app = JFactory::getApplication(); $arrays = (array) $app->triggerEvent('onGetIcons', array($context)); foreach ($arrays as $response) { foreach ($response as $icon) { $default = array( 'link' => null, 'image' => 'cog', 'text' => null, 'access' => true, 'group' => 'MOD_QUICKICON_EXTENSIONS', ); $icon = array_merge($default, $icon); if (!is_null($icon['link']) && !is_null($icon['text'])) { self::$buttons[$key][] = $icon; } } } } return self::$buttons[$key]; } /** * Classifies the $buttons by group * * @param array $buttons The buttons * * @return array The buttons sorted by groups * * @since 3.2 */ public static function groupButtons($buttons) { $groupedButtons = array(); foreach ($buttons as $button) { $groupedButtons[$button['group']][] = $button; } return $groupedButtons; } /** * Get the alternate title for the module * * @param JObject $params The module parameters. * @param JObject $module The module. * * @return string The alternate title for the module. * * @deprecated 4.0 Unused. Title can be adjusted in module itself if needed. */ public static function getTitle($params, $module) { $key = $params->get('context', 'mod_quickicon') . '_title'; if (JFactory::getLanguage()->hasKey($key)) { return JText::_($key); } else { return $module->title; } } } PK �!] ]@�� � mod_quickicon/tmpl/default.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_quickicon * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $html = JHtml::_('links.linksgroups', ModQuickIconHelper::groupButtons($buttons)); ?> <?php if (!empty($html)) : ?> <div class="sidebar-nav quick-icons"> <?php echo $html;?> </div> <?php endif;?> PK �!]@�� mod_version/mod_version.xmlnu &1i� <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="administrator" method="upgrade"> <name>mod_version</name> <author>Joomla! Project</author> <creationDate>January 2012</creationDate> <copyright>(C) 2012 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>MOD_VERSION_XML_DESCRIPTION</description> <files> <filename module="mod_version">mod_version.php</filename> <folder>language</folder> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">language/en-GB/en-GB.mod_version.ini</language> <language tag="en-GB">language/en-GB/en-GB.mod_version.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_VERSION" /> <config> <fields name="params"> <fieldset name="basic"> <field name="format" type="list" label="MOD_VERSION_FORMAT_LABEL" description="MOD_VERSION_FORMAT_DESC" default="short" > <option value="short">MOD_VERSION_FORMAT_SHORT</option> <option value="long">MOD_VERSION_FORMAT_LONG</option> </field> <field name="product" type="radio" label="MOD_VERSION_PRODUCT_LABEL" description="MOD_VERSION_PRODUCT_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> </fieldset> </fields> </config> </extension> PK �!]k��� � mod_version/mod_version.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_version * * @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; JLoader::register('ModVersionHelper', __DIR__ . '/helper.php'); $version = ModVersionHelper::getVersion($params); require JModuleHelper::getLayoutPath('mod_version', $params->get('layout', 'default')); PK �!]X�p p mod_version/tmpl/default.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_version * * @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; ?> <?php if (!empty($version)) : ?> <p class="text-center"><?php echo $version; ?></p> <?php endif; ?> PK �!]�ք^� � mod_version/helper.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_version * * @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; /** * Helper for mod_version * * @since 1.6 */ abstract class ModVersionHelper { /** * Get the member items of the submenu. * * @param \Joomla\Registry\Registry &$params The parameters object. * * @return string String containing the current Joomla version based on the selected format. */ public static function getVersion(&$params) { $version = new JVersion; $versionText = $version->getShortVersion(); $product = $params->get('product', 1); if ($params->get('format', 'short') === 'long') { $versionText = str_replace($version::PRODUCT . ' ', '', $version->getLongVersion()); } if (!empty($product)) { $versionText = $version::PRODUCT . ' ' . $versionText; } return $versionText; } } PK �!]�~��b b 4 mod_version/language/en-GB/en-GB.mod_version.sys.ininu &1i� ; Joomla! Project ; (C) 2012 Open Source Matters, Inc. <https://www.joomla.org> ; License GNU General Public License version 2 or later; see LICENSE.txt ; Note : All ini files need to be saved as UTF-8 MOD_VERSION="Joomla! Version Information" MOD_VERSION_LAYOUT_DEFAULT="Default" MOD_VERSION_XML_DESCRIPTION="This module displays the Joomla! version." PK �!]�.�` ` 0 mod_version/language/en-GB/en-GB.mod_version.ininu &1i� ; Joomla! Project ; (C) 2012 Open Source Matters, Inc. <https://www.joomla.org> ; License GNU General Public License version 2 or later; see LICENSE.txt ; Note : All ini files need to be saved as UTF-8 MOD_VERSION="Joomla! Version Information" MOD_VERSION_FORMAT_DESC="The long version includes code name and date." MOD_VERSION_FORMAT_LABEL="Version Format" MOD_VERSION_FORMAT_LONG="Long" MOD_VERSION_FORMAT_SHORT="Short" MOD_VERSION_PRODUCT_DESC="Include Joomla! name when using short format." MOD_VERSION_PRODUCT_LABEL="Show Joomla!" MOD_VERSION_XML_DESCRIPTION="This module displays the Joomla! version."PK �!]���(= = mod_latest/tmpl/default.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_latest * * @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; JHtml::_('bootstrap.tooltip'); ?> <div class="row-striped"> <?php if (count($list)) : ?> <?php foreach ($list as $i => $item) : ?> <div class="row-fluid"> <div class="span8 truncate"> <?php echo JHtml::_('jgrid.published', $item->state, $i, 'articles.', false, 'cb', $item->publish_up, $item->publish_down); ?> <?php if ($item->checked_out) : ?> <?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time); ?> <?php endif; ?> <strong class="row-title" title="<?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?>"> <?php if ($item->link) : ?> <a href="<?php echo $item->link; ?>"> <?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?></a> <?php else : ?> <?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?> <?php endif; ?> </strong> <small class="hasTooltip" title="<?php echo JHtml::_('tooltipText', 'MOD_LATEST_CREATED_BY'); ?>"> <?php echo $item->author_name; ?> </small> </div> <div class="span4"> <div class="small pull-right hasTooltip" title="<?php echo JHtml::_('tooltipText', 'JGLOBAL_FIELD_CREATED_LABEL'); ?>"> <span class="icon-calendar" aria-hidden="true"></span> <?php echo JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC5')); ?> </div> </div> </div> <?php endforeach; ?> <?php else : ?> <div class="row-fluid"> <div class="span12"> <div class="alert"><?php echo JText::_('MOD_LATEST_NO_MATCHING_RESULTS');?></div> </div> </div> <?php endif; ?> </div> PK �!]�ی.s s mod_latest/mod_latest.xmlnu &1i� <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="administrator" method="upgrade"> <name>mod_latest</name> <author>Joomla! Project</author> <creationDate>July 2004</creationDate> <copyright>(C) 2005 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>MOD_LATEST_XML_DESCRIPTION</description> <files> <filename module="mod_latest">mod_latest.php</filename> <filename>helper.php</filename> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.mod_latest.ini</language> <language tag="en-GB">en-GB.mod_latest.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_LATEST" /> <config> <fields name="params"> <fieldset name="basic"> <field name="count" type="number" label="MOD_LATEST_FIELD_COUNT_LABEL" description="MOD_LATEST_FIELD_COUNT_DESC" default="5" filter="integer" /> <field name="ordering" type="list" label="MOD_LATEST_FIELD_ORDERING_LABEL" description="MOD_LATEST_FIELD_ORDERING_DESC" default="c_dsc" > <option value="c_dsc">MOD_LATEST_FIELD_VALUE_ORDERING_ADDED</option> <option value="m_dsc">MOD_LATEST_FIELD_VALUE_ORDERING_MODIFIED</option> </field> <field name="catid" type="category" label="JCATEGORY" description="MOD_LATEST_FIELD_CATEGORY_DESC" id="catid" extension="com_content" default="" filter="integer" > <option value="">JOPTION_ANY_CATEGORY</option> </field> <field name="user_id" type="list" label="MOD_LATEST_FIELD_AUTHORS_LABEL" description="MOD_LATEST_FIELD_AUTHORS_DESC" default="0" > <option value="0">MOD_LATEST_FIELD_VALUE_AUTHORS_ANYONE</option> <option value="by_me">MOD_LATEST_FIELD_VALUE_AUTHORS_BY_ME</option> <option value="not_me">MOD_LATEST_FIELD_VALUE_AUTHORS_NOT_BY_ME</option> </field> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> <field name="automatic_title" type="radio" label="COM_MODULES_FIELD_AUTOMATIC_TITLE_LABEL" description="COM_MODULES_FIELD_AUTOMATIC_TITLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </config> </extension> PK �!]��\aG G mod_latest/mod_latest.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_latest * * @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Include dependencies. JLoader::register('ModLatestHelper', __DIR__ . '/helper.php'); $list = ModLatestHelper::getList($params); if ($params->get('automatic_title', 0)) { $module->title = ModLatestHelper::getTitle($params); } require JModuleHelper::getLayoutPath('mod_latest', $params->get('layout', 'default')); PK �!]Q�F�� � mod_latest/helper.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage mod_latest * * @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; JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_content/models', 'ContentModel'); /** * Helper for mod_latest * * @since 1.5 */ abstract class ModLatestHelper { /** * Get a list of articles. * * @param \Joomla\Registry\Registry &$params The module parameters. * * @return mixed An array of articles, or false on error. */ public static function getList(&$params) { $user = JFactory::getuser(); // Get an instance of the generic articles model $model = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true)); // Set List SELECT $model->setState('list.select', 'a.id, a.title, a.checked_out, a.checked_out_time, ' . ' a.access, a.created, a.created_by, a.created_by_alias, a.featured, a.state, a.publish_up, a.publish_down'); // Set Ordering filter switch ($params->get('ordering', 'c_dsc')) { case 'm_dsc': $model->setState('list.ordering', 'modified DESC, created'); $model->setState('list.direction', 'DESC'); break; case 'c_dsc': default: $model->setState('list.ordering', 'created'); $model->setState('list.direction', 'DESC'); break; } // Set Category Filter $categoryId = $params->get('catid', null); if (is_numeric($categoryId)) { $model->setState('filter.category_id', $categoryId); } // Set User Filter. $userId = $user->get('id'); switch ($params->get('user_id', '0')) { case 'by_me': $model->setState('filter.author_id', $userId); break; case 'not_me': $model->setState('filter.author_id', $userId); $model->setState('filter.author_id.include', false); break; } // Set the Start and Limit $model->setState('list.start', 0); $model->setState('list.limit', $params->get('count', 5)); $items = $model->getItems(); if ($error = $model->getError()) { JError::raiseError(500, $error); return false; } // Set the links foreach ($items as &$item) { if ($user->authorise('core.edit', 'com_content.article.' . $item->id)) { $item->link = JRoute::_('index.php?option=com_content&task=article.edit&id=' . $item->id); } else { $item->link = ''; } } return $items; } /** * Get the alternate title for the module. * * @param \Joomla\Registry\Registry $params The module parameters. * * @return string The alternate title for the module. */ public static function getTitle($params) { $who = $params->get('user_id', '0'); $catid = (int) $params->get('catid', null); $type = $params->get('ordering', 'c_dsc') == 'c_dsc' ? '_CREATED' : '_MODIFIED'; if ($catid) { $category = JCategories::getInstance('Content')->get($catid); if ($category) { $title = $category->title; } else { $title = JText::_('MOD_POPULAR_UNEXISTING'); } } else { $title = ''; } return JText::plural( 'MOD_LATEST_TITLE' . $type . ($catid ? '_CATEGORY' : '') . ($who != '0' ? "_$who" : ''), (int) $params->get('count', 5), $title ); } } PK �!].�EKq q "