Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/modules.tar
Назад
mod_tags_popular/helper.php 0000604 00000010236 15245362373 0012103 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_tags_popular * * @copyright (C) 2013 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_tags_popular * * @since 3.1 */ abstract class ModTagsPopularHelper { /** * Get list of popular tags * * @param \Joomla\Registry\Registry &$params module parameters * * @return mixed * * @since 3.1 */ public static function getList(&$params) { $db = JFactory::getDbo(); $user = JFactory::getUser(); $groups = implode(',', $user->getAuthorisedViewLevels()); $timeframe = $params->get('timeframe', 'alltime'); $maximum = $params->get('maximum', 5); $order_value = $params->get('order_value', 'title'); $nowDate = JFactory::getDate()->toSql(); $nullDate = $db->quote($db->getNullDate()); $query = $db->getQuery(true) ->select( array( 'MAX(' . $db->quoteName('tag_id') . ') AS tag_id', ' COUNT(*) AS count', 'MAX(t.title) AS title', 'MAX(' . $db->quoteName('t.access') . ') AS access', 'MAX(' . $db->quoteName('t.alias') . ') AS alias', 'MAX(' . $db->quoteName('t.params') . ') AS params', ) ) ->group($db->quoteName(array('tag_id', 'title', 'access', 'alias'))) ->from($db->quoteName('#__contentitem_tag_map', 'm')) ->where($db->quoteName('t.access') . ' IN (' . $groups . ')'); // Only return published tags $query->where($db->quoteName('t.published') . ' = 1 '); // Filter by Parent Tag $parentTags = $params->get('parentTag', array()); if ($parentTags) { $query->where($db->quoteName('t.parent_id') . ' IN (' . implode(',', $parentTags) . ')'); } // Optionally filter on language $language = JComponentHelper::getParams('com_tags')->get('tag_list_language_filter', 'all'); if ($language !== 'all') { if ($language === 'current_language') { $language = JHelperContent::getCurrentLanguage(); } $query->where($db->quoteName('t.language') . ' IN (' . $db->quote($language) . ', ' . $db->quote('*') . ')'); } if ($timeframe !== 'alltime') { $query->where($db->quoteName('tag_date') . ' > ' . $query->dateAdd($db->quote($nowDate), '-1', strtoupper($timeframe))); } $query->join('INNER', $db->quoteName('#__tags', 't') . ' ON ' . $db->quoteName('tag_id') . ' = t.id') ->join('INNER', $db->qn('#__ucm_content', 'c') . ' ON ' . $db->qn('m.core_content_id') . ' = ' . $db->qn('c.core_content_id')); $query->where($db->quoteName('m.type_alias') . ' = ' . $db->quoteName('c.core_type_alias')); // Only return tags connected to published and authorised items $query->where($db->quoteName('c.core_state') . ' = 1') ->where('(' . $db->quoteName('c.core_access') . ' IN (' . $groups . ') OR ' . $db->quoteName('c.core_access') . ' = 0)') ->where('(' . $db->quoteName('c.core_publish_up') . ' = ' . $nullDate . ' OR ' . $db->quoteName('c.core_publish_up') . ' <= ' . $db->quote($nowDate) . ')') ->where('(' . $db->quoteName('c.core_publish_down') . ' = ' . $nullDate . ' OR ' . $db->quoteName('c.core_publish_down') . ' >= ' . $db->quote($nowDate) . ')'); // Set query depending on order_value param if ($order_value === 'rand()') { $query->order($query->Rand()); } else { $order_value = $db->quoteName($order_value); $order_direction = $params->get('order_direction', 1) ? 'DESC' : 'ASC'; if ($params->get('order_value', 'title') === 'title') { $query->setLimit($maximum); $query->order('count DESC'); $equery = $db->getQuery(true) ->select( array( 'a.tag_id', 'a.count', 'a.title', 'a.access', 'a.alias', ) ) ->from('(' . (string) $query . ') AS a') ->order('a.title' . ' ' . $order_direction); $query = $equery; } else { $query->order($order_value . ' ' . $order_direction); } } $db->setQuery($query, 0, $maximum); try { $results = $db->loadObjectList(); } catch (RuntimeException $e) { $results = array(); JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error'); } return $results; } } mod_tags_popular/mod_tags_popular.xml 0000604 00000011635 15245362373 0014200 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_tags_popular</name> <author>Joomla! Project</author> <creationDate>January 2013</creationDate> <copyright>(C) 2013 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.1.0</version> <description>MOD_TAGS_POPULAR_XML_DESCRIPTION</description> <files> <filename module="mod_tags_popular">mod_tags_popular.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_tags_popular.ini</language> <language tag="en-GB">en-GB.mod_tags_popular.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_TAGS_POPULAR" /> <config> <fields name="params"> <fieldset name="basic"> <field name="parentTag" type="tag" label="MOD_TAGS_POPULAR_PARENT_TAG_LABEL" description="MOD_TAGS_POPULAR_PARENT_TAG_DESC" multiple="true" filter="int_array" mode="nested" /> <field name="maximum" type="integer" label="MOD_TAGS_POPULAR_MAX_LABEL" description="MOD_TAGS_POPULAR_MAX_DESC" default="5" filter="integer" first="1" last="20" step="1" /> <field name="timeframe" type="list" label="MOD_TAGS_POPULAR_FIELD_TIMEFRAME_LABEL" description="MOD_TAGS_POPULAR_FIELD_TIMEFRAME_DESC" default="alltime" validate="options" > <option value="alltime">MOD_TAGS_POPULAR_FIELD_ALL_TIME</option> <option value="hour">MOD_TAGS_POPULAR_FIELD_LAST_HOUR</option> <option value="day">MOD_TAGS_POPULAR_FIELD_LAST_DAY</option> <option value="week">MOD_TAGS_POPULAR_FIELD_LAST_WEEK</option> <option value="month">MOD_TAGS_POPULAR_FIELD_LAST_MONTH</option> <option value="year">MOD_TAGS_POPULAR_FIELD_LAST_YEAR</option> </field> <field name="order_value" type="list" label="MOD_TAGS_POPULAR_FIELD_ORDER_VALUE_LABEL" description="MOD_TAGS_POPULAR_FIELD_ORDER_VALUE_DESC" default="count" validate="options" > <option value="title">MOD_TAGS_POPULAR_FIELD_ORDER_VALUE_TITLE</option> <option value="count">MOD_TAGS_POPULAR_FIELD_ORDER_VALUE_COUNT</option> <option value="rand()">MOD_TAGS_POPULAR_FIELD_ORDER_VALUE_RANDOM</option> </field> <field name="order_direction" type="list" label="JGLOBAL_ORDER_DIRECTION_LABEL" description="JGLOBAL_ORDER_DIRECTION_DESC" default="1" filter="integer" > <option value="0">JGLOBAL_ORDER_ASCENDING</option> <option value="1">JGLOBAL_ORDER_DESCENDING</option> </field> <field name="display_count" type="radio" label="MOD_TAGS_POPULAR_FIELD_DISPLAY_COUNT_LABEL" description="MOD_TAGS_POPULAR_FIELD_DISPLAY_COUNT_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="no_results_text" type="radio" label="MOD_TAGS_POPULAR_FIELD_NO_RESULTS_LABEL" description="MOD_TAGS_POPULAR_FIELD_NO_RESULTS_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> <fieldset name="cloud" label="MOD_TAGS_POPULAR_FIELDSET_CLOUD_LABEL" > <field name="minsize" type="number" label="MOD_TAGS_POPULAR_FIELD_MINSIZE_LABEL" description="MOD_TAGS_POPULAR_FIELD_MINSIZE_DESC" default="1" filter="float" /> <field name="maxsize" type="number" label="MOD_TAGS_POPULAR_FIELD_MAXSIZE_LABEL" description="MOD_TAGS_POPULAR_FIELD_MAXSIZE_DESC" default="2" filter="float" /> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" default="_:default" 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="owncache" 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> mod_tags_popular/mod_tags_popular.php 0000604 00000001765 15245362373 0014172 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_tags_popular * * @copyright (C) 2013 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 tags_popular functions only once JLoader::register('ModTagsPopularHelper', __DIR__ . '/helper.php'); $cacheparams = new stdClass; $cacheparams->cachemode = 'safeuri'; $cacheparams->class = 'ModTagsPopularHelper'; $cacheparams->method = 'getList'; $cacheparams->methodparams = $params; $cacheparams->modeparams = array('id' => 'array', 'Itemid' => 'int'); $list = JModuleHelper::moduleCache($module, $params, $cacheparams); if (!count($list) && !$params->get('no_results_text')) { return; } $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); $display_count = $params->get('display_count', 0); require JModuleHelper::getLayoutPath('mod_tags_popular', $params->get('layout', 'default')); mod_tags_popular/tmpl/default.php 0000604 00000001731 15245362373 0013224 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_tags_popular * * @copyright (C) 2013 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 JLoader::register('TagsHelperRoute', JPATH_BASE . '/components/com_tags/helpers/route.php'); ?> <div class="tagspopular<?php echo $moduleclass_sfx; ?>"> <?php if (!count($list)) : ?> <div class="alert alert-no-items"><?php echo JText::_('MOD_TAGS_POPULAR_NO_ITEMS_FOUND'); ?></div> <?php else : ?> <ul> <?php foreach ($list as $item) : ?> <li> <a href="<?php echo JRoute::_(TagsHelperRoute::getTagRoute($item->tag_id . ':' . $item->alias)); ?>"> <?php echo htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8'); ?></a> <?php if ($display_count) : ?> <span class="tag-count badge badge-info"><?php echo $item->count; ?></span> <?php endif; ?> </li> <?php endforeach; ?> </ul> <?php endif; ?> </div> mod_tags_popular/tmpl/cloud.php 0000604 00000003164 15245362373 0012710 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_tags_popular * * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $minsize = $params->get('minsize', 1); $maxsize = $params->get('maxsize', 2); JLoader::register('TagsHelperRoute', JPATH_BASE . '/components/com_tags/helpers/route.php'); ?> <div class="tagspopular<?php echo $moduleclass_sfx; ?> tagscloud<?php echo $moduleclass_sfx; ?>"> <?php if (!count($list)) : ?> <div class="alert alert-no-items"><?php echo JText::_('MOD_TAGS_POPULAR_NO_ITEMS_FOUND'); ?></div> <?php else : // Find maximum and minimum count $mincount = null; $maxcount = null; foreach ($list as $item) { if ($mincount === null || $mincount > $item->count) { $mincount = $item->count; } if ($maxcount === null || $maxcount < $item->count) { $maxcount = $item->count; } } $countdiff = $maxcount - $mincount; foreach ($list as $item) : if ($countdiff === 0) : $fontsize = $minsize; else : $fontsize = $minsize + (($maxsize - $minsize) / $countdiff) * ($item->count - $mincount); endif; ?> <span class="tag"> <a class="tag-name" style="font-size: <?php echo $fontsize . 'em'; ?>" href="<?php echo JRoute::_(TagsHelperRoute::getTagRoute($item->tag_id . ':' . $item->alias)); ?>"> <?php echo htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8'); ?></a> <?php if ($display_count) : ?> <span class="tag-count badge badge-info"><?php echo $item->count; ?></span> <?php endif; ?> </span> <?php endforeach; ?> <?php endif; ?> </div> mod_wrapper/tmpl/default.php 0000604 00000001405 15245362373 0012202 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_wrapper * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::_('script', 'com_wrapper/iframe-height.min.js', array('version' => 'auto', 'relative' => true)); ?> <iframe <?php echo $load; ?> id="blockrandom-<?php echo $id; ?>" name="<?php echo $target; ?>" src="<?php echo $url; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" scrolling="<?php echo $scroll; ?>" frameborder="<?php echo $frameborder; ?>" title="<?php echo $ititle; ?>" class="wrapper<?php echo $moduleclass_sfx; ?>" > <?php echo JText::_('MOD_WRAPPER_NO_IFRAMES'); ?> </iframe> mod_wrapper/mod_wrapper.php 0000604 00000002311 15245362373 0012116 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_wrapper * * @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 wrapper functions only once JLoader::register('ModWrapperHelper', __DIR__ . '/helper.php'); $params = ModWrapperHelper::getParams($params); $load = $params->get('load'); $url = htmlspecialchars($params->get('url', ''), ENT_COMPAT, 'UTF-8'); $target = htmlspecialchars($params->get('target', ''), ENT_COMPAT, 'UTF-8'); $width = htmlspecialchars($params->get('width', ''), ENT_COMPAT, 'UTF-8'); $height = htmlspecialchars($params->get('height', ''), ENT_COMPAT, 'UTF-8'); $scroll = htmlspecialchars($params->get('scrolling', ''), ENT_COMPAT, 'UTF-8'); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); $frameborder = htmlspecialchars($params->get('frameborder', ''), ENT_COMPAT, 'UTF-8'); $ititle = $module->title; $id = $module->id; require JModuleHelper::getLayoutPath('mod_wrapper', $params->get('layout', 'default')); mod_wrapper/mod_wrapper.xml 0000604 00000007650 15245362373 0012142 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_wrapper</name> <author>Joomla! Project</author> <creationDate>October 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_WRAPPER_XML_DESCRIPTION</description> <files> <filename module="mod_wrapper">mod_wrapper.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_wrapper.ini</language> <language tag="en-GB">en-GB.mod_wrapper.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_WRAPPER" /> <config> <fields name="params"> <fieldset name="basic"> <field name="url" type="text" label="MOD_WRAPPER_FIELD_URL_LABEL" description="MOD_WRAPPER_FIELD_URL_DESC" size="30" required="true" /> <field name="add" type="radio" label="MOD_WRAPPER_FIELD_ADD_LABEL" description="MOD_WRAPPER_FIELD_ADD_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="scrolling" type="list" label="MOD_WRAPPER_FIELD_SCROLL_LABEL" description="MOD_WRAPPER_FIELD_SCROLL_DESC" default="auto" > <option value="auto">MOD_WRAPPER_FIELD_VALUE_AUTO</option> <option value="no">JNO</option> <option value="yes">JYES</option> </field> <field name="width" type="text" label="MOD_WRAPPER_FIELD_WIDTH_LABEL" description="MOD_WRAPPER_FIELD_WIDTH_DESC" size="5" default="100%" /> <field name="height" type="text" label="MOD_WRAPPER_FIELD_HEIGHT_LABEL" description="MOD_WRAPPER_FIELD_HEIGHT_DESC" size="5" default="200" /> <field name="height_auto" type="radio" label="MOD_WRAPPER_FIELD_AUTOHEIGHT_LABEL" description="MOD_WRAPPER_FIELD_AUTOHEIGHT_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="frameborder" type="radio" label="MOD_WRAPPER_FIELD_FRAME_LABEL" description="MOD_WRAPPER_FIELD_FRAME_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="target" type="text" label="MOD_WRAPPER_FIELD_TARGET_LABEL" description="MOD_WRAPPER_FIELD_TARGET_DESC" size="30" /> </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> mod_wrapper/helper.php 0000604 00000002604 15245362373 0011063 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_wrapper * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Helper for mod_wrapper * * @since 1.5 */ class ModWrapperHelper { /** * Gets the parameters for the wrapper * * @param mixed &$params The parameters set in the administrator section * * @return mixed ¶ms The modified parameters * * @since 1.5 */ public static function getParams(&$params) { $params->def('url', ''); $params->def('scrolling', 'auto'); $params->def('height', '200'); $params->def('height_auto', 0); $params->def('width', '100%'); $params->def('add', 1); $params->def('name', 'wrapper'); $url = $params->get('url'); if ($params->get('add')) { // Adds 'http://' if none is set if (strpos($url, '/') === 0) { // Relative URL in component. use server http_host. $url = 'http://' . $_SERVER['HTTP_HOST'] . $url; } elseif (strpos($url, 'http') === false && strpos($url, 'https') === false) { $url = 'http://' . $url; } } // Auto height control if ($params->def('height_auto')) { $load = 'onload="iFrameHeight(this)"'; } else { $load = ''; } $params->set('load', $load); $params->set('url', $url); return $params; } } mod_articles_popular/tmpl/default.php 0000604 00000001110 15245362373 0014063 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_popular * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <ul class="mostread<?php echo $moduleclass_sfx; ?> mod-list"> <?php foreach ($list as $item) : ?> <li itemscope itemtype="https://schema.org/Article"> <a href="<?php echo $item->link; ?>" itemprop="url"> <span itemprop="name"> <?php echo $item->title; ?> </span> </a> </li> <?php endforeach; ?> </ul> mod_articles_popular/helper.php 0000604 00000006102 15245362373 0012750 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_popular * * @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; JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php'); JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_content/models', 'ContentModel'); /** * Helper for mod_articles_popular * * @since 1.6 */ abstract class ModArticlesPopularHelper { /** * Get a list of popular articles from the articles model * * @param \Joomla\Registry\Registry &$params object holding the models parameters * * @return mixed */ public static function getList(&$params) { // Get an instance of the generic articles model $model = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true)); // Set application parameters in model $app = JFactory::getApplication(); $appParams = $app->getParams(); $model->setState('params', $appParams); $model->setState('list.start', 0); $model->setState('filter.published', 1); // Set the filters based on the module params $model->setState('list.limit', (int) $params->get('count', 5)); $model->setState('filter.featured', $params->get('show_front', 1) == 1 ? 'show' : 'hide'); // This module does not use tags data $model->setState('load_tags', false); // Access filter $access = !JComponentHelper::getParams('com_content')->get('show_noauth'); $authorised = JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id')); $model->setState('filter.access', $access); // Category filter $model->setState('filter.category_id', $params->get('catid', array())); // Date filter $date_filtering = $params->get('date_filtering', 'off'); if ($date_filtering !== 'off') { $model->setState('filter.date_filtering', $date_filtering); $model->setState('filter.date_field', $params->get('date_field', 'a.created')); $model->setState('filter.start_date_range', $params->get('start_date_range', '1000-01-01 00:00:00')); $model->setState('filter.end_date_range', $params->get('end_date_range', '9999-12-31 23:59:59')); $model->setState('filter.relative_date', $params->get('relative_date', 30)); } // Filter by language $model->setState('filter.language', $app->getLanguageFilter()); // Ordering $model->setState('list.ordering', 'a.hits'); $model->setState('list.direction', 'DESC'); $items = $model->getItems(); foreach ($items as &$item) { $item->slug = $item->id . ':' . $item->alias; /** @deprecated Catslug is deprecated, use catid instead. 4.0 */ $item->catslug = $item->catid . ':' . $item->category_alias; if ($access || in_array($item->access, $authorised)) { // We know that user has the privilege to view the article $item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); } else { $item->link = JRoute::_('index.php?option=com_users&view=login'); } } return $items; } } mod_articles_popular/mod_articles_popular.php 0000604 00000001162 15245362373 0015701 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_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 popular functions only once JLoader::register('ModArticlesPopularHelper', __DIR__ . '/helper.php'); $list = ModArticlesPopularHelper::getList($params); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_articles_popular', $params->get('layout', 'default')); mod_articles_popular/mod_articles_popular.xml 0000604 00000011031 15245362373 0015706 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_articles_popular</name> <author>Joomla! Project</author> <creationDate>July 2006</creationDate> <copyright>(C) 2006 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_articles_popular">mod_articles_popular.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_articles_popular.ini</language> <language tag="en-GB">en-GB.mod_articles_popular.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_MOST_READ" /> <config> <fields name="params"> <fieldset name="basic"> <field name="catid" type="category" label="JCATEGORY" description="MOD_POPULAR_FIELD_CATEGORY_DESC" extension="com_content" multiple="true" filter="int_array" /> <field name="count" type="number" label="MOD_POPULAR_FIELD_COUNT_LABEL" description="MOD_POPULAR_FIELD_COUNT_DESC" default="5" filter="integer" /> <field name="show_front" type="radio" label="MOD_POPULAR_FIELD_FEATURED_LABEL" description="MOD_POPULAR_FIELD_FEATURED_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="basicspacer1" type="spacer" hr="true" /> <field name="date_filtering" type="list" label="MOD_POPULAR_FIELD_DATEFILTERING_LABEL" description="MOD_POPULAR_FIELD_DATEFILTERING_DESC" default="off" validate="options" > <option value="off">MOD_POPULAR_OPTION_OFF_VALUE</option> <option value="range">MOD_POPULAR_OPTION_DATERANGE_VALUE</option> <option value="relative">MOD_POPULAR_OPTION_RELATIVEDAY_VALUE</option> </field> <field name="date_field" type="list" label="MOD_POPULAR_FIELD_DATEFIELD_LABEL" description="MOD_POPULAR_FIELD_DATEFIELD_DESC" default="a.created" showon="date_filtering:range,relative" validate="options" > <option value="a.created">MOD_POPULAR_OPTION_CREATED_VALUE</option> <option value="a.modified">MOD_POPULAR_OPTION_MODIFIED_VALUE</option> <option value="a.publish_up">MOD_POPULAR_OPTION_STARTPUBLISHING_VALUE</option> </field> <field name="start_date_range" type="calendar" label="MOD_POPULAR_FIELD_STARTDATE_LABEL" description="MOD_POPULAR_FIELD_STARTDATE_DESC" translateformat="true" showtime="true" size="22" filter="user_utc" showon="date_filtering:range" /> <field name="end_date_range" type="calendar" label="MOD_POPULAR_FIELD_ENDDATE_LABEL" description="MOD_POPULAR_FIELD_ENDDATE_DESC" translateformat="true" showtime="true" size="22" filter="user_utc" showon="date_filtering:range" /> <field name="relative_date" type="number" label="MOD_POPULAR_FIELD_RELATIVEDATE_LABEL" description="MOD_POPULAR_FIELD_RELATIVEDATE_DESC" default="30" filter="integer" showon="date_filtering:relative" /> </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> mod_articles_news/mod_articles_news.xml 0000604 00000016412 15245362373 0014502 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_articles_news</name> <author>Joomla! Project</author> <creationDate>July 2006</creationDate> <copyright>(C) 2006 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_ARTICLES_NEWS_XML_DESCRIPTION</description> <files> <filename module="mod_articles_news">mod_articles_news.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_articles_news.ini</language> <language tag="en-GB">en-GB.mod_articles_news.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_ARTICLES_NEWSFLASH"/> <config> <fields name="params"> <fieldset name="basic"> <field name="catid" type="category" label="JCATEGORY" description="MOD_ARTICLES_NEWS_FIELD_CATEGORY_DESC" extension="com_content" multiple="true" filter="int_array" class="multipleCategories" /> <field name="tag" type="tag" label="JTAG" description="JTAG_DESC" mode="nested" multiple="true" filter="int_array" class="multipleTags" /> <field name="image" type="radio" label="MOD_ARTICLES_NEWS_FIELD_IMAGES_LABEL" description="MOD_ARTICLES_NEWS_FIELD_IMAGES_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="img_intro_full" type="list" label="MOD_ARTICLES_NEWS_FIELD_IMAGES_ARTICLE_LABEL" description="MOD_ARTICLES_NEWS_FIELD_IMAGES_ARTICLE_DESC" default="none" > <option value="intro">MOD_ARTICLES_NEWS_OPTION_INTROIMAGE</option> <option value="full">MOD_ARTICLES_NEWS_OPTION_FULLIMAGE</option> <option value="none">JNO</option> </field> <field name="item_title" type="radio" label="MOD_ARTICLES_NEWS_FIELD_TITLE_LABEL" description="MOD_ARTICLES_NEWS_FIELD_TITLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="link_titles" type="list" label="MOD_ARTICLES_NEWS_FIELD_LINKTITLE_LABEL" description="MOD_ARTICLES_NEWS_FIELD_LINKTITLE_DESC" default="" filter="integer" class="chzn-color" showon="item_title:1" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JNO</option> <option value="1">JYES</option> </field> <field name="item_heading" type="list" label="MOD_ARTICLES_NEWS_TITLE_HEADING" description="MOD_ARTICLES_NEWS_TITLE_HEADING_DESCRIPTION" default="h4" showon="item_title:1" validate="options" > <option value="h1">JH1</option> <option value="h2">JH2</option> <option value="h3">JH3</option> <option value="h4">JH4</option> <option value="h5">JH5</option> </field> <field name="triggerevents" type="radio" label="MOD_ARTICLES_NEWS_FIELD_TRIGGEREVENTS_LABEL" description="MOD_ARTICLES_NEWS_FIELD_TRIGGEREVENTS_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="showLastSeparator" type="radio" label="MOD_ARTICLES_NEWS_FIELD_SEPARATOR_LABEL" description="MOD_ARTICLES_NEWS_FIELD_SEPARATOR_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="show_introtext" type="radio" label="MOD_ARTICLES_NEWS_FIELD_SHOWINTROTEXT_LABEL" description="MOD_ARTICLES_NEWS_FIELD_SHOWINTROTEXT_DESC" default="1" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="readmore" type="radio" label="MOD_ARTICLES_NEWS_FIELD_READMORE_LABEL" description="MOD_ARTICLES_NEWS_FIELD_READMORE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="count" type="number" label="MOD_ARTICLES_NEWS_FIELD_ITEMS_LABEL" description="MOD_ARTICLES_NEWS_FIELD_ITEMS_DESC" default="5" filter="integer" /> <field name="show_featured" type="list" label="MOD_ARTICLES_NEWS_FIELD_FEATURED_LABEL" description="MOD_ARTICLES_NEWS_FIELD_FEATURED_DESC" default="" filter="integer" > <option value="">JSHOW</option> <option value="0">JHIDE</option> <option value="1">MOD_ARTICLES_NEWS_VALUE_ONLY_SHOW_FEATURED</option> </field> <field name="ordering" type="list" label="MOD_ARTICLES_NEWS_FIELD_ORDERING_LABEL" description="MOD_ARTICLES_NEWS_FIELD_ORDERING_DESC" default="a.publish_up" validate="options" > <option value="a.publish_up">MOD_ARTICLES_NEWS_FIELD_ORDERING_PUBLISHED_DATE</option> <option value="a.created">MOD_ARTICLES_NEWS_FIELD_ORDERING_CREATED_DATE</option> <option value="a.modified">MOD_ARTICLES_NEWS_FIELD_ORDERING_MODIFIED_DATE</option> <option value="a.ordering">MOD_ARTICLES_NEWS_FIELD_ORDERING_ORDERING</option> <option value="a.hits">JGLOBAL_HITS</option> <option value="rand()">MOD_ARTICLES_NEWS_FIELD_ORDERING_RANDOM</option> </field> <field name="direction" type="list" label="JGLOBAL_ORDER_DIRECTION_LABEL" description="JGLOBAL_ORDER_DIRECTION_DESC" default="1" filter="integer" showon="ordering:a.publish_up,a.created,a.modified,a.ordering,a.hits" > <option value="0">JGLOBAL_ORDER_ASCENDING</option> <option value="1">JGLOBAL_ORDER_DESCENDING</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="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="itemid" > <option value="itemid"></option> </field> </fieldset> </fields> </config> </extension> mod_articles_news/mod_articles_news.php 0000604 00000001161 15245362373 0014464 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_news * * @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; // Include the news functions only once JLoader::register('ModArticlesNewsHelper', __DIR__ . '/helper.php'); $list = ModArticlesNewsHelper::getList($params); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_articles_news', $params->get('layout', 'horizontal')); mod_articles_news/tmpl/horizontal.php 0000604 00000001305 15245362373 0014130 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_news * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <ul class="newsflash-horiz<?php echo $params->get('moduleclass_sfx'); ?> mod-list"> <?php for ($i = 0, $n = count($list); $i < $n; $i ++) : ?> <?php $item = $list[$i]; ?> <li> <?php require JModuleHelper::getLayoutPath('mod_articles_news', '_item'); ?> <?php if ($n > 1 && (($i < $n - 1) || $params->get('showLastSeparator'))) : ?> <span class="article-separator"> </span> <?php endif; ?> </li> <?php endfor; ?> </ul> mod_articles_news/tmpl/default.php 0000604 00000000720 15245362373 0013363 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_news * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <div class="newsflash<?php echo $moduleclass_sfx; ?>"> <?php foreach ($list as $item) : ?> <?php require JModuleHelper::getLayoutPath('mod_articles_news', '_item'); ?> <?php endforeach; ?> </div> mod_articles_news/tmpl/_item.php 0000604 00000003055 15245362373 0013040 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_news * * @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; ?> <?php if ($params->get('item_title')) : ?> <?php $item_heading = $params->get('item_heading', 'h4'); ?> <<?php echo $item_heading; ?> class="newsflash-title<?php echo $params->get('moduleclass_sfx'); ?>"> <?php if ($item->link !== '' && $params->get('link_titles')) : ?> <a href="<?php echo $item->link; ?>"> <?php echo $item->title; ?> </a> <?php else : ?> <?php echo $item->title; ?> <?php endif; ?> </<?php echo $item_heading; ?>> <?php endif; ?> <?php if ($params->get('img_intro_full') !== 'none' && !empty($item->imageSrc)) : ?> <figure class="newsflash-image"> <img src="<?php echo $item->imageSrc; ?>" alt="<?php echo $item->imageAlt; ?>"> <?php if (!empty($item->imageCaption)) : ?> <figcaption> <?php echo $item->imageCaption; ?> </figcaption> <?php endif; ?> </figure> <?php endif; ?> <?php if (!$params->get('intro_only')) : ?> <?php echo $item->afterDisplayTitle; ?> <?php endif; ?> <?php echo $item->beforeDisplayContent; ?> <?php if ($params->get('show_introtext', 1)) : ?> <?php echo $item->introtext; ?> <?php endif; ?> <?php echo $item->afterDisplayContent; ?> <?php if (isset($item->link) && $item->readmore != 0 && $params->get('readmore')) : ?> <?php echo '<a class="readmore" href="' . $item->link . '">' . $item->linkText . '</a>'; ?> <?php endif; ?> mod_articles_news/tmpl/vertical.php 0000604 00000001333 15245362373 0013551 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_news * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <ul class="newsflash-vert<?php echo $params->get('moduleclass_sfx'); ?> mod-list"> <?php for ($i = 0, $n = count($list); $i < $n; $i ++) : ?> <?php $item = $list[$i]; ?> <li class="newsflash-item"> <?php require JModuleHelper::getLayoutPath('mod_articles_news', '_item'); ?> <?php if ($n > 1 && (($i < $n - 1) || $params->get('showLastSeparator'))) : ?> <span class="article-separator"> </span> <?php endif; ?> </li> <?php endfor; ?> </ul> mod_articles_news/helper.php 0000604 00000013424 15245362373 0012247 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_news * * @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; JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php'); JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_content/models', 'ContentModel'); /** * Helper for mod_articles_news * * @since 1.6 */ abstract class ModArticlesNewsHelper { /** * Get a list of the latest articles from the article model * * @param \Joomla\Registry\Registry &$params object holding the models parameters * * @return mixed * * @since 1.6 */ public static function getList(&$params) { // Get an instance of the generic articles model $model = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true)); // Set application parameters in model $app = JFactory::getApplication(); $appParams = $app->getParams(); $model->setState('params', $appParams); $model->setState('list.start', 0); $model->setState('filter.published', 1); // Set the filters based on the module params $model->setState('list.limit', (int) $params->get('count', 5)); // This module does not use tags data $model->setState('load_tags', false); // Access filter $access = !JComponentHelper::getParams('com_content')->get('show_noauth'); $authorised = JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id')); $model->setState('filter.access', $access); // Category filter $model->setState('filter.category_id', $params->get('catid', array())); // Filter by language $model->setState('filter.language', $app->getLanguageFilter()); // Filer by tag $model->setState('filter.tag', $params->get('tag', array())); // Featured switch $featured = $params->get('show_featured', ''); if ($featured === '') { $model->setState('filter.featured', 'show'); } elseif ($featured) { $model->setState('filter.featured', 'only'); } else { $model->setState('filter.featured', 'hide'); } // Set ordering $ordering = $params->get('ordering', 'a.publish_up'); $model->setState('list.ordering', $ordering); if (trim($ordering) === 'rand()') { $model->setState('list.ordering', JFactory::getDbo()->getQuery(true)->Rand()); } else { $direction = $params->get('direction', 1) ? 'DESC' : 'ASC'; $model->setState('list.direction', $direction); $model->setState('list.ordering', $ordering); } // Check if we should trigger additional plugin events $triggerEvents = $params->get('triggerevents', 1); // Retrieve Content $items = $model->getItems(); foreach ($items as &$item) { $item->readmore = strlen(trim($item->fulltext)); $item->slug = $item->id . ':' . $item->alias; /** @deprecated Catslug is deprecated, use catid instead. 4.0 */ $item->catslug = $item->catid . ':' . $item->category_alias; if ($access || in_array($item->access, $authorised)) { // We know that user has the privilege to view the article $item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); $item->linkText = JText::_('MOD_ARTICLES_NEWS_READMORE'); } else { $item->link = new JUri(JRoute::_('index.php?option=com_users&view=login', false)); $item->link->setVar('return', base64_encode(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language))); $item->linkText = JText::_('MOD_ARTICLES_NEWS_READMORE_REGISTER'); } $item->introtext = JHtml::_('content.prepare', $item->introtext, '', 'mod_articles_news.content'); // Remove any images belongs to the text if (!$params->get('image')) { $item->introtext = preg_replace('/<img[^>]*>/', '', $item->introtext); } // Show the Intro/Full image field of the article if ($params->get('img_intro_full') !== 'none') { $images = json_decode($item->images); $item->imageSrc = ''; $item->imageAlt = ''; $item->imageCaption = ''; if ($params->get('img_intro_full') === 'intro' && !empty($images->image_intro)) { $item->imageSrc = htmlspecialchars($images->image_intro, ENT_COMPAT, 'UTF-8'); $item->imageAlt = htmlspecialchars($images->image_intro_alt, ENT_COMPAT, 'UTF-8'); if ($images->image_intro_caption) { $item->imageCaption = htmlspecialchars($images->image_intro_caption, ENT_COMPAT, 'UTF-8'); } } elseif ($params->get('img_intro_full') === 'full' && !empty($images->image_fulltext)) { $item->imageSrc = htmlspecialchars($images->image_fulltext, ENT_COMPAT, 'UTF-8'); $item->imageAlt = htmlspecialchars($images->image_fulltext_alt, ENT_COMPAT, 'UTF-8'); if ($images->image_intro_caption) { $item->imageCaption = htmlspecialchars($images->image_fulltext_caption, ENT_COMPAT, 'UTF-8'); } } } if ($triggerEvents) { $item->text = ''; $app->triggerEvent('onContentPrepare', array ('com_content.article', &$item, &$params, 0)); $results = $app->triggerEvent('onContentAfterTitle', array('com_content.article', &$item, &$params, 0)); $item->afterDisplayTitle = trim(implode("\n", $results)); $results = $app->triggerEvent('onContentBeforeDisplay', array('com_content.article', &$item, &$params, 0)); $item->beforeDisplayContent = trim(implode("\n", $results)); $results = $app->triggerEvent('onContentAfterDisplay', array('com_content.article', &$item, &$params, 0)); $item->afterDisplayContent = trim(implode("\n", $results)); } else { $item->afterDisplayTitle = ''; $item->beforeDisplayContent = ''; $item->afterDisplayContent = ''; } } return $items; } } mod_tags_similar/mod_tags_similar.php 0000604 00000001634 15245362373 0014121 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_tags_similar * * @copyright (C) 2013 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 tags_similar functions only once JLoader::register('ModTagssimilarHelper', __DIR__ . '/helper.php'); $cacheparams = new stdClass; $cacheparams->cachemode = 'safeuri'; $cacheparams->class = 'ModTagssimilarHelper'; $cacheparams->method = 'getList'; $cacheparams->methodparams = $params; $cacheparams->modeparams = array('id' => 'array', 'Itemid' => 'int'); $list = JModuleHelper::moduleCache($module, $params, $cacheparams); if (!count($list)) { return; } $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_tags_similar', $params->get('layout', 'default')); mod_tags_similar/mod_tags_similar.xml 0000604 00000005663 15245362373 0014140 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_tags_similar</name> <author>Joomla! Project</author> <creationDate>January 2013</creationDate> <copyright>(C) 2013 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.1.0</version> <description>MOD_TAGS_SIMILAR_XML_DESCRIPTION</description> <files> <filename module="mod_tags_similar">mod_tags_similar.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_tags_similar.ini</language> <language tag="en-GB">en-GB.mod_tags_similar.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_TAGS_SIMILAR" /> <config> <fields name="params"> <fieldset name="basic"> <field name="maximum" type="integer" label="MOD_TAGS_SIMILAR_MAX_LABEL" description="MOD_TAGS_SIMILAR_MAX_DESC" default="5" filter="integer" first="1" last="20" step="1" /> <field name="matchtype" type="list" label="MOD_TAGS_SIMILAR_FIELD_MATCHTYPE_LABEL" description="MOD_TAGS_SIMILAR_FIELD_MATCHTYPE_DESC" default="any" > <option value="all">MOD_TAGS_SIMILAR_FIELD_ALL</option> <option value="any">MOD_TAGS_SIMILAR_FIELD_ONE</option> <option value="half">MOD_TAGS_SIMILAR_FIELD_HALF</option> </field> <field name="ordering" type="list" label="MOD_TAGS_SIMILAR_FIELD_ORDERING_LABEL" description="MOD_TAGS_SIMILAR_FIELD_ORDERING_DESC" default="count" > <option value="count">MOD_TAGS_SIMILAR_FIELD_ORDERING_COUNT</option> <option value="random">MOD_TAGS_SIMILAR_FIELD_ORDERING_RANDOM</option> <option value="countrandom">MOD_TAGS_SIMILAR_FIELD_ORDERING_COUNT_AND_RANDOM</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="owncache" 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> mod_tags_similar/tmpl/default.php 0000604 00000002035 15245362373 0013200 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_tags_similar * * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <div class="tagssimilar<?php echo $moduleclass_sfx; ?>"> <?php if ($list) : ?> <ul> <?php foreach ($list as $i => $item) : ?> <li> <?php if (($item->type_alias === 'com_users.category') || ($item->type_alias === 'com_banners.category')) : ?> <?php if (!empty($item->core_title)) : ?> <?php echo htmlspecialchars($item->core_title, ENT_COMPAT, 'UTF-8'); ?> <?php endif; ?> <?php else : ?> <a href="<?php echo JRoute::_($item->link); ?>"> <?php if (!empty($item->core_title)) : ?> <?php echo htmlspecialchars($item->core_title, ENT_COMPAT, 'UTF-8'); ?> <?php endif; ?> </a> <?php endif; ?> </li> <?php endforeach; ?> </ul> <?php else : ?> <span><?php echo JText::_('MOD_TAGS_SIMILAR_NO_MATCHING_TAGS'); ?></span> <?php endif; ?> </div> mod_tags_similar/helper.php 0000604 00000011753 15245362373 0012066 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_tags_similar * * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; JLoader::register('TagsHelperRoute', JPATH_BASE . '/components/com_tags/helpers/route.php'); /** * Helper for mod_tags_similar * * @since 3.1 */ abstract class ModTagssimilarHelper { /** * Get a list of tags * * @param Registry &$params Module parameters * * @return array */ public static function getList(&$params) { $app = JFactory::getApplication(); $option = $app->input->get('option'); $view = $app->input->get('view'); // For now assume com_tags and com_users do not have tags. // This module does not apply to list views in general at this point. if ($option === 'com_tags' || $view === 'category' || $option === 'com_users') { return array(); } $db = JFactory::getDbo(); $user = JFactory::getUser(); $groups = implode(',', $user->getAuthorisedViewLevels()); $matchtype = $params->get('matchtype', 'all'); $maximum = $params->get('maximum', 5); $ordering = $params->get('ordering', 'count'); $tagsHelper = new JHelperTags; $prefix = $option . '.' . $view; $id = $app->input->getInt('id'); $now = JFactory::getDate()->toSql(); $nullDate = $db->getNullDate(); $tagsToMatch = $tagsHelper->getTagIds($id, $prefix); if (!$tagsToMatch || $tagsToMatch === null) { return array(); } $tagCount = substr_count($tagsToMatch, ',') + 1; $query = $db->getQuery(true) ->select( array( $db->quoteName('m.core_content_id'), $db->quoteName('m.content_item_id'), $db->quoteName('m.type_alias'), 'COUNT( ' . $db->quoteName('tag_id') . ') AS ' . $db->quoteName('count'), $db->quoteName('ct.router'), $db->quoteName('cc.core_title'), $db->quoteName('cc.core_alias'), $db->quoteName('cc.core_catid'), $db->quoteName('cc.core_language'), $db->quoteName('cc.core_params'), ) ); $query->from($db->quoteName('#__contentitem_tag_map', 'm')); $query->join('INNER', $db->quoteName('#__tags', 't') . ' ON m.tag_id = t.id') ->join('INNER', $db->quoteName('#__ucm_content', 'cc') . ' ON m.core_content_id = cc.core_content_id') ->join('INNER', $db->quoteName('#__content_types', 'ct') . ' ON m.type_alias = ct.type_alias'); $query->where($db->quoteName('m.tag_id') . ' IN (' . $tagsToMatch . ')'); $query->where('t.access IN (' . $groups . ')'); $query->where('(cc.core_access IN (' . $groups . ') OR cc.core_access = 0)'); // Don't show current item $query->where('(' . $db->quoteName('m.content_item_id') . ' <> ' . $id . ' OR ' . $db->quoteName('m.type_alias') . ' <> ' . $db->quote($prefix) . ')' ); // Only return published tags $query->where($db->quoteName('cc.core_state') . ' = 1 ') ->where('(' . $db->quoteName('cc.core_publish_up') . '=' . $db->quote($nullDate) . ' OR ' . $db->quoteName('cc.core_publish_up') . '<=' . $db->quote($now) . ')' ) ->where('(' . $db->quoteName('cc.core_publish_down') . '=' . $db->quote($nullDate) . ' OR ' . $db->quoteName('cc.core_publish_down') . '>=' . $db->quote($now) . ')' ); // Optionally filter on language $language = JComponentHelper::getParams('com_tags')->get('tag_list_language_filter', 'all'); if ($language !== 'all') { if ($language === 'current_language') { $language = JHelperContent::getCurrentLanguage(); } $query->where($db->quoteName('cc.core_language') . ' IN (' . $db->quote($language) . ', ' . $db->quote('*') . ')'); } $query->group( $db->quoteName( array('m.core_content_id', 'm.content_item_id', 'm.type_alias', 'ct.router', 'cc.core_title', 'cc.core_alias', 'cc.core_catid', 'cc.core_language', 'cc.core_params') ) ); if ($matchtype === 'all' && $tagCount > 0) { $query->having('COUNT( ' . $db->quoteName('tag_id') . ') = ' . $tagCount); } elseif ($matchtype === 'half' && $tagCount > 0) { $tagCountHalf = ceil($tagCount / 2); $query->having('COUNT( ' . $db->quoteName('tag_id') . ') >= ' . $tagCountHalf); } if ($ordering === 'count' || $ordering === 'countrandom') { $query->order($db->quoteName('count') . ' DESC'); } if ($ordering === 'random' || $ordering === 'countrandom') { $query->order($query->Rand()); } $db->setQuery($query, 0, $maximum); try { $results = $db->loadObjectList(); } catch (RuntimeException $e) { $results = array(); JFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); } foreach ($results as $result) { $result->link = TagsHelperRoute::getItemRoute( $result->content_item_id, $result->core_alias, $result->core_catid, $result->core_language, $result->type_alias, $result->router ); $result->core_params = new Registry($result->core_params); } return $results; } } index.html 0000604 00000000037 15245362373 0006547 0 ustar 00 <!DOCTYPE html><title></title> mod_search/mod_search.xml 0000604 00000010775 15245362373 0011516 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_search</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_SEARCH_XML_DESCRIPTION</description> <files> <filename module="mod_search">mod_search.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_search.ini</language> <language tag="en-GB">en-GB.mod_search.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_SEARCH" /> <config> <fields name="params"> <fieldset name="basic"> <field name="label" type="label" label="MOD_SEARCH_FIELD_LABEL_TEXT_LABEL" description="MOD_SEARCH_FIELD_LABEL_TEXT_DESC" /> <field name="width" type="number" label="MOD_SEARCH_FIELD_BOXWIDTH_LABEL" description="MOD_SEARCH_FIELD_BOXWIDTH_DESC" filter="integer" /> <field name="text" type="text" label="MOD_SEARCH_FIELD_TEXT_LABEL" description="MOD_SEARCH_FIELD_TEXT_DESC" /> <field name="button" type="radio" label="MOD_SEARCH_FIELD_BUTTON_LABEL" description="MOD_SEARCH_FIELD_BUTTON_DESC" default="0" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="button_pos" type="list" label="MOD_SEARCH_FIELD_BUTTONPOS_LABEL" description="MOD_SEARCH_FIELD_BUTTONPOS_DESC" default="left" showon="button:1" > <option value="right">MOD_SEARCH_FIELD_VALUE_RIGHT</option> <option value="left">MOD_SEARCH_FIELD_VALUE_LEFT</option> <option value="top">MOD_SEARCH_FIELD_VALUE_TOP</option> <option value="bottom">MOD_SEARCH_FIELD_VALUE_BOTTOM</option> </field> <field name="imagebutton" type="radio" label="MOD_SEARCH_FIELD_IMAGEBUTTON_LABEL" description="MOD_SEARCH_FIELD_IMAGEBUTTON_DESC" default="0" filter="integer" class="btn-group btn-group-yesno" showon="button:1" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="button_text" type="text" label="MOD_SEARCH_FIELD_BUTTONTEXT_LABEL" description="MOD_SEARCH_FIELD_BUTTONTEXT_DESC" showon="button:1" /> <field name="opensearch" type="radio" label="MOD_SEARCH_FIELD_OPENSEARCH_LABEL" description="MOD_SEARCH_FIELD_OPENSEARCH_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="opensearch_title" type="text" label="MOD_SEARCH_FIELD_OPENSEARCH_TEXT_LABEL" description="MOD_SEARCH_FIELD_OPENSEARCH_TEXT_DESC" showon="opensearch:1" /> <field name="set_itemid" type="menuitem" label="MOD_SEARCH_FIELD_SETITEMID_LABEL" description="MOD_SEARCH_FIELD_SETITEMID_DESC" default="0" filter="integer" > <option value="0">MOD_SEARCH_SELECT_MENU_ITEMID</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="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="itemid" > <option value="itemid"></option> </field> </fieldset> </fields> </config> </extension> mod_search/tmpl/default.php 0000604 00000004227 15245362373 0011774 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_search * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Including fallback code for the placeholder attribute in the search field. JHtml::_('jquery.framework'); JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9')); if ($width) { $moduleclass_sfx .= ' ' . 'mod_search' . $module->id; $css = 'div.mod_search' . $module->id . ' input[type="search"]{ width:auto; }'; JFactory::getDocument()->addStyleDeclaration($css); $width = ' size="' . $width . '"'; } else { $width = ''; } ?> <div class="search<?php echo $moduleclass_sfx; ?>"> <form action="<?php echo JRoute::_('index.php'); ?>" method="post" class="form-inline" role="search"> <?php $output = '<label for="mod-search-searchword' . $module->id . '" class="element-invisible">' . $label . '</label> '; $output .= '<input name="searchword" id="mod-search-searchword' . $module->id . '" maxlength="' . $maxlength . '" class="inputbox search-query input-medium" type="search"' . $width; $output .= ' placeholder="' . $text . '" />'; if ($button) : if ($imagebutton) : $btn_output = ' <input type="image" alt="' . $button_text . '" class="button" src="' . $img . '" onclick="this.form.searchword.focus();"/>'; else : $btn_output = ' <button class="button btn btn-primary" onclick="this.form.searchword.focus();">' . $button_text . '</button>'; endif; switch ($button_pos) : case 'top' : $output = $btn_output . '<br />' . $output; break; case 'bottom' : $output .= '<br />' . $btn_output; break; case 'right' : $output .= $btn_output; break; case 'left' : default : $output = $btn_output . $output; break; endswitch; endif; echo $output; ?> <input type="hidden" name="task" value="search" /> <input type="hidden" name="option" value="com_search" /> <input type="hidden" name="Itemid" value="<?php echo $mitemid; ?>" /> </form> </div> mod_search/mod_search.php 0000604 00000003672 15245362373 0011503 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_search * * @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 search functions only once JLoader::register('ModSearchHelper', __DIR__ . '/helper.php'); $lang = JFactory::getLanguage(); $app = JFactory::getApplication(); $set_Itemid = (int) $params->get('set_itemid', 0); $mitemid = $set_Itemid > 0 ? $set_Itemid : $app->input->getInt('Itemid'); if ($params->get('opensearch', 1)) { $doc = JFactory::getDocument(); $ostitle = $params->get('opensearch_title', JText::_('MOD_SEARCH_SEARCHBUTTON_TEXT') . ' ' . $app->get('sitename')); $doc->addHeadLink( JUri::getInstance()->toString(array('scheme', 'host', 'port')) . JRoute::_('&option=com_search&format=opensearch&Itemid=' . $mitemid), 'search', 'rel', array( 'title' => htmlspecialchars($ostitle, ENT_COMPAT, 'UTF-8'), 'type' => 'application/opensearchdescription+xml' ) ); } $upper_limit = $lang->getUpperLimitSearchWord(); $button = $params->get('button', 0); $imagebutton = $params->get('imagebutton', 0); $button_pos = $params->get('button_pos', 'left'); $button_text = htmlspecialchars($params->get('button_text', JText::_('MOD_SEARCH_SEARCHBUTTON_TEXT')), ENT_COMPAT, 'UTF-8'); $width = (int) $params->get('width'); $maxlength = $upper_limit; $text = htmlspecialchars($params->get('text', JText::_('MOD_SEARCH_SEARCHBOX_TEXT')), ENT_COMPAT, 'UTF-8'); $label = htmlspecialchars($params->get('label', JText::_('MOD_SEARCH_LABEL_TEXT')), ENT_COMPAT, 'UTF-8'); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); if ($imagebutton) { $img = ModSearchHelper::getSearchImage(); } require JModuleHelper::getLayoutPath('mod_search', $params->get('layout', 'default')); mod_search/helper.php 0000604 00000001074 15245362373 0010650 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_search * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Helper for mod_search * * @since 1.5 */ class ModSearchHelper { /** * Display the search button as an image. * * @return string The HTML for the image. * * @since 1.5 */ public static function getSearchImage() { return JHtml::_('image', 'searchButton.gif', '', null, true, true); } } mod_articles_category/tmpl/default.php 0000604 00000013114 15245362373 0014225 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_category * * @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; ?> <ul class="category-module<?php echo $moduleclass_sfx; ?> mod-list"> <?php if ($grouped) : ?> <?php foreach ($list as $group_name => $group) : ?> <li> <div class="mod-articles-category-group"><?php echo JText::_($group_name); ?></div> <ul> <?php foreach ($group as $item) : ?> <li> <?php if ($params->get('link_titles') == 1) : ?> <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>"> <?php echo $item->title; ?> </a> <?php else : ?> <?php echo $item->title; ?> <?php endif; ?> <?php if ($item->displayHits) : ?> <span class="mod-articles-category-hits"> (<?php echo $item->displayHits; ?>) </span> <?php endif; ?> <?php if ($params->get('show_author')) : ?> <span class="mod-articles-category-writtenby"> <?php echo $item->displayAuthorName; ?> </span> <?php endif; ?> <?php if ($item->displayCategoryTitle) : ?> <span class="mod-articles-category-category"> (<?php echo $item->displayCategoryTitle; ?>) </span> <?php endif; ?> <?php if ($item->displayDate) : ?> <span class="mod-articles-category-date"><?php echo $item->displayDate; ?></span> <?php endif; ?> <?php if ($params->get('show_tags', 0) && $item->tags->itemTags) : ?> <div class="mod-articles-category-tags"> <?php echo JLayoutHelper::render('joomla.content.tags', $item->tags->itemTags); ?> </div> <?php endif; ?> <?php if ($params->get('show_introtext')) : ?> <p class="mod-articles-category-introtext"> <?php echo $item->displayIntrotext; ?> </p> <?php endif; ?> <?php if ($params->get('show_readmore')) : ?> <p class="mod-articles-category-readmore"> <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>"> <?php if ($item->params->get('access-view') == false) : ?> <?php echo JText::_('MOD_ARTICLES_CATEGORY_REGISTER_TO_READ_MORE'); ?> <?php elseif ($readmore = $item->alternative_readmore) : ?> <?php echo $readmore; ?> <?php echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit')); ?> <?php if ($params->get('show_readmore_title', 0) != 0) : ?> <?php echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit')); ?> <?php endif; ?> <?php elseif ($params->get('show_readmore_title', 0) == 0) : ?> <?php echo JText::sprintf('MOD_ARTICLES_CATEGORY_READ_MORE_TITLE'); ?> <?php else : ?> <?php echo JText::_('MOD_ARTICLES_CATEGORY_READ_MORE'); ?> <?php echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit')); ?> <?php endif; ?> </a> </p> <?php endif; ?> </li> <?php endforeach; ?> </ul> </li> <?php endforeach; ?> <?php else : ?> <?php foreach ($list as $item) : ?> <li> <?php if ($params->get('link_titles') == 1) : ?> <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a> <?php else : ?> <?php echo $item->title; ?> <?php endif; ?> <?php if ($item->displayHits) : ?> <span class="mod-articles-category-hits"> (<?php echo $item->displayHits; ?>) </span> <?php endif; ?> <?php if ($params->get('show_author')) : ?> <span class="mod-articles-category-writtenby"> <?php echo $item->displayAuthorName; ?> </span> <?php endif; ?> <?php if ($item->displayCategoryTitle) : ?> <span class="mod-articles-category-category"> (<?php echo $item->displayCategoryTitle; ?>) </span> <?php endif; ?> <?php if ($item->displayDate) : ?> <span class="mod-articles-category-date"> <?php echo $item->displayDate; ?> </span> <?php endif; ?> <?php if ($params->get('show_tags', 0) && $item->tags->itemTags) : ?> <div class="mod-articles-category-tags"> <?php echo JLayoutHelper::render('joomla.content.tags', $item->tags->itemTags); ?> </div> <?php endif; ?> <?php if ($params->get('show_introtext')) : ?> <p class="mod-articles-category-introtext"> <?php echo $item->displayIntrotext; ?> </p> <?php endif; ?> <?php if ($params->get('show_readmore')) : ?> <p class="mod-articles-category-readmore"> <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>"> <?php if ($item->params->get('access-view') == false) : ?> <?php echo JText::_('MOD_ARTICLES_CATEGORY_REGISTER_TO_READ_MORE'); ?> <?php elseif ($readmore = $item->alternative_readmore) : ?> <?php echo $readmore; ?> <?php echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit')); ?> <?php elseif ($params->get('show_readmore_title', 0) == 0) : ?> <?php echo JText::sprintf('MOD_ARTICLES_CATEGORY_READ_MORE_TITLE'); ?> <?php else : ?> <?php echo JText::_('MOD_ARTICLES_CATEGORY_READ_MORE'); ?> <?php echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit')); ?> <?php endif; ?> </a> </p> <?php endif; ?> </li> <?php endforeach; ?> <?php endif; ?> </ul> mod_articles_category/mod_articles_category.xml 0000604 00000042275 15245362373 0016212 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_articles_category</name> <author>Joomla! Project</author> <creationDate>February 2010</creationDate> <copyright>(C) 2010 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_ARTICLES_CATEGORY_XML_DESCRIPTION</description> <files> <filename module="mod_articles_category">mod_articles_category.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_articles_category.ini</language> <language tag="en-GB">en-GB.mod_articles_category.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_ARTICLES_CATEGORY" /> <config> <fields name="params"> <fieldset name="basic"> <field name="mode" type="list" label="MOD_ARTICLES_CATEGORY_FIELD_MODE_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_MODE_DESC" default="normal" > <option value="normal">MOD_ARTICLES_CATEGORY_OPTION_NORMAL_VALUE</option> <option value="dynamic">MOD_ARTICLES_CATEGORY_OPTION_DYNAMIC_VALUE</option> </field> <field name="show_on_article_page" type="radio" label="MOD_ARTICLES_CATEGORY_FIELD_SHOWONARTICLEPAGE_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWONARTICLEPAGE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" showon="mode:dynamic" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> </fieldset> <fieldset name="filtering" label="MOD_ARTICLES_CATEGORY_FIELD_GROUP_FILTERING_LABEL" > <field name="count" type="number" label="MOD_ARTICLES_CATEGORY_FIELD_COUNT_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_COUNT_DESC" default="0" filter="integer" /> <field name="show_front" type="list" label="MOD_ARTICLES_CATEGORY_FIELD_SHOWFEATURED_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWFEATURED_DESC" default="show" validate="options" > <option value="show">JSHOW</option> <option value="hide">JHIDE</option> <option value="only">MOD_ARTICLES_CATEGORY_OPTION_ONLYFEATURED_VALUE</option> </field> <field name="filteringspacer0" type="spacer" hr="true" /> <field name="category_filtering_type" type="radio" label="MOD_ARTICLES_CATEGORY_FIELD_CATFILTERINGTYPE_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_CATFILTERINGTYPE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">MOD_ARTICLES_CATEGORY_OPTION_INCLUSIVE_VALUE</option> <option value="0">MOD_ARTICLES_CATEGORY_OPTION_EXCLUSIVE_VALUE</option> </field> <field name="catid" type="category" label="JCATEGORY" description="MOD_ARTICLES_CATEGORY_FIELD_CATEGORY_DESC" extension="com_content" multiple="true" filter="int_array" class="multipleCategories" /> <field name="show_child_category_articles" type="radio" label="MOD_ARTICLES_CATEGORY_FIELD_SHOWCHILDCATEGORYARTICLES_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWCHILDCATEGORYARTICLES_DESC" default="0" filter="integer" class="btn-group btn-group-yesno" > <option value="1">MOD_ARTICLES_CATEGORY_OPTION_INCLUDE_VALUE</option> <option value="0">MOD_ARTICLES_CATEGORY_OPTION_EXCLUDE_VALUE</option> </field> <field name="levels" type="number" label="MOD_ARTICLES_CATEGORY_FIELD_CATDEPTH_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_CATDEPTH_DESC" default="1" filter="integer" showon="show_child_category_articles:1" /> <field name="filteringspacer1" type="spacer" hr="true" /> <field name="filter_tag" type="tag" label="JTAG" description="JTAG_FIELD_SELECT_DESC" mode="nested" multiple="true" filter="int_array" class="multipleTags" /> <field name="filteringspacer2" type="spacer" hr="true" /> <field name="author_filtering_type" type="radio" label="MOD_ARTICLES_CATEGORY_FIELD_AUTHORFILTERING_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_AUTHORFILTERING_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">MOD_ARTICLES_CATEGORY_OPTION_INCLUSIVE_VALUE</option> <option value="0">MOD_ARTICLES_CATEGORY_OPTION_EXCLUSIVE_VALUE</option> </field> <field name="created_by" type="author" label="MOD_ARTICLES_CATEGORY_FIELD_AUTHOR_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_AUTHOR_DESC" multiple="true" filter="int_array" class="multipleAuthors" /> <field name="filteringspacer3" type="spacer" hr="true" /> <field name="author_alias_filtering_type" type="radio" label="MOD_ARTICLES_CATEGORY_FIELD_AUTHORALIASFILTERING_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_AUTHORALIASFILTERING_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">MOD_ARTICLES_CATEGORY_OPTION_INCLUSIVE_VALUE</option> <option value="0">MOD_ARTICLES_CATEGORY_OPTION_EXCLUSIVE_VALUE</option> </field> <field name="created_by_alias" type="sql" label="MOD_ARTICLES_CATEGORY_FIELD_AUTHORALIAS_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_AUTHORALIAS_DESC" multiple="true" query="select distinct(created_by_alias) from #__content where created_by_alias != '' order by created_by_alias ASC" key_field="created_by_alias" value_field="created_by_alias" class="multipleAuthorAliases" /> <field name="filteringspacer4" type="spacer" hr="true" /> <field name="excluded_articles" type="textarea" label="MOD_ARTICLES_CATEGORY_FIELD_EXCLUDEDARTICLES_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_EXCLUDEDARTICLES_DESC" cols="10" rows="3" /> <field name="filteringspacer5" type="spacer" hr="true" /> <field name="date_filtering" type="list" label="MOD_ARTICLES_CATEGORY_FIELD_DATEFILTERING_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_DATEFILTERING_DESC" default="off" validate="options" > <option value="off">MOD_ARTICLES_CATEGORY_OPTION_OFF_VALUE</option> <option value="range">MOD_ARTICLES_CATEGORY_OPTION_DATERANGE_VALUE</option> <option value="relative">MOD_ARTICLES_CATEGORY_OPTION_RELATIVEDAY_VALUE</option> </field> <field name="date_field" type="list" label="MOD_ARTICLES_CATEGORY_FIELD_DATERANGEFIELD_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_DATERANGEFIELD_DESC" default="a.created" showon="date_filtering!:off" validate="options" > <option value="a.created">MOD_ARTICLES_CATEGORY_OPTION_CREATED_VALUE</option> <option value="a.modified">MOD_ARTICLES_CATEGORY_OPTION_MODIFIED_VALUE</option> <option value="a.publish_up">MOD_ARTICLES_CATEGORY_OPTION_STARTPUBLISHING_VALUE</option> </field> <field name="start_date_range" type="calendar" label="MOD_ARTICLES_CATEGORY_FIELD_STARTDATE_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_STARTDATE_DESC" translateformat="true" showtime="true" size="22" filter="user_utc" showon="date_filtering:range" /> <field name="end_date_range" type="calendar" label="MOD_ARTICLES_CATEGORY_FIELD_ENDDATE_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_ENDDATE_DESC" translateformat="true" showtime="true" size="22" filter="user_utc" showon="date_filtering:range" /> <field name="relative_date" type="number" label="MOD_ARTICLES_CATEGORY_FIELD_RELATIVEDATE_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_RELATIVEDATE_DESC" default="30" filter="integer" showon="date_filtering:relative" /> </fieldset> <fieldset name="ordering" label="MOD_ARTICLES_CATEGORY_FIELD_GROUP_ORDERING_LABEL" > <field name="article_ordering" type="list" label="MOD_ARTICLES_CATEGORY_FIELD_ARTICLEORDERING_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_ARTICLEORDERING_DESC" default="a.title" validate="options" > <option value="a.ordering">MOD_ARTICLES_CATEGORY_OPTION_ORDERING_VALUE</option> <option value="fp.ordering">MOD_ARTICLES_CATEGORY_OPTION_ORDERINGFEATURED_VALUE</option> <option value="a.hits">MOD_ARTICLES_CATEGORY_OPTION_HITS_VALUE</option> <option value="a.title">JGLOBAL_TITLE</option> <option value="a.id">MOD_ARTICLES_CATEGORY_OPTION_ID_VALUE</option> <option value="a.alias">JFIELD_ALIAS_LABEL</option> <option value="a.created">MOD_ARTICLES_CATEGORY_OPTION_CREATED_VALUE</option> <option value="modified">MOD_ARTICLES_CATEGORY_OPTION_MODIFIED_VALUE</option> <option value="publish_up">MOD_ARTICLES_CATEGORY_OPTION_STARTPUBLISHING_VALUE</option> <option value="a.publish_down">MOD_ARTICLES_CATEGORY_OPTION_FINISHPUBLISHING_VALUE</option> <option value="random">MOD_ARTICLES_CATEGORY_OPTION_RANDOM_VALUE</option> <option value="rating_count" requires="vote">MOD_ARTICLES_CATEGORY_OPTION_VOTE_VALUE</option> <option value="rating" requires="vote">MOD_ARTICLES_CATEGORY_OPTION_RATING_VALUE</option> </field> <field name="article_ordering_direction" type="list" label="MOD_ARTICLES_CATEGORY_FIELD_ARTICLEORDERINGDIR_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_ARTICLEORDERINGDIR_DESC" default="ASC" validate="options" > <option value="DESC">MOD_ARTICLES_CATEGORY_OPTION_DESCENDING_VALUE</option> <option value="ASC">MOD_ARTICLES_CATEGORY_OPTION_ASCENDING_VALUE</option> </field> </fieldset> <fieldset name="grouping" label="MOD_ARTICLES_CATEGORY_FIELD_GROUP_GROUPING_LABEL" > <field name="article_grouping" type="list" label="MOD_ARTICLES_CATEGORY_FIELD_ARTICLEGROUPING_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_ARTICLEGROUPING_DESC" default="none" validate="options" > <option value="none">JNONE</option> <option value="year">MOD_ARTICLES_CATEGORY_OPTION_YEAR_VALUE</option> <option value="month_year">MOD_ARTICLES_CATEGORY_OPTION_MONTHYEAR_VALUE</option> <option value="author">JAUTHOR</option> <option value="category_title">JCATEGORY</option> <option value="tags">JTAG</option> </field> <field name="date_grouping_field" type="list" label="MOD_ARTICLES_CATEGORY_FIELD_DATEGROUPINGFIELD_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_DATEGROUPINGFIELD_DESC" default="created" showon="article_grouping:year,month_year" validate="options" > <option value="created">MOD_ARTICLES_CATEGORY_OPTION_CREATED_VALUE</option> <option value="modified">MOD_ARTICLES_CATEGORY_OPTION_MODIFIED_VALUE</option> <option value="publish_up">MOD_ARTICLES_CATEGORY_OPTION_STARTPUBLISHING_VALUE</option> </field> <field name="month_year_format" type="text" label="MOD_ARTICLES_CATEGORY_FIELD_MONTHYEARFORMAT_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_MONTHYEARFORMAT_DESC" default="F Y" showon="article_grouping:year,month_year" /> <field name="article_grouping_direction" type="list" label="MOD_ARTICLES_CATEGORY_FIELD_ARTICLEGROUPINGDIR_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_ARTICLEGROUPINGDIR_DESC" default="ksort" showon="article_grouping!:none" validate="options" > <option value="krsort">MOD_ARTICLES_CATEGORY_OPTION_DESCENDING_VALUE</option> <option value="ksort">MOD_ARTICLES_CATEGORY_OPTION_ASCENDING_VALUE</option> </field> </fieldset> <fieldset name="display" label="MOD_ARTICLES_CATEGORY_FIELD_GROUP_DISPLAY_LABEL" > <field name="link_titles" type="radio" label="MOD_ARTICLES_CATEGORY_FIELD_LINKTITLES_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_LINKTITLES_DESC" default="1" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="show_date" type="radio" label="JDATE" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWDATE_DESC" default="0" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="show_date_field" type="list" label="MOD_ARTICLES_CATEGORY_FIELD_DATEFIELD_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_DATEFIELD_DESC" default="created" showon="show_date:1" validate="options" > <option value="created">MOD_ARTICLES_CATEGORY_OPTION_CREATED_VALUE</option> <option value="modified">MOD_ARTICLES_CATEGORY_OPTION_MODIFIED_VALUE</option> <option value="publish_up">MOD_ARTICLES_CATEGORY_OPTION_STARTPUBLISHING_VALUE</option> </field> <field name="show_date_format" type="text" label="MOD_ARTICLES_CATEGORY_FIELD_DATEFIELDFORMAT_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_DATEFIELDFORMAT_DESC" default="Y-m-d H:i:s" showon="show_date:1" /> <field name="show_category" type="radio" label="JCATEGORY" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWCATEGORY_DESC" default="0" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="show_hits" type="radio" label="MOD_ARTICLES_CATEGORY_FIELD_SHOWHITS_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWHITS_DESC" default="0" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="show_author" type="radio" label="JAUTHOR" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWAUTHOR_DESC" default="0" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="show_tags" type="radio" label="JTAG" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWTAGS_DESC" default="0" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="show_introtext" type="radio" label="MOD_ARTICLES_CATEGORY_FIELD_SHOWINTROTEXT_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_SHOWINTROTEXT_DESC" default="0" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="introtext_limit" type="number" label="MOD_ARTICLES_CATEGORY_FIELD_INTROTEXTLIMIT_LABEL" description="MOD_ARTICLES_CATEGORY_FIELD_INTROTEXTLIMIT_DESC" default="100" filter="integer" showon="show_introtext:1" /> <field name="show_readmore" type="radio" label="JGLOBAL_SHOW_READMORE_LABEL" description="JGLOBAL_SHOW_READMORE_DESC" default="0" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="show_readmore_title" type="radio" label="JGLOBAL_SHOW_READMORE_TITLE_LABEL" description="JGLOBAL_SHOW_READMORE_TITLE_DESC" default="1" filter="integer" class="btn-group btn-group-yesno" showon="show_readmore:1" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="readmore_limit" type="number" label="JGLOBAL_SHOW_READMORE_LIMIT_LABEL" description="JGLOBAL_SHOW_READMORE_LIMIT_DESC" default="15" filter="integer" showon="show_readmore:1[AND]show_readmore_title:1" /> </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="owncache" 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> mod_articles_category/mod_articles_category.php 0000604 00000005075 15245362373 0016176 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_category * * @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; // Include the helper functions only once JLoader::register('ModArticlesCategoryHelper', __DIR__ . '/helper.php'); $input = JFactory::getApplication()->input; // Prep for Normal or Dynamic Modes $mode = $params->get('mode', 'normal'); $idbase = null; switch ($mode) { case 'dynamic' : $option = $input->get('option'); $view = $input->get('view'); if ($option === 'com_content') { switch ($view) { case 'category' : $idbase = $input->getInt('id'); break; case 'categories' : $idbase = $input->getInt('id'); break; case 'article' : if ($params->get('show_on_article_page', 1)) { $idbase = $input->getInt('catid'); } break; } } break; case 'normal' : default: $idbase = $params->get('catid'); break; } $cacheid = md5(serialize(array ($idbase, $module->module, $module->id))); $cacheparams = new stdClass; $cacheparams->cachemode = 'id'; $cacheparams->class = 'ModArticlesCategoryHelper'; $cacheparams->method = 'getList'; $cacheparams->methodparams = $params; $cacheparams->modeparams = $cacheid; $list = JModuleHelper::moduleCache($module, $params, $cacheparams); if (!empty($list)) { $grouped = false; $article_grouping = $params->get('article_grouping', 'none'); $article_grouping_direction = $params->get('article_grouping_direction', 'ksort'); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); $item_heading = $params->get('item_heading'); if ($article_grouping !== 'none') { $grouped = true; switch ($article_grouping) { case 'year' : case 'month_year' : $list = ModArticlesCategoryHelper::groupByDate( $list, $article_grouping, $article_grouping_direction, $params->get('month_year_format', 'F Y'), $params->get('date_grouping_field', 'created') ); break; case 'author' : case 'category_title' : $list = ModArticlesCategoryHelper::groupBy($list, $article_grouping, $article_grouping_direction); break; case 'tags' : $list = ModArticlesCategoryHelper::groupByTags($list, $article_grouping_direction); break; default: break; } } require JModuleHelper::getLayoutPath('mod_articles_category', $params->get('layout', 'default')); } mod_articles_category/helper.php 0000604 00000034742 15245362373 0013116 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_category * * @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; use Joomla\String\StringHelper; $com_path = JPATH_SITE . '/components/com_content/'; JLoader::register('ContentHelperRoute', $com_path . 'helpers/route.php'); JModelLegacy::addIncludePath($com_path . 'models', 'ContentModel'); /** * Helper for mod_articles_category * * @since 1.6 */ abstract class ModArticlesCategoryHelper { /** * Get a list of articles from a specific category * * @param \Joomla\Registry\Registry &$params object holding the models parameters * * @return mixed * * @since 1.6 */ public static function getList(&$params) { // Get an instance of the generic articles model $articles = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true)); // Set application parameters in model $app = JFactory::getApplication(); $appParams = $app->getParams(); $articles->setState('params', $appParams); $articles->setState('list.start', 0); $articles->setState('filter.published', 1); // Set the filters based on the module params $articles->setState('list.limit', (int) $params->get('count', 0)); $articles->setState('load_tags', $params->get('show_tags', 0) || $params->get('article_grouping', 'none') === 'tags'); // Access filter $access = !JComponentHelper::getParams('com_content')->get('show_noauth'); $authorised = JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id')); $articles->setState('filter.access', $access); // Prep for Normal or Dynamic Modes $mode = $params->get('mode', 'normal'); switch ($mode) { case 'dynamic' : $option = $app->input->get('option'); $view = $app->input->get('view'); if ($option === 'com_content') { switch ($view) { case 'category' : case 'categories' : $catids = array($app->input->getInt('id')); break; case 'article' : if ($params->get('show_on_article_page', 1)) { $article_id = $app->input->getInt('id'); $catid = $app->input->getInt('catid'); if (!$catid) { // Get an instance of the generic article model $article = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request' => true)); $article->setState('params', $appParams); $article->setState('filter.published', 1); $article->setState('article.id', (int) $article_id); $item = $article->getItem(); $catids = array($item->catid); } else { $catids = array($catid); } } else { // Return right away if show_on_article_page option is off return; } break; case 'featured' : default: // Return right away if not on the category or article views return; } } else { // Return right away if not on a com_content page return; } break; case 'normal' : default: $catids = $params->get('catid'); $articles->setState('filter.category_id.include', (bool) $params->get('category_filtering_type', 1)); break; } // Category filter if ($catids) { if ($params->get('show_child_category_articles', 0) && (int) $params->get('levels', 0) > 0) { // Get an instance of the generic categories model $categories = JModelLegacy::getInstance('Categories', 'ContentModel', array('ignore_request' => true)); $categories->setState('params', $appParams); $levels = $params->get('levels', 1) ?: 9999; $categories->setState('filter.get_children', $levels); $categories->setState('filter.published', 1); $categories->setState('filter.access', $access); $additional_catids = array(); foreach ($catids as $catid) { $categories->setState('filter.parentId', $catid); $recursive = true; $items = $categories->getItems($recursive); if ($items) { foreach ($items as $category) { $condition = (($category->level - $categories->getParent()->level) <= $levels); if ($condition) { $additional_catids[] = $category->id; } } } } $catids = array_unique(array_merge($catids, $additional_catids)); } $articles->setState('filter.category_id', $catids); } // Ordering $ordering = $params->get('article_ordering', 'a.ordering'); switch ($ordering) { case 'random': $articles->setState('list.ordering', JFactory::getDbo()->getQuery(true)->Rand()); break; case 'rating_count': case 'rating': $articles->setState('list.ordering', $ordering); $articles->setState('list.direction', $params->get('article_ordering_direction', 'ASC')); if (!JPluginHelper::isEnabled('content', 'vote')) { $articles->setState('list.ordering', 'a.ordering'); } break; default: $articles->setState('list.ordering', $ordering); $articles->setState('list.direction', $params->get('article_ordering_direction', 'ASC')); break; } // Filter by multiple tags $articles->setState('filter.tag', $params->get('filter_tag', array())); $articles->setState('filter.featured', $params->get('show_front', 'show')); $articles->setState('filter.author_id', $params->get('created_by', array())); $articles->setState('filter.author_id.include', $params->get('author_filtering_type', 1)); $articles->setState('filter.author_alias', $params->get('created_by_alias', array())); $articles->setState('filter.author_alias.include', $params->get('author_alias_filtering_type', 1)); $excluded_articles = $params->get('excluded_articles', ''); if ($excluded_articles) { $excluded_articles = explode("\r\n", $excluded_articles); $articles->setState('filter.article_id', $excluded_articles); // Exclude $articles->setState('filter.article_id.include', false); } $date_filtering = $params->get('date_filtering', 'off'); if ($date_filtering !== 'off') { $articles->setState('filter.date_filtering', $date_filtering); $articles->setState('filter.date_field', $params->get('date_field', 'a.created')); $articles->setState('filter.start_date_range', $params->get('start_date_range', '1000-01-01 00:00:00')); $articles->setState('filter.end_date_range', $params->get('end_date_range', '9999-12-31 23:59:59')); $articles->setState('filter.relative_date', $params->get('relative_date', 30)); } // Filter by language $articles->setState('filter.language', $app->getLanguageFilter()); $items = $articles->getItems(); // Display options $show_date = $params->get('show_date', 0); $show_date_field = $params->get('show_date_field', 'created'); $show_date_format = $params->get('show_date_format', 'Y-m-d H:i:s'); $show_category = $params->get('show_category', 0); $show_hits = $params->get('show_hits', 0); $show_author = $params->get('show_author', 0); $show_introtext = $params->get('show_introtext', 0); $introtext_limit = $params->get('introtext_limit', 100); // Find current Article ID if on an article page $option = $app->input->get('option'); $view = $app->input->get('view'); if ($option === 'com_content' && $view === 'article') { $active_article_id = $app->input->getInt('id'); } else { $active_article_id = 0; } // Prepare data for display using display options foreach ($items as &$item) { $item->slug = $item->id . ':' . $item->alias; /** @deprecated Catslug is deprecated, use catid instead. 4.0 */ $item->catslug = $item->catid . ':' . $item->category_alias; if ($access || in_array($item->access, $authorised)) { // We know that user has the privilege to view the article $item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); } else { $menu = $app->getMenu(); $menuitems = $menu->getItems('link', 'index.php?option=com_users&view=login'); if (isset($menuitems[0])) { $Itemid = $menuitems[0]->id; } elseif ($app->input->getInt('Itemid') > 0) { // Use Itemid from requesting page only if there is no existing menu $Itemid = $app->input->getInt('Itemid'); } $item->link = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $Itemid); } // Used for styling the active article $item->active = $item->id == $active_article_id ? 'active' : ''; $item->displayDate = ''; if ($show_date) { $item->displayDate = JHtml::_('date', $item->$show_date_field, $show_date_format); } if ($item->catid) { $item->displayCategoryLink = JRoute::_(ContentHelperRoute::getCategoryRoute($item->catid)); $item->displayCategoryTitle = $show_category ? '<a href="' . $item->displayCategoryLink . '">' . $item->category_title . '</a>' : ''; } else { $item->displayCategoryTitle = $show_category ? $item->category_title : ''; } $item->displayHits = $show_hits ? $item->hits : ''; $item->displayAuthorName = $show_author ? $item->author : ''; if ($show_introtext) { $item->introtext = JHtml::_('content.prepare', $item->introtext, '', 'mod_articles_category.content'); $item->introtext = self::_cleanIntrotext($item->introtext); } $item->displayIntrotext = $show_introtext ? self::truncate($item->introtext, $introtext_limit) : ''; $item->displayReadmore = $item->alternative_readmore; } return $items; } /** * Strips unnecessary tags from the introtext * * @param string $introtext introtext to sanitize * * @return mixed|string * * @since 1.6 */ public static function _cleanIntrotext($introtext) { $introtext = str_replace(array('<p>','</p>'), ' ', $introtext); $introtext = strip_tags($introtext, '<a><em><strong>'); $introtext = trim($introtext); return $introtext; } /** * Method to truncate introtext * * The goal is to get the proper length plain text string with as much of * the html intact as possible with all tags properly closed. * * @param string $html The content of the introtext to be truncated * @param integer $maxLength The maximum number of characters to render * * @return string The truncated string * * @since 1.6 */ public static function truncate($html, $maxLength = 0) { $baseLength = strlen($html); // First get the plain text string. This is the rendered text we want to end up with. $ptString = JHtml::_('string.truncate', $html, $maxLength, $noSplit = true, $allowHtml = false); for ($maxLength; $maxLength < $baseLength;) { // Now get the string if we allow html. $htmlString = JHtml::_('string.truncate', $html, $maxLength, $noSplit = true, $allowHtml = true); // Now get the plain text from the html string. $htmlStringToPtString = JHtml::_('string.truncate', $htmlString, $maxLength, $noSplit = true, $allowHtml = false); // If the new plain text string matches the original plain text string we are done. if ($ptString === $htmlStringToPtString) { return $htmlString; } // Get the number of html tag characters in the first $maxlength characters $diffLength = strlen($ptString) - strlen($htmlStringToPtString); // Set new $maxlength that adjusts for the html tags $maxLength += $diffLength; if ($baseLength <= $maxLength || $diffLength <= 0) { return $htmlString; } } return $html; } /** * Groups items by field * * @param array $list list of items * @param string $fieldName name of field that is used for grouping * @param string $direction ordering direction * @param null $fieldNameToKeep field name to keep * * @return array * * @since 1.6 */ public static function groupBy($list, $fieldName, $direction, $fieldNameToKeep = null) { $grouped = array(); if (!is_array($list)) { if ($list == '') { return $grouped; } $list = array($list); } foreach ($list as $key => $item) { if (!isset($grouped[$item->$fieldName])) { $grouped[$item->$fieldName] = array(); } if ($fieldNameToKeep === null) { $grouped[$item->$fieldName][$key] = $item; } else { $grouped[$item->$fieldName][$key] = $item->$fieldNameToKeep; } unset($list[$key]); } $direction($grouped); return $grouped; } /** * Groups items by date * * @param array $list list of items * @param string $type type of grouping * @param string $direction ordering direction * @param string $monthYearFormat date format to use * @param string $field date field to group by * * @return array * * @since 1.6 */ public static function groupByDate($list, $type = 'year', $direction = 'ksort', $monthYearFormat = 'F Y', $field = 'created') { $grouped = array(); if (!is_array($list)) { if ($list == '') { return $grouped; } $list = array($list); } foreach ($list as $key => $item) { switch ($type) { case 'month_year' : $month_year = StringHelper::substr($item->$field, 0, 7); if (!isset($grouped[$month_year])) { $grouped[$month_year] = array(); } $grouped[$month_year][$key] = $item; break; case 'year' : default: $year = StringHelper::substr($item->$field, 0, 4); if (!isset($grouped[$year])) { $grouped[$year] = array(); } $grouped[$year][$key] = $item; break; } unset($list[$key]); } $direction($grouped); if ($type === 'month_year') { foreach ($grouped as $group => $items) { $date = new JDate($group); $formatted_group = $date->format($monthYearFormat); $grouped[$formatted_group] = $items; unset($grouped[$group]); } } return $grouped; } /** * Groups items by tags * * @param array $list list of items * @param string $direction ordering direction * * @return array * * @since 3.9.0 */ public static function groupByTags($list, $direction = 'ksort') { $grouped = array(); $untagged = array(); if (!$list) { return $grouped; } foreach ($list as $item) { if ($item->tags->itemTags) { foreach ($item->tags->itemTags as $tag) { $grouped[$tag->title][] = $item; } } else { $untagged[] = $item; } } $direction($grouped); if ($untagged) { $grouped['MOD_ARTICLES_CATEGORY_UNTAGGED'] = $untagged; } return $grouped; } } mod_custom/mod_custom.xml 0000604 00000005020 15245362373 0011613 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_custom</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_CUSTOM_XML_DESCRIPTION</description> <customContent /> <files> <filename module="mod_custom">mod_custom.php</filename> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.mod_custom.ini</language> <language tag="en-GB">en-GB.mod_custom.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_CUSTOM_HTML" /> <config> <fields name="params"> <fieldset name="options" label="COM_MODULES_BASIC_FIELDSET_LABEL"> <field name="prepare_content" type="radio" label="MOD_CUSTOM_FIELD_PREPARE_CONTENT_LABEL" description="MOD_CUSTOM_FIELD_PREPARE_CONTENT_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="backgroundimage" type="media" label="MOD_CUSTOM_FIELD_BACKGROUNDIMAGE_LABEL" description="MOD_BACKGROUNDIMAGE_FIELD_LOGO_DESC" /> </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> mod_custom/mod_custom.php 0000604 00000001151 15245362373 0011603 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_custom * * @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; if ($params->def('prepare_content', 1)) { JPluginHelper::importPlugin('content'); $module->content = JHtml::_('content.prepare', $module->content, '', 'mod_custom.content'); } $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_custom', $params->get('layout', 'default')); mod_custom/tmpl/default.php 0000604 00000000754 15245362373 0012042 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_custom * * @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; ?> <div class="custom<?php echo $moduleclass_sfx; ?>" <?php if ($params->get('backgroundimage')) : ?> style="background-image:url(<?php echo $params->get('backgroundimage'); ?>)"<?php endif; ?> > <?php echo $module->content; ?> </div> mod_articles_latest/helper.php 0000604 00000007356 15245362373 0012576 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_latest * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php'); JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_content/models', 'ContentModel'); use Joomla\Utilities\ArrayHelper; /** * Helper for mod_articles_latest * * @since 1.6 */ abstract class ModArticlesLatestHelper { /** * Retrieve a list of article * * @param \Joomla\Registry\Registry &$params module parameters * * @return mixed * * @since 1.6 */ public static function getList(&$params) { // Get the dbo $db = JFactory::getDbo(); // Get an instance of the generic articles model $model = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true)); // Set application parameters in model $app = JFactory::getApplication(); $appParams = $app->getParams(); $model->setState('params', $appParams); $model->setState('list.start', 0); $model->setState('filter.published', 1); // Set the filters based on the module params $model->setState('list.limit', (int) $params->get('count', 5)); // This module does not use tags data $model->setState('load_tags', false); // Access filter $access = !JComponentHelper::getParams('com_content')->get('show_noauth'); $authorised = JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id')); $model->setState('filter.access', $access); // Category filter $model->setState('filter.category_id', $params->get('catid', array())); // User filter $userId = JFactory::getUser()->get('id'); switch ($params->get('user_id')) { case 'by_me' : $model->setState('filter.author_id', (int) $userId); break; case 'not_me' : $model->setState('filter.author_id', $userId); $model->setState('filter.author_id.include', false); break; case 'created_by' : $model->setState('filter.author_id', $params->get('author', array())); break; case '0' : break; default: $model->setState('filter.author_id', (int) $params->get('user_id')); break; } // Filter by language $model->setState('filter.language', $app->getLanguageFilter()); // Featured switch $featured = $params->get('show_featured', ''); if ($featured === '') { $model->setState('filter.featured', 'show'); } elseif ($featured) { $model->setState('filter.featured', 'only'); } else { $model->setState('filter.featured', 'hide'); } // Set ordering $order_map = array( 'm_dsc' => 'a.modified DESC, a.created', 'mc_dsc' => 'CASE WHEN (a.modified = ' . $db->quote($db->getNullDate()) . ') THEN a.created ELSE a.modified END', 'c_dsc' => 'a.created', 'p_dsc' => 'a.publish_up', 'random' => $db->getQuery(true)->Rand(), ); $ordering = ArrayHelper::getValue($order_map, $params->get('ordering'), 'a.publish_up'); $dir = 'DESC'; $model->setState('list.ordering', $ordering); $model->setState('list.direction', $dir); $items = $model->getItems(); foreach ($items as &$item) { $item->slug = $item->id . ':' . $item->alias; /** @deprecated Catslug is deprecated, use catid instead. 4.0 */ $item->catslug = $item->catid . ':' . $item->category_alias; if ($access || in_array($item->access, $authorised)) { // We know that user has the privilege to view the article $item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); } else { $item->link = JRoute::_('index.php?option=com_users&view=login'); } } return $items; } } mod_articles_latest/mod_articles_latest.xml 0000604 00000007773 15245362373 0015354 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_articles_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_NEWS_XML_DESCRIPTION</description> <files> <filename module="mod_articles_latest">mod_articles_latest.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_articles_latest.ini</language> <language tag="en-GB">en-GB.mod_articles_latest.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_LATEST_NEWS" /> <config> <fields name="params"> <fieldset name="basic"> <field name="catid" type="category" label="JCATEGORY" description="MOD_LATEST_NEWS_FIELD_CATEGORY_DESC" extension="com_content" multiple="true" filter="int_array" /> <field name="count" type="number" label="MOD_LATEST_NEWS_FIELD_COUNT_LABEL" description="MOD_LATEST_NEWS_FIELD_COUNT_DESC" default="5" filter="integer" /> <field name="show_featured" type="list" label="MOD_LATEST_NEWS_FIELD_FEATURED_LABEL" description="MOD_LATEST_NEWS_FIELD_FEATURED_DESC" default="" filter="integer" > <option value="">JSHOW</option> <option value="0">JHIDE</option> <option value="1">MOD_LATEST_NEWS_VALUE_ONLY_SHOW_FEATURED</option> </field> <field name="ordering" type="list" label="MOD_LATEST_NEWS_FIELD_ORDERING_LABEL" description="MOD_LATEST_NEWS_FIELD_ORDERING_DESC" default="p_dsc" > <option value="c_dsc">MOD_LATEST_NEWS_VALUE_RECENT_ADDED</option> <option value="m_dsc">MOD_LATEST_NEWS_VALUE_RECENT_MODIFIED</option> <option value="p_dsc">MOD_LATEST_NEWS_VALUE_RECENT_PUBLISHED</option> <option value="mc_dsc">MOD_LATEST_NEWS_VALUE_RECENT_TOUCHED</option> <option value="random">MOD_LATEST_NEWS_VALUE_RECENT_RAND</option> </field> <field name="user_id" type="list" label="MOD_LATEST_NEWS_FIELD_USER_LABEL" description="MOD_LATEST_NEWS_FIELD_USER_DESC" default="0" > <option value="0">MOD_LATEST_NEWS_VALUE_ANYONE</option> <option value="by_me">MOD_LATEST_NEWS_VALUE_ADDED_BY_ME</option> <option value="not_me">MOD_LATEST_NEWS_VALUE_NOTADDED_BY_ME</option> <option value="created_by">MOD_LATEST_NEWS_VALUE_CREATED_BY</option> </field> <field name="author" type="author" label="MOD_LATEST_NEWS_FIELD_AUTHOR_LABEL" description="MOD_LATEST_NEWS_FIELD_AUTHOR_DESC" multiple="true" showon="user_id:created_by" /> </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> mod_articles_latest/mod_articles_latest.php 0000604 00000001170 15245362373 0015324 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_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 the latest functions only once JLoader::register('ModArticlesLatestHelper', __DIR__ . '/helper.php'); $list = ModArticlesLatestHelper::getList($params); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_articles_latest', $params->get('layout', 'default')); mod_articles_latest/tmpl/default.php 0000604 00000001111 15245362373 0013676 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_latest * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <ul class="latestnews<?php echo $moduleclass_sfx; ?> mod-list"> <?php foreach ($list as $item) : ?> <li itemscope itemtype="https://schema.org/Article"> <a href="<?php echo $item->link; ?>" itemprop="url"> <span itemprop="name"> <?php echo $item->title; ?> </span> </a> </li> <?php endforeach; ?> </ul> mod_menu/helper.php 0000604 00000014531 15245362373 0010351 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_menu * * @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_menu * * @since 1.5 */ class ModMenuHelper { /** * Get a list of the menu items. * * @param \Joomla\Registry\Registry &$params The module options. * * @return array * * @since 1.5 */ public static function getList(&$params) { $app = JFactory::getApplication(); $menu = $app->getMenu(); // Get active menu item $base = self::getBase($params); $user = JFactory::getUser(); $levels = $user->getAuthorisedViewLevels(); asort($levels); $key = 'menu_items' . $params . implode(',', $levels) . '.' . $base->id; $cache = JFactory::getCache('mod_menu', ''); if ($cache->contains($key)) { $items = $cache->get($key); } else { $path = $base->tree; $start = (int) $params->get('startLevel', 1); $end = (int) $params->get('endLevel', 0); $showAll = $params->get('showAllChildren', 1); $items = $menu->getItems('menutype', $params->get('menutype')); $hidden_parents = array(); $lastitem = 0; if ($items) { foreach ($items as $i => $item) { $item->parent = false; if (isset($items[$lastitem]) && $items[$lastitem]->id == $item->parent_id && $item->params->get('menu_show', 1) == 1) { $items[$lastitem]->parent = true; } if (($start && $start > $item->level) || ($end && $item->level > $end) || (!$showAll && $item->level > 1 && !in_array($item->parent_id, $path)) || ($start > 1 && !in_array($item->tree[$start - 2], $path))) { unset($items[$i]); continue; } // Exclude item with menu item option set to exclude from menu modules if (($item->params->get('menu_show', 1) == 0) || in_array($item->parent_id, $hidden_parents)) { $hidden_parents[] = $item->id; unset($items[$i]); continue; } $item->deeper = false; $item->shallower = false; $item->level_diff = 0; if (isset($items[$lastitem])) { $items[$lastitem]->deeper = ($item->level > $items[$lastitem]->level); $items[$lastitem]->shallower = ($item->level < $items[$lastitem]->level); $items[$lastitem]->level_diff = ($items[$lastitem]->level - $item->level); } $lastitem = $i; $item->active = false; $item->flink = $item->link; // Reverted back for CMS version 2.5.6 switch ($item->type) { case 'separator': break; case 'heading': // No further action needed. break; case 'url': if ((strpos($item->link, 'index.php?') === 0) && (strpos($item->link, 'Itemid=') === false)) { // If this is an internal Joomla link, ensure the Itemid is set. $item->flink = $item->link . '&Itemid=' . $item->id; } break; case 'alias': $item->flink = 'index.php?Itemid=' . $item->params->get('aliasoptions'); // Get the language of the target menu item when site is multilingual if (JLanguageMultilang::isEnabled()) { $newItem = JFactory::getApplication()->getMenu()->getItem((int) $item->params->get('aliasoptions')); // Use language code if not set to ALL if ($newItem != null && $newItem->language && $newItem->language !== '*') { $item->flink .= '&lang=' . $newItem->language; } } break; default: $item->flink = 'index.php?Itemid=' . $item->id; break; } if ((strpos($item->flink, 'index.php?') !== false) && strcasecmp(substr($item->flink, 0, 4), 'http')) { $item->flink = JRoute::_($item->flink, true, $item->params->get('secure')); } else { $item->flink = JRoute::_($item->flink); } // We prevent the double encoding because for some reason the $item is shared for menu modules and we get double encoding // when the cause of that is found the argument should be removed $item->title = htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8', false); $item->anchor_css = htmlspecialchars($item->params->get('menu-anchor_css', ''), ENT_COMPAT, 'UTF-8', false); $item->anchor_title = htmlspecialchars($item->params->get('menu-anchor_title', ''), ENT_COMPAT, 'UTF-8', false); $item->anchor_rel = htmlspecialchars($item->params->get('menu-anchor_rel', ''), ENT_COMPAT, 'UTF-8', false); $item->menu_image = $item->params->get('menu_image', '') ? htmlspecialchars($item->params->get('menu_image', ''), ENT_COMPAT, 'UTF-8', false) : ''; $item->menu_image_css = htmlspecialchars($item->params->get('menu_image_css', ''), ENT_COMPAT, 'UTF-8', false); } if (isset($items[$lastitem])) { $items[$lastitem]->deeper = (($start ?: 1) > $items[$lastitem]->level); $items[$lastitem]->shallower = (($start ?: 1) < $items[$lastitem]->level); $items[$lastitem]->level_diff = ($items[$lastitem]->level - ($start ?: 1)); } } $cache->store($items, $key); } return $items; } /** * Get base menu item. * * @param \Joomla\Registry\Registry &$params The module options. * * @return object * * @since 3.0.2 */ public static function getBase(&$params) { // Get base menu item from parameters if ($params->get('base')) { $base = JFactory::getApplication()->getMenu()->getItem($params->get('base')); } else { $base = false; } // Use active menu item if no base found if (!$base) { $base = self::getActive($params); } return $base; } /** * Get active menu item. * * @param \Joomla\Registry\Registry &$params The module options. * * @return object * * @since 3.0.2 */ public static function getActive(&$params) { $menu = JFactory::getApplication()->getMenu(); return $menu->getActive() ?: self::getDefault(); } /** * Get default menu item (home page) for current language. * * @return object */ public static function getDefault() { $menu = JFactory::getApplication()->getMenu(); $lang = JFactory::getLanguage(); // Look for the home menu if (JLanguageMultilang::isEnabled()) { return $menu->getDefault($lang->getTag()); } else { return $menu->getDefault(); } } } mod_menu/mod_menu.php 0000604 00000001542 15245362373 0010673 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_menu * * @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; // Include the menu functions only once JLoader::register('ModMenuHelper', __DIR__ . '/helper.php'); $list = ModMenuHelper::getList($params); $base = ModMenuHelper::getBase($params); $active = ModMenuHelper::getActive($params); $default = ModMenuHelper::getDefault(); $active_id = $active->id; $default_id = $default->id; $path = $base->tree; $showAll = $params->get('showAllChildren', 1); $class_sfx = htmlspecialchars($params->get('class_sfx', ''), ENT_COMPAT, 'UTF-8'); if (count($list)) { require JModuleHelper::getLayoutPath('mod_menu', $params->get('layout', 'default')); } mod_menu/mod_menu.xml 0000604 00000010544 15245362373 0010706 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_menu</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_MENU_XML_DESCRIPTION</description> <files> <filename module="mod_menu">mod_menu.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_menu.ini</language> <language tag="en-GB">en-GB.mod_menu.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_MENU" /> <config> <fields name="params"> <fieldset name="basic" addfieldpath="/administrator/components/com_menus/models/fields" > <field name="menutype" type="menu" label="MOD_MENU_FIELD_MENUTYPE_LABEL" description="MOD_MENU_FIELD_MENUTYPE_DESC" clientid="0" /> <field name="base" type="modal_menu" label="MOD_MENU_FIELD_ACTIVE_LABEL" description="MOD_MENU_FIELD_ACTIVE_DESC" select="true" new="true" edit="true" clear="true" filter="integer" > <option value="">JCURRENT</option> </field> <field name="startLevel" type="list" label="MOD_MENU_FIELD_STARTLEVEL_LABEL" description="MOD_MENU_FIELD_STARTLEVEL_DESC" default="1" filter="integer" > <option value="1">J1</option> <option value="2">J2</option> <option value="3">J3</option> <option value="4">J4</option> <option value="5">J5</option> <option value="6">J6</option> <option value="7">J7</option> <option value="8">J8</option> <option value="9">J9</option> <option value="10">J10</option> </field> <field name="endLevel" type="list" label="MOD_MENU_FIELD_ENDLEVEL_LABEL" description="MOD_MENU_FIELD_ENDLEVEL_DESC" default="0" filter="integer" > <option value="0">JALL</option> <option value="1">J1</option> <option value="2">J2</option> <option value="3">J3</option> <option value="4">J4</option> <option value="5">J5</option> <option value="6">J6</option> <option value="7">J7</option> <option value="8">J8</option> <option value="9">J9</option> <option value="10">J10</option> </field> <field name="showAllChildren" type="radio" label="MOD_MENU_FIELD_ALLCHILDREN_LABEL" description="MOD_MENU_FIELD_ALLCHILDREN_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="tag_id" type="text" label="MOD_MENU_FIELD_TAG_ID_LABEL" description="MOD_MENU_FIELD_TAG_ID_DESC" /> <field name="class_sfx" type="text" label="MOD_MENU_FIELD_CLASS_LABEL" description="MOD_MENU_FIELD_CLASS_DESC" /> <field name="window_open" type="text" label="MOD_MENU_FIELD_TARGET_LABEL" description="MOD_MENU_FIELD_TARGET_DESC" /> <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="itemid" > <option value="itemid"></option> </field> </fieldset> </fields> </config> </extension> mod_menu/tmpl/default_component.php 0000604 00000002504 15245362373 0013551 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_menu * * @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; $attributes = array(); if ($item->anchor_title) { $attributes['title'] = $item->anchor_title; } if ($item->anchor_css) { $attributes['class'] = $item->anchor_css; } if ($item->anchor_rel) { $attributes['rel'] = $item->anchor_rel; } $linktype = $item->title; if ($item->menu_image) { if ($item->menu_image_css) { $image_attributes['class'] = $item->menu_image_css; $linktype = JHtml::_('image', $item->menu_image, $item->title, $image_attributes); } else { $linktype = JHtml::_('image', $item->menu_image, $item->title); } if ($item->params->get('menu_text', 1)) { $linktype .= '<span class="image-title">' . $item->title . '</span>'; } } if ($item->browserNav == 1) { $attributes['target'] = '_blank'; } elseif ($item->browserNav == 2) { $options = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes'; $attributes['onclick'] = "window.open(this.href, 'targetWindow', '" . $options . "'); return false;"; } echo JHtml::_('link', JFilterOutput::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes); mod_menu/tmpl/default_separator.php 0000604 00000001615 15245362373 0013551 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_menu * * @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; $title = $item->anchor_title ? ' title="' . $item->anchor_title . '"' : ''; $anchor_css = $item->anchor_css ?: ''; $linktype = $item->title; if ($item->menu_image) { if ($item->menu_image_css) { $image_attributes['class'] = $item->menu_image_css; $linktype = JHtml::_('image', $item->menu_image, $item->title, $image_attributes); } else { $linktype = JHtml::_('image', $item->menu_image, $item->title); } if ($item->params->get('menu_text', 1)) { $linktype .= '<span class="image-title">' . $item->title . '</span>'; } } ?> <span class="separator <?php echo $anchor_css; ?>"<?php echo $title; ?>><?php echo $linktype; ?></span> mod_menu/tmpl/default_heading.php 0000604 00000001616 15245362373 0013151 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_menu * * @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; $title = $item->anchor_title ? ' title="' . $item->anchor_title . '"' : ''; $anchor_css = $item->anchor_css ?: ''; $linktype = $item->title; if ($item->menu_image) { if ($item->menu_image_css) { $image_attributes['class'] = $item->menu_image_css; $linktype = JHtml::_('image', $item->menu_image, $item->title, $image_attributes); } else { $linktype = JHtml::_('image', $item->menu_image, $item->title); } if ($item->params->get('menu_text', 1)) { $linktype .= '<span class="image-title">' . $item->title . '</span>'; } } ?> <span class="nav-header <?php echo $anchor_css; ?>"<?php echo $title; ?>><?php echo $linktype; ?></span> mod_menu/tmpl/default_url.php 0000604 00000002742 15245362373 0012355 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_menu * * @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; $attributes = array(); if ($item->anchor_title) { $attributes['title'] = $item->anchor_title; } if ($item->anchor_css) { $attributes['class'] = $item->anchor_css; } if ($item->anchor_rel) { $attributes['rel'] = $item->anchor_rel; } $linktype = $item->title; if ($item->menu_image) { if ($item->menu_image_css) { $image_attributes['class'] = $item->menu_image_css; $linktype = JHtml::_('image', $item->menu_image, $item->title, $image_attributes); } else { $linktype = JHtml::_('image', $item->menu_image, $item->title); } if ($item->params->get('menu_text', 1)) { $linktype .= '<span class="image-title">' . $item->title . '</span>'; } } if ($item->browserNav == 1) { $attributes['target'] = '_blank'; $attributes['rel'] = 'noopener noreferrer'; if ($item->anchor_rel == 'nofollow') { $attributes['rel'] .= ' nofollow'; } } elseif ($item->browserNav == 2) { $options = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,' . $params->get('window_open'); $attributes['onclick'] = "window.open(this.href, 'targetWindow', '" . $options . "'); return false;"; } echo JHtml::_('link', JFilterOutput::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes); mod_menu/tmpl/default.php 0000604 00000003534 15245362373 0011473 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_menu * * @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; $id = ''; if ($tagId = $params->get('tag_id', '')) { $id = ' id="' . $tagId . '"'; } // The menu class is deprecated. Use nav instead ?> <ul class="nav menu<?php echo $class_sfx; ?> mod-list"<?php echo $id; ?>> <?php foreach ($list as $i => &$item) { $class = 'item-' . $item->id; if ($item->id == $default_id) { $class .= ' default'; } if ($item->id == $active_id || ($item->type === 'alias' && $item->params->get('aliasoptions') == $active_id)) { $class .= ' current'; } if (in_array($item->id, $path)) { $class .= ' active'; } elseif ($item->type === 'alias') { $aliasToId = $item->params->get('aliasoptions'); if (count($path) > 0 && $aliasToId == $path[count($path) - 1]) { $class .= ' active'; } elseif (in_array($aliasToId, $path)) { $class .= ' alias-parent-active'; } } if ($item->type === 'separator') { $class .= ' divider'; } if ($item->deeper) { $class .= ' deeper'; } if ($item->parent) { $class .= ' parent'; } echo '<li class="' . $class . '">'; switch ($item->type) : case 'separator': case 'component': case 'heading': case 'url': require JModuleHelper::getLayoutPath('mod_menu', 'default_' . $item->type); break; default: require JModuleHelper::getLayoutPath('mod_menu', 'default_url'); break; endswitch; // The next item is deeper. if ($item->deeper) { echo '<ul class="nav-child unstyled small">'; } // The next item is shallower. elseif ($item->shallower) { echo '</li>'; echo str_repeat('</ul></li>', $item->level_diff); } // The next item is on the same level. else { echo '</li>'; } } ?></ul> mod_finder/helper.php 0000604 00000004533 15245362373 0010655 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Utilities\ArrayHelper; /** * Finder module helper. * * @since 2.5 */ class ModFinderHelper { /** * Method to get hidden input fields for a get form so that control variables * are not lost upon form submission. * * @param string $route The route to the page. [optional] * @param integer $paramItem The menu item ID. (@since 3.1) [optional] * * @return string A string of hidden input form fields * * @since 2.5 */ public static function getGetFields($route = null, $paramItem = 0) { // Determine if there is an item id before routing. $needId = !JUri::getInstance($route)->getVar('Itemid'); $fields = array(); $uri = JUri::getInstance(JRoute::_($route)); $uri->delVar('q'); // Create hidden input elements for each part of the URI. foreach ($uri->getQuery(true) as $n => $v) { $fields[] = '<input type="hidden" name="' . $n . '" value="' . $v . '" />'; } // Add a field for Itemid if we need one. if ($needId) { $id = $paramItem ?: JFactory::getApplication()->input->get('Itemid', '0', 'int'); $fields[] = '<input type="hidden" name="Itemid" value="' . $id . '" />'; } return implode('', $fields); } /** * Get Smart Search query object. * * @param \Joomla\Registry\Registry $params Module parameters. * * @return FinderIndexerQuery object * * @since 2.5 */ public static function getQuery($params) { $app = JFactory::getApplication(); $input = $app->input; $request = $input->request; $filter = JFilterInput::getInstance(); // Get the static taxonomy filters. $options = array(); $options['filter'] = ($request->get('f', 0, 'int') !== 0) ? $request->get('f', '', 'int') : $params->get('searchfilter'); $options['filter'] = $filter->clean($options['filter'], 'int'); // Get the dynamic taxonomy filters. $options['filters'] = $request->get('t', '', 'array'); $options['filters'] = $filter->clean($options['filters'], 'array'); $options['filters'] = ArrayHelper::toInteger($options['filters']); // Instantiate a query object. return new FinderIndexerQuery($options); } } mod_finder/tmpl/default.php 0000604 00000011040 15245362373 0011765 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_finder * * @copyright (C) 2011 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::addIncludePath(JPATH_SITE . '/components/com_finder/helpers/html'); JHtml::_('jquery.framework'); JHtml::_('formbehavior.chosen'); JHtml::_('bootstrap.tooltip'); // Load the smart search component language file. $lang = JFactory::getLanguage(); $lang->load('com_finder', JPATH_SITE); $suffix = $params->get('moduleclass_sfx'); $output = '<input type="text" name="q" id="mod-finder-searchword' . $module->id . '" class="search-query input-medium" size="' . $params->get('field_size', 20) . '" value="' . htmlspecialchars(JFactory::getApplication()->input->get('q', '', 'string'), ENT_COMPAT, 'UTF-8') . '"' . ' placeholder="' . JText::_('MOD_FINDER_SEARCH_VALUE') . '"/>'; $showLabel = $params->get('show_label', 1); $labelClass = (!$showLabel ? 'element-invisible ' : '') . 'finder' . $suffix; $label = '<label for="mod-finder-searchword' . $module->id . '" class="' . $labelClass . '">' . $params->get('alt_label', JText::_('JSEARCH_FILTER_SUBMIT')) . '</label>'; switch ($params->get('label_pos', 'left')) { case 'top' : $output = $label . '<br />' . $output; break; case 'bottom' : $output .= '<br />' . $label; break; case 'right' : $output .= $label; break; case 'left' : default : $output = $label . $output; break; } if ($params->get('show_button', 0)) { $button = '<button class="btn btn-primary hasTooltip ' . $suffix . ' finder' . $suffix . '" type="submit" title="' . JText::_('MOD_FINDER_SEARCH_BUTTON') . '"><span class="icon-search icon-white"></span>' . JText::_('JSEARCH_FILTER_SUBMIT') . '</button>'; switch ($params->get('button_pos', 'left')) { case 'top' : $output = $button . '<br />' . $output; break; case 'bottom' : $output .= '<br />' . $button; break; case 'right' : $output .= $button; break; case 'left' : default : $output = $button . $output; break; } } JHtml::_('stylesheet', 'com_finder/finder.css', array('version' => 'auto', 'relative' => true)); $script = " jQuery(document).ready(function() { var value, searchword = jQuery('#mod-finder-searchword" . $module->id . "'); // Get the current value. value = searchword.val(); // If the current value equals the default value, clear it. searchword.on('focus', function () { var el = jQuery(this); if (el.val() === '" . JText::_('MOD_FINDER_SEARCH_VALUE', true) . "') { el.val(''); } }); // If the current value is empty, set the previous value. searchword.on('blur', function () { var el = jQuery(this); if (!el.val()) { el.val(value); } }); jQuery('#mod-finder-searchform" . $module->id . "').on('submit', function (e) { e.stopPropagation(); var advanced = jQuery('#mod-finder-advanced" . $module->id . "'); // Disable select boxes with no value selected. if (advanced.length) { advanced.find('select').each(function (index, el) { var el = jQuery(el); if (!el.val()) { el.attr('disabled', 'disabled'); } }); } });"; /* * This segment of code sets up the autocompleter. */ if ($params->get('show_autosuggest', 1)) { JHtml::_('script', 'jui/jquery.autocomplete.min.js', array('version' => 'auto', 'relative' => true)); $script .= " var suggest = jQuery('#mod-finder-searchword" . $module->id . "').autocomplete({ serviceUrl: '" . JRoute::_('index.php?option=com_finder&task=suggestions.suggest&format=json&tmpl=component') . "', paramName: 'q', minChars: 1, maxHeight: 400, width: 300, zIndex: 9999, deferRequestBy: 500 });"; } $script .= '});'; JFactory::getDocument()->addScriptDeclaration($script); ?> <div class="finder<?php echo $suffix; ?>"> <form id="mod-finder-searchform<?php echo $module->id; ?>" action="<?php echo JRoute::_($route); ?>" method="get" class="form-search" role="search"> <?php // Show the form fields. echo $output; ?> <?php $show_advanced = $params->get('show_advanced', 0); ?> <?php if ($show_advanced == 2) : ?> <br /> <a href="<?php echo JRoute::_($route); ?>"><?php echo JText::_('COM_FINDER_ADVANCED_SEARCH'); ?></a> <?php elseif ($show_advanced == 1) : ?> <div id="mod-finder-advanced<?php echo $module->id; ?>"> <?php echo JHtml::_('filter.select', $query, $params); ?> </div> <?php endif; ?> <?php echo modFinderHelper::getGetFields($route, (int) $params->get('set_itemid', 0)); ?> </form> </div> mod_finder/mod_finder.xml 0000604 00000012277 15245362373 0011521 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_finder</name> <author>Joomla! Project</author> <creationDate>August 2011</creationDate> <copyright>(C) 2011 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_FINDER_XML_DESCRIPTION</description> <files> <filename module="mod_finder">mod_finder.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">language/en-GB/en-GB.mod_finder.ini</language> <language tag="en-GB">language/en-GB/en-GB.mod_finder.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_SMART_SEARCH" /> <config> <fields name="params" addfieldpath="/administrator/components/com_finder/models/fields"> <fieldset name="basic"> <field name="searchfilter" type="searchfilter" label="MOD_FINDER_FIELDSET_BASIC_SEARCHFILTER_LABEL" description="MOD_FINDER_FIELDSET_BASIC_SEARCHFILTER_DESCRIPTION" default="" /> <field name="show_autosuggest" type="radio" label="MOD_FINDER_FIELDSET_BASIC_AUTOSUGGEST_LABEL" description="MOD_FINDER_FIELDSET_BASIC_AUTOSUGGEST_DESCRIPTION" default="1" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="show_advanced" type="list" label="MOD_FINDER_FIELDSET_BASIC_SHOW_ADVANCED_LABEL" description="MOD_FINDER_FIELDSET_BASIC_SHOW_ADVANCED_DESCRIPTION" default="0" filter="integer" > <option value="2">MOD_FINDER_FIELDSET_BASIC_SHOW_ADVANCED_OPTION_LINK</option> <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="field_size" type="number" label="MOD_FINDER_FIELDSET_ADVANCED_FIELD_SIZE_LABEL" description="MOD_FINDER_FIELDSET_ADVANCED_FIELD_SIZE_DESCRIPTION" default="25" filter="integer" /> <field name="show_label" type="radio" label="MOD_FINDER_FIELDSET_ADVANCED_SHOW_LABEL_LABEL" description="MOD_FINDER_FIELDSET_ADVANCED_SHOW_LABEL_DESCRIPTION" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="label_pos" type="list" label="MOD_FINDER_FIELDSET_ADVANCED_LABEL_POS_LABEL" description="MOD_FINDER_FIELDSET_ADVANCED_LABEL_POS_DESCRIPTION" default="left" > <option value="right">JGLOBAL_RIGHT</option> <option value="left">JGLOBAL_LEFT</option> <option value="top">MOD_FINDER_CONFIG_OPTION_TOP</option> <option value="bottom">MOD_FINDER_CONFIG_OPTION_BOTTOM</option> </field> <field name="alt_label" type="text" label="MOD_FINDER_FIELDSET_ADVANCED_ALT_LABEL" description="MOD_FINDER_FIELDSET_ADVANCED_ALT_DESCRIPTION" /> <field name="show_button" type="radio" label="MOD_FINDER_FIELDSET_ADVANCED_SHOW_BUTTON_LABEL" description="MOD_FINDER_FIELDSET_ADVANCED_SHOW_BUTTON_DESCRIPTION" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="button_pos" type="list" label="MOD_FINDER_FIELDSET_ADVANCED_BUTTON_POS_LABEL" description="MOD_FINDER_FIELDSET_ADVANCED_BUTTON_POS_DESCRIPTION" default="left" > <option value="right">JGLOBAL_RIGHT</option> <option value="left">JGLOBAL_LEFT</option> <option value="top">MOD_FINDER_CONFIG_OPTION_TOP</option> <option value="bottom">MOD_FINDER_CONFIG_OPTION_BOTTOM</option> </field> <field name="opensearch" type="radio" label="MOD_FINDER_FIELD_OPENSEARCH_LABEL" description="MOD_FINDER_FIELD_OPENSEARCH_DESCRIPTION" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="opensearch_title" type="text" label="MOD_FINDER_FIELD_OPENSEARCH_TEXT_LABEL" description="MOD_FINDER_FIELD_OPENSEARCH_TEXT_DESCRIPTION" /> <field name="set_itemid" type="menuitem" label="MOD_FINDER_FIELDSET_ADVANCED_SETITEMID_LABEL" description="MOD_FINDER_FIELDSET_ADVANCED_SETITEMID_DESCRIPTION" default="0" filter="integer" > <option value="0">MOD_FINDER_SELECT_MENU_ITEMID</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" default="" /> </fieldset> </fields> </config> </extension> mod_finder/mod_finder.php 0000604 00000003413 15245362373 0011500 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_finder * * @copyright (C) 2011 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('FinderHelperRoute', JPATH_SITE . '/components/com_finder/helpers/route.php'); JLoader::register('FinderHelperLanguage', JPATH_ADMINISTRATOR . '/components/com_finder/helpers/language.php'); // Include the helper. JLoader::register('ModFinderHelper', __DIR__ . '/helper.php'); if (!defined('FINDER_PATH_INDEXER')) { define('FINDER_PATH_INDEXER', JPATH_ADMINISTRATOR . '/components/com_finder/helpers/indexer'); } JLoader::register('FinderIndexerQuery', FINDER_PATH_INDEXER . '/query.php'); // Check for OpenSearch if ($params->get('opensearch', 1)) { /* This code intentionally commented $doc = JFactory::getDocument(); $app = JFactory::getApplication(); $ostitle = $params->get('opensearch_title', JText::_('MOD_FINDER_SEARCHBUTTON_TEXT') . ' ' . $app->get('sitename')); $doc->addHeadLink( JUri::getInstance()->toString(array('scheme', 'host', 'port')) . JRoute::_('&option=com_finder&format=opensearch'), 'search', 'rel', array('title' => $ostitle, 'type' => 'application/opensearchdescription+xml') ); */ } // Initialize module parameters. $params->def('field_size', 20); // Get the route. $route = FinderHelperRoute::getSearchRoute($params->get('searchfilter', null)); // Load component language file. FinderHelperLanguage::loadComponentLanguage(); // Load plugin language files. FinderHelperLanguage::loadPluginLanguage(); // Get Smart Search query object. $query = ModFinderHelper::getQuery($params); require JModuleHelper::getLayoutPath('mod_finder', $params->get('layout', 'default')); mod_favpromote/theme/img/favpromote.jpg 0000604 00000320732 15245362373 0014344 0 ustar 00 ��� Exif II* �� Ducky P ��rhttp://ns.adobe.com/xap/1.0/ <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.5-c014 79.151481, 2013/03/13-12:09:15 "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmpMM:OriginalDocumentID="xmp.did:11FE2079E52FE211BB11DF9744533E7C" xmpMM:DocumentID="xmp.did:CD74719AEF5611E49620829FBC3EB3D5" xmpMM:InstanceID="xmp.iid:CD747199EF5611E49620829FBC3EB3D5" xmp:CreatorTool="Adobe Photoshop CC (Windows)"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:6c8e2304-6857-4b44-a89e-fa49179e4adb" stRef:documentID="xmp.did:11FE2079E52FE211BB11DF9744533E7C"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>�� Adobe d� �� � �� �� �� � !1aAQq�"�2#BRbST�r�3C$���cD ��4�s���%Eӕ&W�dt�u�Ff'7( !1AQaq�"�2�BRbr�#���3�$TCS5��� ? ��������Q8�G����Q?�G����0��o�@WD|?�7�$�>�P����� ��f���P� �o�J�`B�Y�u]0a��d���3~��`B����( Ƀ�f��+&/�P~B��� �.*ߺ����n�����V��*�"�� B�ߺ�x��f��@?�a ߺ�"�e �𭟲�?#�V� �@���3٠���u �F��P��o�@���+~� 0��o�4L_·�`��u ߑ��+~��#�f� �@���+~� |�/�[�P� �h�P�o�4 �(_�7��|�/�� �J�� f�?%�V� �@/���3^�|��[�P�a ߺ�?#�V���_�#�@/���2=��_�#�@/���+~� |�/�[�P�a ߺ�!�f� �(���o�@/���3~��#�V�� 0!ߺ�o�A���� ���+~��/�� ��P��o�4L_·�aB��u >F����P� �A�(��?�P0�� ߺ�#�f��(�6~� |�?�P�(�#�@4�3~��%�d{� aB��u ߓ��3~� P��o�@7�ߺ�/�P �(_�7��0��o�@���3~� |�?�P�a� ߸P��u >J��P��o�@���3~�|�/��P��h�P��o�4�8�#�(�p� �G�P�� ߺ�'�f���8��7����u >J� �o�(�P��o�@���3٠����C� Lߺ�#�v���(_÷��B���� �P ��7��B��u >J�� f�_'�d{� >N����p� �o�@���:?�@���2=_'�f�� �8�7������ 0� �u�����%&���@II�+����@HO�U&���@HM]'�Z�O�P�� �Y&����4@m@<*�>T@|����@8+� �: �PWZ ��@-F�Z� �4 $P *�(�u� �Tuu��� �@��� �(q@+�\P �Wt�� �@�:\�� �:� 5PWZ }�u j�@7U .h��� ������H���iWZ����_m Ү�J���@4��n��J�����P '�q�@4�* _� �F���@��uPU 5u��� �����@-F�>t ����WZ�_m �t��@-F��� 5u���uPU 5}� �ր�ހ�PQ�� .|�@��� �|�@*\y��ę??�?�@KI�+��Rh �<� <� <� ɠ*��$$� E]'��d�����@U�D��U���U �|� �T¾��Tº�U �]h��:� �PQ��k�_Z�� Ү�J��u�U@ t �@ ~�j��Y��m �{h��:��] u�(�P_�^�Z�� M u{h��WJj�@ F�Z���h� �@4����i] �TJ���]hP '� ү*��@4��m�� *�~� �~�5e Ү���@7] �t �@ tu�: j ��hq@7Q��� �ր���@�@-b�Z� ��k ���e �{( Uրt���@-B����hq@+� j �(��@ }h��@ B��� �ր�� �@-F����3���%���@HI�$$�h �4t�TQ��@VI�+�@VI� eU'�@U�P��@T �( ���pW�@8+�ր:�� �j��k� K�X���J���TJ�������Z��� ��W��Z���ր:��WZj�� ���� �<��� ��W�������uPQ�U��U Ү�J���*�W@4��aU Ҿ�J�P *�(�P *���i] 5� �@ tJ� U@6�iW� .|��� j�� k��� �րZ� 5 j�� �hs@ ]h����m 5�j�@-T �@ }h�� 5{h���PQ�� �|�@�:\PU �P �ր��������� U%'�%4d��$$� E!'�( �4t��7�+$� MY'�( �4@m@U���*��@<��¨�}�¨q�@]h��@;] �P ��s�@ tuP ��iU �TJ�� j4 ���� ���j�@-f�Z� u�_Z �}��h��:� �{h�� uu��� �Z \y�P���}h�P *�@���iWZ���u���i>f�iW� ®� *�T=�J��U@7P�U�P ��M �h�� *�h�� j��_� 5{( U \P ����@7WS@-^�j��Q��@-F�Z� 5PWJk�(��@-]h�� .(q@-B������ �րZ��U 5PU 5������� 5{h��bk��� �?�@II�$���@VI�@qO{~��gmwӻW��d#3�T��p�� G���Y"�( r��� {{�"M?�������~���7f~|9���y�:�i� x�~%(\p�@i� ��]��Mэ��%0��S'6�Ɣ�O�l��X�*'���'v�w[����C �8��38��}� �$������f}T�Uw���~���qn��G���y~Yj�_t�,-a�@ހ��(7J���8��?�w=ڽʼn�{'��e�c�r�du�K-���Ԣ 7W+p�zOx�����N���|f{�qӛfLw� ,)nP�Zl�a�j�@s�O�� ˎ���f\0�2z�@<l�,� ��#����v&��XDm��9E�l�+�!ԋ�D,4�c�A��\�@ž���;���=���3'�&.�cHy��X )�-'M����տ�N������,:�|e�E�E����H���]�����v&[�b���bJ�����o���� kB� È.�}Gm.�Gj����3�.����� :��� bOc`8��� e�\��ų���:\���N��+�( ��_��Y��]��#;^t��c)Bt��ۤ��O�(y�q�:˻��f����8v��?��HJ� �=D�HQM��C�@r��wզk�;�V�ߐqX܌�K�zN5�Ym��YZ^y�U��Ip �;�U�S?P�vW��������ۄË5+q���oU�Pۍ�� H�8�����3w�p��e�3ۢ,y(b��q�KhCjI�뮪� ��@k>��f�6Zf���n����B[��6SwE���x����9�YP����V2��h��6ގ��OBo@u�b����w�8)� �7�m�q��2�֨�Y%DZ�$� M����[�=��w&����1���2T�\�\u�����*�R�( b����.Gɧn�K�Q�8��sN����Z������f�ߘ<�ٸ�zg�~g6.2s4�덐�Bn�R���É����:7Ns�ۛrcPr�Ag�f:��a�!%Z&�H �PW�RjP`a�&�~Q�� �t�]��}Ͳ6�wpBN;9��F/ShjJ�J�BP�)Id� $x�@fz� ��] ��] ��U � ��@�x�] �� ��@-T�ҀZ���iW���@4�Ҁf� k�Jύ��\�P �:P .�P �=�um �����u�(�Uրn��]o@ T ��U 5� �@ TI�@4�*�ut��k��� ���P��@ Thq@G�2,�K�!��c���/(!�$s*R� T�ە�(�6�Ib�\�qr�I,�#O�Շaű�qrw�6����S�Zҥ��E��w=/�V��R�{�|N�}���6�n�$�a[��b.�g~�uF�� �CȐ��^o�U��Wj�;�o���6� �����%Ư��Z?x7�edv�:{c�&+��U���Y��IJ�jO��_�ܓճ���owklf�n�;��N�F�d������RO���y?�t��(�Em�>�����7�zwSj1�$��a�y?c�l�U�p5 j��e �{(����WZj�(�� �t��@��� 5PU /@ \PU 5PV����Ph (4��F���@y=�2�M��:��m� yJ�QQ=-@wf/��n4=�6�]KI%O�pm�ƀ��s[f&�wr�$E8SZ�G ��Bu� ��͑�����ٜ����D��Ѕ�V���(�4}��ﻙ��f-1�[��'�!�<=F�{l�@7�d����'|⒨��u�l[D���2� �'l��vv���y ��8;�$�-<�J^I'�V����/cŗߟ���)[�ÑVI��l����+����P���#m����f� �2�l�+�ێvC�Y�vI}��E�w���p�83}+����� ��D�I��D3v�N6][jOA�8@]>�T��*|�~C]*�{���c�v�j�y���-(gC/Hy҂hmJ$��s<(O� ��cn�չ���c<���V x���*ZmH.w��"S��U&&O#&S�*��H�C�|B���@{�ػ[�k ,4��h@�<����.�p����� �cHq.X�<A�m|��\��1�j��O����rJ�T����I$�OH$�74��7݇��^��m��ZL��;�[u�V���G��@{����`��m����� pL��Z��:���@�@��<v�~��w�y��;���!w��Fբ::)d��'��=��R�/�s�=�S$3�x~��6�M��,��k��F���7N�dd�8�����kZ�{���@z�#f�0��4SHѣ@�j��M�;+�8]���-e�l���mé |*����Y0L�V��n�,-̤I%Ă�\l*����r,e}S&"�B�� 6�G�Gäl-@{����e�¬����]��;[f��#��2DLl�Q2^,�"�[� �6��>B��n�@}<n��;o`�l���]���\�Bܱ z��B�x�@t�Ii�҆P�G� P�hs�@���� �hs�@+�\�Q�� ���րW4�h�� �PP�Wj �@0���WZ�b�ip�S��n��΄`�N�cV�r�8ȱ�:�&��U�@t~��& nV�sR����SQRmȨY�,x��4�cn�m Ǐk#�%d�Bq�IQҝ6�&�s~t)�~��M��gG�a[J�8�@�/5��� dr�5�Z�ǝ��ʀiWZ k4���TI�@4��a=h�yP '���>��_m �G�@7WZ j��� 5�h����n<� U�@4�� ���@-](�PX�-�;n��e�z1"���V� B� VV�EwYz6m*�O�#]����+ם#��qg,f�Y��0M̨�Ŵ�X�}&����Z��G���}�o&�e�).k�9?rܽ�W�|��b�m����{�C�a�R�@��F 9)�:��H��r�F�ڛy��([��7lF�E�W�m�3$���~ΐ�'8���wHm�n�`_��ĩ����W�y�ȱ���KO7����Og�G� A�M��a���?��0:e%�%m�-HZM�� �u��S{�i��ڍP��j4 ���e �u��� �րZ��U 5PU 5 j�@ ]h U@ t �րiU �t���#����JO���h )4`xPM}O�;��E"S�R����?����~LX���=d%j��*����>��m���H̥8� �u�m�_'����)��~wO�P��ٛ2.M��K��6�ʓ��SO44ۈ��@a��sod精���ӷs�[�v;+v1I%Ÿx���P�wS���o1�H~D�syb�jK�Hq)'��i?m�������۠�ۓ���1��mJ�&&�Œ����쟢���F՛��1�^�r��Gn�o�u+�,�^&�=�� �� ����/���ܽ���P2�E�<�%�7��RC�h��Ү�&�ZA�f���ij��$r��:�~��w�[#�B��eԱ@Y{���k1�]�����ҏ�u`I�qN��y��}4g6v��kl@����aP�ض�RBx�z\��=|��8���;/�?�O���%@�)�l� ,�g�|��i"O�:33"HnDgЗ}�%IP�P#�Pz�tw � � �j^ar�;(�k1�m'@]�ꖥ� h��fv�8�K���{/L䲱b�:n���@Z~��&?�}��Fݜ�_�e]��R�1J�|"��7������}�+q�ۘо��6p49�BB.<��Y�ڤ���WsI��Fw92�+?x)jE�$� �ڗ���{����vQ�<� �Ke�J~Ҁ( �C���m���y�m�����e<t�^@(q��|V x��=J\��l��R��.\&���� �=��=䏉�n#*�= b#I`�CҜp�4)7)$z���^d�qK$�9�I<Ά�x��#�� ��I� ��o�ݠ=��+� ��� ��_�M�n�N/�]���ί���ɭ�$���� �@z#�~��w������U7�_��:�Ҵ�6*��VH�jk��k��k�� ��� B���Z���:���@-t.Z�ip��u{h V(>��w��3���m�=7���G�9�e���b8�A ��qo�*��j�6�b���+6��r!A/�DD�n,�'_��T�u��L4�4�Ye!��BR��X%) �JP ��{�ou��㒍��]�eG@�Q������T!�틹�D��rDgS(��"��W,,M��WJ�z���P]�� ����� ���U@4�� �T *�@4��n�e ү��T tu�_m 5P_Z k�@ ^� j�Q�P ��� j���{��^��J�4����e�0�:����uy���g����<�Gg�?Q�s��������>2��˶��) `+�ҡ�M�uT���-�]��i���ۘ�S?rHh��{M��M�#�Y�*@%<IO�n�t(.u�rYA::m�x�n��ֻ*y3U� ˑ�Z�sj��"��~8,^����[����n���Y��^M�2Y$�>����p<�� (7=#���:��_�/ld�5�+I�z6��je��F�Y=�[%�?�ti� ���#Ɏܖ�Ӊ �P�5F\�q�UF���yq��Ε�� �-j�U F�?�%=�#¾u��Ж�W����,�j}/���_��go.0� ���h��ן��`��s���P��ԍ�w*r #�Da%Q}2u�ש7�����9���ڻ�w��ʷ��;�{7&��n<�M��j}�6�6=`l>3cd��q��cqd6.Skg�f~N"FS��,���Zԕ����V�)Ҡ9�PvW�1��� jegӘ��v��A�a� ��do'/U���HKM��KX M� wm~����'m���Q�/5�f�K��è+iȩ��Ȑ �Q:�[��6�y��F?h�f�ؙ|��;y��1��b�S�>�B�I RWb�=���ݟݲv6s��7��ܖ��q��%�E�>$hU���OI? ����9���.C4�fC2 7�~W���s_%A!�� �s� I�ոn��gdw&7�s�Crm��1�e�Օ�oRT����6Zt��s��/�?o���������.67��ǎ�#:RIm� �RJB�iU�$�|TI��eݣ�-�6�Z{g2l Ɇ���(H�JZ�(>T�����6n*���\�j�Df_�Ҵ���wB��I�ċ��M^� j�@7U 5P *�@ T �hkG�G�E����BM!&������~��w|n����|{o���`���O��R�,| �|Z�m,Ym���u�������^=��{Z-ƈ浕��+S�h��p��@v���8|�k�D�h �ԁ� ��~�{>{���\V�@y �N�Jx)$�~)$P�i�;�il�Gz��YbK�Z�R����IM���-~����&w$�v��`>V���ꂝ�B�I)�P��]��qX8�%�q��iO � ������a����ی�x�H{-N�C�Rn�6��6J���S��hfv'lp�s<�m䡗K�h�$z��bĄ�J� �h7�����ݑ��1c;�}��z����%�����+��4pn]���;{_3/"D/Ei"�V�p>v_�]��tĬh�/iMp�̥�O�Q(XJP����lx���t������i��6��^H8�zV�<8�8ž�}Imt� ��e�cI)��IQ�yݴ))�*hv��??4�{��̡��J��yw��q|Us�[�����ʗ��6�ٻm��&\F���J/��� ��5��_mwGl����n�bNK&�L!��C�,���T��f�Ϸ��o�.���+-hp(\%Jl�Iă�”�]������]��ft��j#n�|$%!Dr�5���l�o�.c�c���S�}-6���kBԔ�O�����/#���vȎ���1��Ap��$��I<M��社�_�L�f���#�inE��ޑQ�妀�^��+�����7c��f��֛6�� ߏ���P��m�AJ@�XPja{�8}� �tz$a�NzNK�/Yi�摧E�|B�mր�bT� 'ﭕ%#��<����.��n �>S��?%K�8}�( A ������zT�\\�9'� ���v�dm�{�A���c�1�����d6�R�J �R�7#��k �����րZ��WZ �� �P�hs�@+� ��@ w� �րEv�)�:�� Jt���{O���uzR�[�??� R�v���M�H ?�@t�����!��0�bf�HSiU��q��"��V�Pv�T�FV3.�3)\��� ����Y$!�ہZ� HG��7� @��$C���[���<�h nA��qr�� �����R�}�|h ��HpE�Ә��������j���$���Ҁ�2<�g�O���r����.6��)*�����I){#�]�)<T����2�PO��R(R���~s���9�d�~�y($\�I<��n ��hpv�7����ހ��@ cƀZ��}�uP *�h�WZ���� Ҫ j�OZ���u��m 5t��e �{(�� 5 Jrq����gd,y��V�WlZwnF94�n��E�fܮ<���*�������+�-jzC����Ԣ}��ֽ'Ox�*�$�q�X��Q�����m���ٚ�1�l�~�w �jC�9l�AYm�!KЛYN�d�s{Z��cS���'sMo�]K��W�:m� �E��:�v�W>���Rܒ�;^I�S�^�f{i;n5��l�2�����ե�(|e`-|T��nI�|����Fޡ���J��|[{8,��}_��WL��V�t���ٷ��m��f���Wc�^6F��큶�N9���d��T%���@%'[nXjE�!�� #��b�:;�S��+���%�,�߃[%���������F����� �,b��om� @%J PZA ,\<�����R�p2���{jb J&<�2 �$�IBA�/I�+Ͼ�h���9m�$��>ʞ���^�uKq��_z��C�u{k�3鳝7�����m��m]�w�mWv�[���_�~mRې)hJ�J�qkڀ�״w���wqS�����ݖw62�!�Y�"l�����I�Еp�@��7�{_��]��vz6N+b�2Ppp��6T��&�.8UE e(Q !W�_�Zm.�+i�~�n�m��㴒��/�^��*fL��2���KkJ�u�q ��f�����o��я�ga�,��oml�-��Ӟ���u�����!J��ֹ�v�y��OkwT������P��G;��nz���v:$*K� qa#�:�7Z a�vϽN�wc�1f?����� e!2�J*2R)ahs���:����սჾ�{/�R���\r���D9.GK�2Z�%�Pӫl))Y���ƀ�L/h��;�9�bl�,>[�Y]��l��Ng ����A}�d��d��ScIR�)DP��l7Ԯ�<�v0z�t����1G�Ƃ܄�s�.�9��<R�� hWpv�_P�͵������ܝ��>"��!_(��:%8[h�7:To@v�� j��� 5PU 5u��� � ���PR�BM!*� m]*�+`t4t��P���P���?� � ���@���xUP*�xW�@z��h��v���;�t��� j��� �ր� �C��@�� �@������ �]h��Z���Z���Z��u����@t�:�����n�h����]�@5*[�!���]uA ��T�)F� 8�M���bw�� ��i�勃)r�?v8))�,}E$��h��]�ٻ<�";�m����<� �|"�� ��@lzP��Z����} )p1oI�bx� ��R U�$���8���?�����[�]��t�@\���V��f��/����ssd������m��^s&�=�]�|k��G�*Q���-]�K�n���=����;��h��?��.Ԗ�.��e�֪�ܡ�!��Z�*�u���2i���d�-���&�*����A�@�-z2x�v��j �YOͶ?ef��<�euQ�.0�2R⻬�t�ʁC���\m@)'��ܻS��+�1�ϏĴ�|.4��M��)'�}�oϧ��.�v��n,b.�@RGϴ:% %�jBO���-���R�8ڊ\B�IJ�� �ާ[{(z��WZ���@}m@ _m ү��iW�@4���� 5P *�@ Tu{(�� ү*�]h�4 �����րZ��������(E��9(����%����_R?�F��E�E},ݹ� ��݅ ��@��4��h��X��˭d����YGP���q���8�VRA�A�Yz�I��W����T;����x���%�Zrq��KN�T(Y��[ݿ��k�X�U��hoB֟S �F\�<��h�r3��+� �D��ǡ�D�p�zW��=V<Evn����<5���o����~�?��!�;8�"�� ��Qҕ�ڐ �`Twp� �FI�3�gf�e�U�p�[��q���~s_b_A?�+��闫�%�ge�X��lS��ގ���Ϭ#ۛ=k��Egqdc.d*�H�� ��&�=��+fp�m�c����x��%��[�YP[kҫ��@| u���m �{h��� �PU �u��6>^f}�df�y�;,��$:�7-��-��7�/j��@ T �@ ]h��a_Z k�Wր��4T����@HB� 4t� �'f`�R0��ѕ��-�ƱT���B�0ӄ���>�H�_�;������X��8�9�c���c��1�}U���4��q�~ݞ�3%�us���f4R���%(y� ��M��e8R ��@?'ܭ����2nQ���D�=xؐ�L�����u�c2����Z��H"�W� ܭ�6�-ܜ�N�.��>CM��Ⱥ�c�/��P�[�,n��Q;��e���f�aR�RbK�.!*_��7�D��(������w?d�sP�����䐷1J\9mE���Y�-�S� �'Ï��+b���39�m�^Q��ђ� �%���M�,�-T R�7x׳�v-��cr{�[�!�����)����}����% HR�.�"�p)�o��������3���g)�/���d8��[�i�qM�%�}�������d��Γ��YL�q��L��,�����0��� � A�M�gw�[k��|n���a�/��L�۾�� �:��V�RH�'e{��v�X����+���M�`�����1����oQ�����%}��m�7i�׀���F��\qnH�[�t0�������A��q@F�� �����9w��!�!��˅2ȱ[mn�� K-��RڊHl� ��-��ۂ��5�_!;L��[H�|��*�i�\WT=�;�#ۜ���y��71�Gq��/<��F��mJe�Z����w7r�vЖ�9̓��f8�)�p&�1�U���l<AЫ)�#��-;�vLku�z>&ۘ-吞���Kn�.+xis#�8R��� �. �@G�oiY<��w�}�����lf >�er���N���6JP��l�� x����;w��V�i0����MM��Ф�W㡥���$8�n4���v�Cq�kq��EL�t�A���%in;�`6��P�jS��tjP�?q�nw��Bͥ�l�;�y_ǹCa�d�5�]lh:�R@#��(`{��7.E�N/&�r2[[�b7�M�Z♬2JA�ʀyP�����a���P�O��0͖"eX�%�mLm��q�5q����� �^�ސ�6#���s}l��n��^���Q=..9֤�+Xi_uF��n�� ����d6veO�չ�cr��6$5@8�K�i�"70��%'����,fZFfqh�Bb�%�c�b���&{l�++���RE��q@l-�z k��k��k�� ��@T�(�y���7��h�P +ƀis�V,y� -B��z|�Ζ"GB�qdl� M���7��z�9RԽ�-;~!FZ^���p6%��J�<�@t����ٍ��<Km�ӥܣߋ)w *B�r��7�3J )A �D%)*<