File manager - Edit - /home/capoccitel/www/wp-admin/mod_popular.tar
Back
mod_popular.xml 0000604 00000005076 15242100764 0007614 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="administrator" method="upgrade"> <name>mod_popular</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_POPULAR_XML_DESCRIPTION</description> <files> <filename module="mod_popular">mod_popular.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_popular.ini</language> <language tag="en-GB">en-GB.mod_popular.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_POPULAR" /> <config> <fields name="params"> <fieldset name="basic"> <field name="count" type="number" label="MOD_POPULAR_FIELD_COUNT_LABEL" description="MOD_POPULAR_FIELD_COUNT_DESC" default="5" filter="integer" /> <field name="catid" type="category" label="JCATEGORY" description="MOD_POPULAR_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_POPULAR_FIELD_AUTHORS_LABEL" description="MOD_POPULAR_FIELD_AUTHORS_DESC" default="0" > <option value="0">MOD_POPULAR_FIELD_VALUE_ANYONE</option> <option value="by_me">MOD_POPULAR_FIELD_VALUE_ADDED_OR_MODIFIED_BY_ME</option> <option value="not_me">MOD_POPULAR_FIELD_VALUE_NOT_ADDED_OR_MODIFIED_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> mod_popular.php 0000604 00000001214 15242100764 0007571 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage mod_popular * * @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 the mod_popular functions only once. JLoader::register('ModPopularHelper', __DIR__ . '/helper.php'); // Get module data. $list = ModPopularHelper::getList($params); if ($params->get('automatic_title', 0)) { $module->title = ModPopularHelper::getTitle($params); } // Render the module require JModuleHelper::getLayoutPath('mod_popular', $params->get('layout', 'default')); helper.php 0000604 00000005415 15242100764 0006536 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage mod_popular * * @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_popular * * @since 1.6 */ abstract class ModPopularHelper { /** * Get a list of the most popular articles * * @param JObject &$params The module parameters. * * @return array */ 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.created, a.hits'); // Set Ordering filter $model->setState('list.ordering', 'a.hits'); $model->setState('list.direction', 'DESC'); // 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 JObject $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); 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_POPULAR_TITLE' . ($catid ? '_CATEGORY' : '') . ($who != '0' ? "_$who" : ''), (int) $params->get('count', 5), $title ); } } index.html 0000705 00000000037 15242100764 0006540 0 ustar 00 <!DOCTYPE html><title></title> tmpl/index.html 0000705 00000000037 15242100764 0007514 0 ustar 00 <!DOCTYPE html><title></title>
| ver. 1.6 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings