uawdijnntqw1x1x1
IP : 216.73.217.142
Hostname : localhost.localdomain
Kernel : Linux localhost.localdomain 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
OS : Linux
PATH:
/
var
/
www
/
consult-e-syn
/
public_html
/
.
/
00a80
/
modules.tar
/
/
mod_atstickets/script.php000077500000000720152160445060011605 0ustar00<?php /** * @package ats * @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die; // Load FOF if not already loaded if (!defined('FOF40_INCLUDED') && !@include_once(JPATH_LIBRARIES . '/fof40/include.php')) { throw new RuntimeException('This extension requires FOF 4.'); } class Mod_AtsticketsInstallerScript extends FOF40\InstallScript\Module { } mod_atstickets/tmpl/default.php000077500000002541152160445060012704 0ustar00<?php /** * @package ats * @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; ?> <div class="mod_atstickets akeeba-bootstrap"> <?php if ($params->get('show_open', 1)): ?> <div class="mod_atstickets-open"> <span class="badge badge-info"> <?php echo (int) $openTickets ?> </span> <?php echo Text::_('MOD_ATSTICKETS_LBL_OPENTICKETS'); ?> </div> <?php endif; ?> <?php if ($params->get('show_pending', 1)): ?> <div class="mod_atstickets-pending"> <span class="badge badge-warning"> <?php echo (int) $pendingTickets ?> </span> <?php echo Text::_('MOD_ATSTICKETS_LBL_PENDINGTICKETS'); ?> </div> <?php endif; ?> <?php if ($params->get('show_closed', 1)): ?> <div class="mod_atstickets-closed"> <span class="badge badge-success"> <?php echo (int) $closedTickets ?> </span> <?php echo Text::_('MOD_ATSTICKETS_LBL_CLOSEDTICKETS'); ?> </div> <?php endif; ?> <?php if ($params->get('show_mytickets', 1)): ?> <div class="mod_atstickets-mytickets"> <a href="<?php echo Route::_('index.php?option=com_ats&view=Mies') ?>" class="btn btn-primary btn-small"> <?php echo Text::_('MOD_ATSTICKETS_LBL_MYTICKETS'); ?> </a> </div> <?php endif; ?> </div> mod_atstickets/tmpl/.htaccess000044400000000177152160445060012341 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_atstickets/web.config000077500000001025152160445060011533 0ustar00<?xml version="1.0"?> <!-- This only works on IIS 7 or later. See https://www.iis.net/configreference/system.webserver/security/requestfiltering/fileextensions --> <configuration> <system.webServer> <security> <requestFiltering> <fileExtensions allowUnlisted="false" > <clear /> <add fileExtension=".html" allowed="true"/> </fileExtensions> </requestFiltering> </security> </system.webServer> </configuration>mod_atstickets/.htaccess000044400000000177152160445060011365 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_atstickets/mod_atstickets.php000077500000002133152160445060013316 0ustar00<?php /** * @package ats * @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die; use Akeeba\TicketSystem\Admin\Helper\Permissions; use Joomla\CMS\Helper\ModuleHelper; if (!defined('FOF40_INCLUDED') && !@include_once(JPATH_LIBRARIES . '/fof40/include.php')) { return; } // Let's load the container so our autoloader gets registered $container = FOF40\Container\Container::getInstance('com_ats'); $user = Permissions::getUser(); if($user->guest) { echo ' '; return; } /** @var \Akeeba\TicketSystem\Site\Model\Tickets $ticketsModel */ $ticketsModel = $container->factory->model('Tickets')->tmpInstance(); $ticketsModel ->created_by($user->id) ->enabled(1); $allTickets = $ticketsModel->count(); $pendingTickets = $ticketsModel->reset()->status('P')->count(); $closedTickets = $ticketsModel->reset()->status('C')->count(); $openTickets = $allTickets - ($pendingTickets + $closedTickets); require ModuleHelper::getLayoutPath('mod_atstickets', $params->get('layout', 'default')); mod_atstickets/mod_atstickets.xml000077500000006361152160445060013336 0ustar00<?xml version="1.0" encoding="utf-8"?> <!--~ ~ @package ats ~ @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd ~ @license GNU General Public License version 3, or later --> <extension type="module" version="3.9.0" method="upgrade" client="site"> <name>MOD_ATSTICKETS</name> <author>Nicholas K. Dionysopoulos</author> <creationDate>2023-07-26</creationDate> <copyright>Copyright (c)2011-2021 Nicholas K. Dionysopoulos / Akeeba Ltd</copyright> <license>GNU GPL v3 or later</license> <authorEmail>nicholas@akeeba.com</authorEmail> <authorUrl>www.akeeba.com</authorUrl> <version>4.0.9.2</version> <description>MOD_ATSTICKETS_DESCRIPTION</description> <files> <file module="mod_atstickets">mod_atstickets.php</file> <file>.htaccess</file> <file>web.config</file> <folder>tmpl</folder> </files> <languages folder="language"> <language tag="en-GB">en-GB/en-GB.mod_atstickets.ini</language> <!-- Normally I should not have to do this... --> <language tag="en-GB">en-GB/en-GB.mod_atstickets.sys.ini</language> </languages> <config> <fields name="params" addfieldpath="/administrator/components/com_ats/fields"> <fieldset name="basic"> <field name="moduleclass_sfx" type="text" default="" label="MOD_ATSTICKETS_SUFFIX_LABEL" description="MOD_ATSTICKETS_SUFFIX_DESC" /> <field name="show_open" type="list" default="1" label="MOD_ATSTICKETS_SHOWOPEN_LABEL" description="MOD_ATSTICKETS_SHOWOPEN_DESC"> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="show_pending" type="fancyradio" default="1" label="MOD_ATSTICKETS_SHOWPENDING_LABEL" description="MOD_ATSTICKETS_SHOWPENDING_DESC" class="btn-group" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="show_closed" type="fancyradio" default="1" label="MOD_ATSTICKETS_SHOWCLOSED_LABEL" description="MOD_ATSTICKETS_SHOWCLOSED_DESC" class="btn-group" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="show_mytickets" type="fnacyradio" default="1" label="MOD_ATSTICKETS_SHOWMYTICKETS_LABEL" description="MOD_ATSTICKETS_SHOWMYTICKETS_DESC" class="btn-group" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> <fieldset name="advanced"> <field name="cache" type="list" default="1" label="MOD_ATSTICKETS_CACHING_LABEL" description="MOD_ATSTICKETS_CACHING_DESC"> <option value="1">MOD_ATSTICKETS_CACHING_OPT_GLOBAL</option> <option value="0">MOD_ATSTICKETS_CACHING_OPT_NONE</option> </field> <field name="cache_time" type="text" default="900" label="MOD_ATSTICKETS_CACHETIME_LABEL" description="MOD_ATSTICKETS_CACHETIME_DESC" /> </fieldset> </fields> </config> <scriptfile>script.php</scriptfile> </extension>mod_ariquiztopresult/script.php000077500000002501152160445060013074 0ustar00<?php /* * * @package ARI Quiz * @author ARI Soft * @copyright Copyright (c) 2011 www.ari-soft.com. All rights reserved * @license GNU/GPL (http://www.gnu.org/copyleft/gpl.html) * */ defined('_JEXEC') or die('Restricted access'); class mod_ariquiztopresultInstallerScript { function preflight($type, $parent) { $type = strtolower($type); if ($type == 'install' || $type == 'update') $this->updateManifest($parent); } function postflight($type, $parent) { $type = strtolower($type); if ($type == 'install' || $type == 'update') $this->deleteHelpManifest($parent); } private function updateManifest($parent) { jimport('joomla.filesystem.file'); $installer = $parent->getParent(); $manifestFile = basename($installer->getPath('manifest')); $cleanManifestFile = preg_replace('/^\_+/i', '', $manifestFile); $dir = dirname(__FILE__) . '/install/'; JFile::delete($dir . $cleanManifestFile); JFile::copy($dir . '../' . $cleanManifestFile, $dir . $cleanManifestFile); } private function deleteHelpManifest($parent) { jimport('joomla.filesystem.file'); $installer = $parent->getParent(); $manifestFile = basename($installer->getPath('manifest')); JFile::delete(JPATH_ROOT . '/modules/mod_ariquiztopresult/' . $manifestFile); } }mod_ariquiztopresult/index.html000077500000000054152160445060013055 0ustar00<html><body bgcolor="#FFFFFF"></body></html>mod_ariquiztopresult/mod_ariquiztopresult.xml000077500000003123152160445060016107 0ustar00<?xml version="1.0" encoding="UTF-8"?> <extension version="1.6.0" type="module" method="upgrade" client="site"> <name>ARI Quiz top results</name> <creationDate>October 2011</creationDate> <author>ARI Soft</author> <authorEmail>info@ari-soft.com</authorEmail> <authorUrl>www.ari-soft.com</authorUrl> <version>1.2.0</version> <description>Shows top quizzes results</description> <files> <filename module="mod_ariquiztopresult">mod_ariquiztopresult.php</filename> <filename>mod_ariquiztopresult.xml</filename> <filename>index.html</filename> </files> <config> <fields name="params"> <fieldset name="basic"> <field name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="A suffix to be applied to the css class of the module (table.moduletable), this allows individual module styling" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="label" type="text" default="Top Results" label="Label" description="Header text" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="count" type="text" default="5" label="Count" description="The number of items to display (default 5)" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="pointUnit" type="list" default="percent" label="Result measure unit" description="Result measure unit (default percent)"> <option value="percent">Percent</option> <option value="point">Point</option> </field> </fieldset> </fields> </config> </extension>mod_ariquiztopresult/.htaccess000044400000000177152160445060012655 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_ariquiztopresult/mod_ariquiztopresult.php000077500000003102152160445060016073 0ustar00<?php defined('_JEXEC') or die('Restricted access'); $basePath = JPATH_SITE . '/components/modules/'; $adminBasePath = JPATH_SITE . '/administrator/components/com_ariquizlite/'; if (@file_exists($adminBasePath)): require_once ($adminBasePath . 'utils/constants.php'); require_once ($adminBasePath . 'kernel/class.AriKernel.php'); AriKernel::import('Controllers.ResultController'); AriKernel::import('Web.Utils.QuizWebHelper'); AriKernel::import('I18N.I18N'); $count = intval($params->get('count', 5)); if ($count < 0) $count = 5; $measureUnit = $params->get('pointUnit', 'percent'); $moduleclass_sfx = $params->get('moduleclass_sfx', ''); $label = $params->get('label', 'Top Results'); $resultController = new AriQuizResultController(); $results = $resultController->call('getTopResults', $count); ?> <?php if (!empty($results)) { ?> <table style="width: 100%; font-size: 100%;" class="aqmodtable<?php echo $moduleclass_sfx; ?>"> <tr> <th colspan="3"><?php echo $label; ?></th> </tr> <?php foreach ($results as $result) { ?> <tr> <td class="aqmodquiz<?php echo $moduleclass_sfx; ?>"><?php AriQuizWebHelper::displayDbValue($result->QuizName); ?></td> <td class="aqmoduser<?php echo $moduleclass_sfx; ?>"><?php AriQuizWebHelper::displayDbValue($result->UserName); ?></td> <td class="aqmodpoint<?php echo $moduleclass_sfx; ?>" style="width: 1%; white-space: nowrap;"><?php echo $measureUnit == 'point' ? $result->UserScore : sprintf('%.2f %%', $result->PercentScore); ?></td> </tr> <?php } ?> </table> <?php } endif; ?>mod_footer/mod_footer.php000064400000001734152160445060011557 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_footer * * @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; use Joomla\String\StringHelper; $app = JFactory::getApplication(); $date = JFactory::getDate(); $cur_year = JHtml::_('date', $date, 'Y'); $csite_name = $app->get('sitename'); if (is_int(StringHelper::strpos(JText :: _('MOD_FOOTER_LINE1'), '%date%'))) { $line1 = str_replace('%date%', $cur_year, JText :: _('MOD_FOOTER_LINE1')); } else { $line1 = JText :: _('MOD_FOOTER_LINE1'); } if (is_int(StringHelper::strpos($line1, '%sitename%'))) { $lineone = str_replace('%sitename%', $csite_name, $line1); } else { $lineone = $line1; } $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_footer', $params->get('layout', 'default')); mod_footer/tmpl/default.php000064400000000671152160445060012021 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_footer * * @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="footer1<?php echo $moduleclass_sfx; ?>"><?php echo $lineone; ?></div> <div class="footer2<?php echo $moduleclass_sfx; ?>"><?php echo JText::_('MOD_FOOTER_LINE2'); ?></div> mod_footer/tmpl/.htaccess000044400000000177152160445060011461 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_footer/mod_footer.xml000064400000003643152160445060011571 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_footer</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_FOOTER_XML_DESCRIPTION</description> <files> <filename module="mod_footer">mod_footer.php</filename> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.mod_footer.ini</language> <language tag="en-GB">en-GB.mod_footer.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_FOOTER" /> <config> <fields name="params"> <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_footer/.htaccess000044400000000177152160445060010505 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_tags_similar/mod_tags_similar.xml000064400000005663152160445060014135 0ustar00<?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.php000064400000002035152160445060013175 0ustar00<?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/tmpl/.htaccess000044400000000177152160445060012641 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_tags_similar/mod_tags_similar.php000064400000001634152160445060014116 0ustar00<?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/helper.php000064400000011753152160445060012063 0ustar00<?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; } } mod_tags_similar/.htaccess000044400000000177152160445060011665 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_ariquizusertopresult/script.php000077500000002511152160445060013774 0ustar00<?php /* * * @package ARI Quiz * @author ARI Soft * @copyright Copyright (c) 2011 www.ari-soft.com. All rights reserved * @license GNU/GPL (http://www.gnu.org/copyleft/gpl.html) * */ defined('_JEXEC') or die('Restricted access'); class mod_ariquizusertopresultInstallerScript { function preflight($type, $parent) { $type = strtolower($type); if ($type == 'install' || $type == 'update') $this->updateManifest($parent); } function postflight($type, $parent) { $type = strtolower($type); if ($type == 'install' || $type == 'update') $this->deleteHelpManifest($parent); } private function updateManifest($parent) { jimport('joomla.filesystem.file'); $installer = $parent->getParent(); $manifestFile = basename($installer->getPath('manifest')); $cleanManifestFile = preg_replace('/^\_+/i', '', $manifestFile); $dir = dirname(__FILE__) . '/install/'; JFile::delete($dir . $cleanManifestFile); JFile::copy($dir . '../' . $cleanManifestFile, $dir . $cleanManifestFile); } private function deleteHelpManifest($parent) { jimport('joomla.filesystem.file'); $installer = $parent->getParent(); $manifestFile = basename($installer->getPath('manifest')); JFile::delete(JPATH_ROOT . '/modules/mod_ariquizusertopresult/' . $manifestFile); } }mod_ariquizusertopresult/index.html000077500000000054152160445060013754 0ustar00<html><body bgcolor="#FFFFFF"></body></html>mod_ariquizusertopresult/.htaccess000044400000000177152160445060013554 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_ariquizusertopresult/mod_ariquizusertopresult.php000077500000003023152160445060017673 0ustar00<?php defined('_JEXEC') or die('Restricted access'); $basePath = JPATH_SITE . '/components/modules/'; $adminBasePath = JPATH_SITE . '/administrator/components/com_ariquizlite/'; if (@file_exists($adminBasePath)): require_once ($adminBasePath . 'utils/constants.php'); require_once ($adminBasePath . 'kernel/class.AriKernel.php'); AriKernel::import('Controllers.ResultController'); AriKernel::import('Web.Utils.QuizWebHelper'); AriKernel::import('I18N.I18N'); $count = intval($params->get('count', 5)); if ($count < 0) $count = 5; $measureUnit = $params->get('pointUnit', 'percent'); $moduleclass_sfx = $params->get('moduleclass_sfx', ''); $label = $params->get('label', 'My Top Results'); $user =& JFactory::getUser(); $userId = $user->get('id'); $resultController = new AriQuizResultController(); $results = $resultController->call('getTopUserResults', $userId, $count); ?> <?php if (!empty($results)) { ?> <table style="width: 100%; font-size: 100%;" class="aqmodtable<?php echo $moduleclass_sfx; ?>"> <tr> <th colspan="2"><?php echo $label; ?></th> </tr> <?php foreach ($results as $result) { ?> <tr> <td class="aqmodquiz<?php echo $moduleclass_sfx; ?>"><?php AriQuizWebHelper::displayDbValue($result->QuizName); ?></td> <td class="aqmodpoint<?php echo $moduleclass_sfx; ?>" style="width: 1%; white-space: nowrap;"><?php echo $measureUnit == 'point' ? $result->UserScore : sprintf('%.2f %%', $result->PercentScore); ?></td> </tr> <?php } ?> </table> <?php } endif; ?>mod_ariquizusertopresult/mod_ariquizusertopresult.xml000077500000003163152160445060017711 0ustar00<?xml version="1.0" encoding="UTF-8"?> <extension version="1.6.0" type="module" method="upgrade" client="site"> <name>ARI Quiz user results</name> <creationDate>October 2012</creationDate> <author>ARI Soft</author> <authorEmail>info@ari-soft.com</authorEmail> <authorUrl>www.ari-soft.com</authorUrl> <version>1.2.0</version> <description>Shows top quizzes results for logged user</description> <files> <filename module="mod_ariquizusertopresult">mod_ariquizusertopresult.php</filename> <filename>mod_ariquizusertopresult.xml</filename> <filename>index.html</filename> </files> <config> <fields name="params"> <fieldset name="basic"> <field name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="A suffix to be applied to the css class of the module (table.moduletable), this allows individual module styling" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="label" type="text" default="My Top Results" label="Label" description="Header text" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="count" type="text" default="5" label="Count" description="The number of items to display (default 5)" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="pointUnit" type="list" default="percent" label="Result measure unit" description="Result measure unit (default percent)"> <option value="percent">Percent</option> <option value="point">Point</option> </field> </fieldset> </fields> </config> </extension>mod_breadcrumbs/mod_breadcrumbs.php000064400000001375152160445060013546 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_breadcrumbs * * @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 breadcrumbs functions only once JLoader::register('ModBreadCrumbsHelper', __DIR__ . '/helper.php'); // Get the breadcrumbs $list = ModBreadCrumbsHelper::getList($params); $count = count($list); // Set the default separator $separator = ModBreadCrumbsHelper::setSeparator($params->get('separator')); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_breadcrumbs', $params->get('layout', 'default')); mod_breadcrumbs/mod_breadcrumbs.xml000064400000006505152160445060013557 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_breadcrumbs</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_BREADCRUMBS_XML_DESCRIPTION</description> <files> <filename module="mod_breadcrumbs">mod_breadcrumbs.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_breadcrumbs.ini</language> <language tag="en-GB">en-GB.mod_breadcrumbs.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_BREADCRUMBS" /> <config> <fields name="params"> <fieldset name="basic"> <field name="showHere" type="radio" label="MOD_BREADCRUMBS_FIELD_SHOWHERE_LABEL" description="MOD_BREADCRUMBS_FIELD_SHOWHERE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="showHome" type="radio" label="MOD_BREADCRUMBS_FIELD_SHOWHOME_LABEL" description="MOD_BREADCRUMBS_FIELD_SHOWHOME_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="homeText" type="text" label="MOD_BREADCRUMBS_FIELD_HOMETEXT_LABEL" description="MOD_BREADCRUMBS_FIELD_HOMETEXT_DESC" showon="showHome:1" /> <field name="showLast" type="radio" label="MOD_BREADCRUMBS_FIELD_SHOWLAST_LABEL" description="MOD_BREADCRUMBS_FIELD_SHOWLAST_DESC" default="1" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="separator" type="text" label="MOD_BREADCRUMBS_FIELD_SEPARATOR_LABEL" description="MOD_BREADCRUMBS_FIELD_SEPARATOR_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="0" 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="0" filter="integer" /> <field name="cachemode" type="hidden" default="itemid" > <option value="itemid"></option> </field> </fieldset> </fields> </config> </extension> mod_breadcrumbs/tmpl/default.php000064400000004534152160445060013016 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_breadcrumbs * * @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 aria-label="<?php echo htmlspecialchars($module->title, ENT_QUOTES, 'UTF-8'); ?>" role="navigation"> <ul itemscope itemtype="https://schema.org/BreadcrumbList" class="breadcrumb<?php echo $moduleclass_sfx; ?>"> <?php if ($params->get('showHere', 1)) : ?> <li> <?php echo JText::_('MOD_BREADCRUMBS_HERE'); ?>  </li> <?php else : ?> <li class="active"> <span class="divider icon-location"></span> </li> <?php endif; ?> <?php // Get rid of duplicated entries on trail including home page when using multilanguage for ($i = 0; $i < $count; $i++) { if ($i === 1 && !empty($list[$i]->link) && !empty($list[$i - 1]->link) && $list[$i]->link === $list[$i - 1]->link) { unset($list[$i]); } } // Find last and penultimate items in breadcrumbs list end($list); $last_item_key = key($list); prev($list); $penult_item_key = key($list); // Make a link if not the last item in the breadcrumbs $show_last = $params->get('showLast', 1); // Generate the trail foreach ($list as $key => $item) : if ($key !== $last_item_key) : // Render all but last item - along with separator ?> <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> <?php if (!empty($item->link)) : ?> <a itemprop="item" href="<?php echo $item->link; ?>" class="pathway"><span itemprop="name"><?php echo $item->name; ?></span></a> <?php else : ?> <span itemprop="name"> <?php echo $item->name; ?> </span> <?php endif; ?> <?php if (($key !== $penult_item_key) || $show_last) : ?> <span class="divider"> <?php echo $separator; ?> </span> <?php endif; ?> <meta itemprop="position" content="<?php echo $key + 1; ?>"> </li> <?php elseif ($show_last) : // Render last item if reqd. ?> <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem" class="active"> <span itemprop="name"> <?php echo $item->name; ?> </span> <meta itemprop="position" content="<?php echo $key + 1; ?>"> </li> <?php endif; endforeach; ?> </ul> </div> mod_breadcrumbs/tmpl/.htaccess000044400000000177152160445060012454 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_breadcrumbs/helper.php000064400000004625152160445060011676 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_breadcrumbs * * @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_breadcrumbs * * @since 1.5 */ class ModBreadCrumbsHelper { /** * Retrieve breadcrumb items * * @param \Joomla\Registry\Registry &$params module parameters * * @return array */ public static function getList(&$params) { // Get the PathWay object from the application $app = JFactory::getApplication(); $pathway = $app->getPathway(); $items = $pathway->getPathWay(); $lang = JFactory::getLanguage(); $menu = $app->getMenu(); // Look for the home menu if (JLanguageMultilang::isEnabled()) { $home = $menu->getDefault($lang->getTag()); } else { $home = $menu->getDefault(); } $count = count($items); // Don't use $items here as it references JPathway properties directly $crumbs = array(); for ($i = 0; $i < $count; $i ++) { $crumbs[$i] = new stdClass; $crumbs[$i]->name = stripslashes(htmlspecialchars($items[$i]->name, ENT_COMPAT, 'UTF-8')); $crumbs[$i]->link = !is_null($items[$i]->link) ? JRoute::_($items[$i]->link) : ''; } if ($params->get('showHome', 1)) { $item = new stdClass; $item->name = htmlspecialchars($params->get('homeText', JText::_('MOD_BREADCRUMBS_HOME')), ENT_COMPAT, 'UTF-8'); $item->link = JRoute::_('index.php?Itemid=' . $home->id); array_unshift($crumbs, $item); } return $crumbs; } /** * Set the breadcrumbs separator for the breadcrumbs display. * * @param string $custom Custom xhtml compliant string to separate the items of the breadcrumbs * * @return string Separator string * * @since 1.5 */ public static function setSeparator($custom = null) { $lang = JFactory::getLanguage(); // If a custom separator has not been provided we try to load a template // specific one first, and if that is not present we load the default separator if ($custom === null) { if ($lang->isRtl()) { $_separator = JHtml::_('image', 'system/arrow_rtl.png', null, null, true); } else { $_separator = JHtml::_('image', 'system/arrow.png', null, null, true); } } else { $_separator = htmlspecialchars($custom, ENT_COMPAT, 'UTF-8'); } return $_separator; } } mod_breadcrumbs/.htaccess000044400000000177152160445060011500 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_atscredits/script.php000077500000000720152160445060011574 0ustar00<?php /** * @package ats * @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die; // Load FOF if not already loaded if (!defined('FOF40_INCLUDED') && !@include_once(JPATH_LIBRARIES . '/fof40/include.php')) { throw new RuntimeException('This extension requires FOF 4.'); } class Mod_AtscreditsInstallerScript extends FOF40\InstallScript\Module { } mod_atscredits/mod_atscredits.php000077500000001510152160445060013272 0ustar00<?php /** * @package ats * @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; if (!defined('FOF40_INCLUDED') && !@include_once(JPATH_LIBRARIES . '/fof40/include.php')) { return; } // Let's load the container so our autoloader gets registered FOF40\Container\Container::getInstance('com_ats'); /** @var \Joomla\Registry\Registry $params */ $layout = $params->get('layout', 'default'); $showCredits = $params->get('showCredits', 1); $showTime = $params->get('showTime', 0); if ($showCredits) { @include ModuleHelper::getLayoutPath('mod_atscredits', $layout . '_credits'); } if ($showTime) { @include ModuleHelper::getLayoutPath('mod_atscredits', $layout . '_time'); } mod_atscredits/tmpl/default_time.php000077500000001534152160445060013712 0ustar00<?php /** * @package ats * @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die; use Akeeba\TicketSystem\Admin\Helper\Permissions; use FOF40\Container\Container; use Joomla\CMS\Language\Text; // Default support time text for users who are not logged in. $timeText = ' '; $container = Container::getInstance('com_ats'); if (!Permissions::getUser()->guest) { // Get the total time spent supporting the user $time = \Akeeba\TicketSystem\Admin\Helper\Html::getTimeSpentPerUser(Permissions::getUser()->id); // The support time text to show for logged in users. Uses the MOD_ATSCREDITS_TIME language string. $timeText = Text::sprintf('MOD_ATSCREDITS_TIME', $time); } ?> <div class="atsUserSupportTime"> <?php echo $timeText ?> </div> mod_atscredits/tmpl/default_credits.php000077500000001552152160445060014411 0ustar00<?php /** * @package ats * @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die; use Akeeba\TicketSystem\Admin\Helper\Credits; use Akeeba\TicketSystem\Admin\Helper\Permissions; use FOF40\Container\Container; use Joomla\CMS\Language\Text; // Default credits text for users who are not logged in. $creditsText = ' '; $container = Container::getInstance('com_ats'); if (!Permissions::getUser()->guest) { // Get the available credits for the user $credits = Credits::creditsLeft(Permissions::getUser()->id, true); // The credits text to show for logged in users. Uses the MOD_ATSCREDITS_CREDITS language string. $creditsText = Text::sprintf('MOD_ATSCREDITS_CREDITS', $credits); } ?> <div class="atsUserCredits"> <?php echo $creditsText ?> </div> mod_atscredits/tmpl/default.php000077500000000714152160445060012673 0ustar00<?php /** * @package ats * @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die; /** * This file is intentionally empty. We have it here so that Joomla! can "see" the default template. The two files that * contain the actual layout are default_credits.php and default_time.php You need to override them instead of this * file here. */ ?> mod_atscredits/tmpl/.htaccess000044400000000177152160445060012330 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_atscredits/mod_atscredits.xml000077500000005504152160445060013312 0ustar00<?xml version="1.0" encoding="utf-8"?> <!--~ ~ @package ats ~ @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd ~ @license GNU General Public License version 3, or later --> <extension type="module" version="3.9.0" method="upgrade" client="site"> <name>MOD_ATSCREDITS</name> <author>Nicholas K. Dionysopoulos</author> <creationDate>2023-07-26</creationDate> <copyright>Copyright (c)2011-2021 Nicholas K. Dionysopoulos / Akeeba Ltd</copyright> <license>GNU GPL v3 or later</license> <authorEmail>nicholas@akeeba.com</authorEmail> <authorUrl>www.akeeba.com</authorUrl> <version>4.0.9.2</version> <description>MOD_ATSCREDITS_DESCRIPTION</description> <files> <folder>tmpl</folder> <file module="mod_atscredits">mod_atscredits.php</file> <file>.htaccess</file> <file>web.config</file> </files> <languages folder="language"> <language tag="en-GB">en-GB/en-GB.mod_atscredits.ini</language> <!-- Normally I should not have to do this... --> <language tag="en-GB">en-GB/en-GB.mod_atscredits.sys.ini</language> </languages> <config addfieldpath="/administrator/components/com_ats/fields"> <fields name="params"> <fieldset name="basic"> <field name="showCredits" type="fancyradio" default="1" label="MOD_ATSCREDITS_OPT_SHOWCREDITS_LABEL" description="MOD_ATSCREDITS_OPT_SHOWCREDITS_DESC" class="btn-group" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="showTime" type="fancyradio" default="0" label="MOD_ATSCREDITS_OPT_SHOWTIME_LABEL" description="MOD_ATSCREDITS_OPT_SHOWTIME_DESC" class="btn-group" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" /> <field name="moduleclass_sfx" type="textarea" rows="3" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" /> <field name="cache" type="list" default="1" label="COM_MODULES_FIELD_CACHING_LABEL" description="COM_MODULES_FIELD_CACHING_DESC" > <option value="1">JGLOBAL_USE_GLOBAL</option> <option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option> </field> <field name="cache_time" type="text" default="900" label="COM_MODULES_FIELD_CACHE_TIME_LABEL" description="COM_MODULES_FIELD_CACHE_TIME_DESC" /> <field name="cachemode" type="hidden" default="static"> <option value="static"></option> </field> </fieldset> </fields> </config> <scriptfile>script.php</scriptfile> </extension>mod_atscredits/web.config000077500000001025152160445060011522 0ustar00<?xml version="1.0"?> <!-- This only works on IIS 7 or later. See https://www.iis.net/configreference/system.webserver/security/requestfiltering/fileextensions --> <configuration> <system.webServer> <security> <requestFiltering> <fileExtensions allowUnlisted="false" > <clear /> <add fileExtension=".html" allowed="true"/> </fileExtensions> </requestFiltering> </security> </system.webServer> </configuration>mod_atscredits/.htaccess000044400000000177152160445060011354 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_wrapper/mod_wrapper.php000064400000002311152160445060012113 0ustar00<?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.xml000064400000007650152160445060012137 0ustar00<?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/tmpl/default.php000064400000001405152160445060012177 0ustar00<?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/tmpl/.htaccess000044400000000177152160445060011643 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_wrapper/helper.php000064400000002604152160445060011060 0ustar00<?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_wrapper/.htaccess000044400000000177152160445060010667 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>index.html000064400000000037152160445060006544 0ustar00<!DOCTYPE html><title></title> mod_rscontact/index.html000077500000000000152160445060011376 0ustar00mod_rscontact/tmpl/default_custom.php000077500000002274152160445060014123 0ustar00<?php /** * @package RSContact! * @copyright (C) 2015 www.rsjoomla.com * @license GPL, http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Helper\ModuleHelper; for ($i = 1; $i <= 3; $i++) { if (${"show_cf" . $i}) { $placeholder = !$show_label ? 'placeholder="'.${"cf" . $i. "_name"}.'"' : ''; if(${"show_cf" .$i. "_req"} && !$show_label) { $placeholder = 'placeholder="'.${"cf" . $i. "_name"}.' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-cf<?php echo $i.'-'.$uniqid; ?>" class="control-label"><?php echo ${"cf" . $i. "_name"};?> <?php if (${"show_cf" .$i. "_req"}) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <?php if (${"show_cf" . $i. "_req"}) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } require ModuleHelper::getLayoutPath('mod_rscontact', 'default_custom_'.${"show_cf" .$i. "_type"}); ?> </div> </div> <?php } }mod_rscontact/tmpl/default_custom_input.php000077500000000563152160445060015341 0ustar00<?php /** * @package RSContact! * @copyright (C) 2015 www.rsjoomla.com * @license GPL, http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?> <input type="text" name="mod_rscontact_cf<?php echo $i; ?>" id="mod-rscontact-cf<?php echo $i.'-'.$uniqid; ?>" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?>/> mod_rscontact/tmpl/default_custom_select.php000077500000002427152160445060015462 0ustar00<?php /** * @package RSContact! * @copyright (C) 2015 www.rsjoomla.com * @license GPL, http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper; if (${"cf" .$i. "_input"}) { if(is_string(${"cf" .$i. "_input"})) { $options = modRSContactHelper::split(${"cf" .$i. "_input"}); } if(!$show_label ) { if(${"show_cf" .$i. "_req"}) { $cf_select = Text::_('MOD_RSCONTACT_CUSTOM_FIELD'.$i.'_SELECT').' '.${"cf" . $i. "_name"}.' '.$required_marker; } else { $cf_select = Text::_('MOD_RSCONTACT_CUSTOM_FIELD'.$i.'_SELECT').' '.${"cf" . $i. "_name"}; } } else { $cf_select = Text::_('MOD_RSCONTACT_CUSTOM_FIELD'.$i.'_SELECT'); } ${"data_cf" .$i }[] = HTMLHelper::_('select.option', "", $cf_select); foreach ($options as $input) { ${"data_cf" .$i }[] = HTMLHelper::_('select.option', $input, $input); } echo HTMLHelper::_('select.genericlist', ${"data_cf" .$i }, 'mod_rscontact_cf'.$i, 'class="'.$class.'"', 'value', 'text', null, 'mod_rscontact_cf'.$i.'_'.$uniqid); } else { ?> <div class="alert alert-error alert-danger"> <?php echo Text::sprintf('MOD_RSCONTACT_INPUT_ERROR', ${"cf" . $i. "_name"}); ?> </div> <?php } ?>mod_rscontact/tmpl/index.html000077500000000040152160445060012356 0ustar00<html> <body> </body> </html>mod_rscontact/tmpl/default.php000077500000057734152160445060012544 0ustar00<?php /** * @package RSContact! * @copyright (C) 2015 www.rsjoomla.com * @license GPL, http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Uri\Uri; use Joomla\CMS\Factory; use Joomla\CMS\Filter\OutputFilter; use Joomla\CMS\Helper\ModuleHelper; ?> <?php $class_auto = $auto_width ? ' mod-rscontact-width-auto' : ""; ?> <div id="mod-rscontact-container-<?php echo $uniqid;?>" class="rscontact"> <form id="mod-rscontact-contact-form-<?php echo $uniqid; ?>" name="mod-rscontact-contact-form" enctype="multipart/form-data" method="post" action="<?php echo modRSContactHelper::cleanInput(Uri::current()); ?>" <?php if($form_horizontal) echo 'class="form-horizontal"';?>> <fieldset> <?php echo HTMLHelper::_( 'form.token' ); ?> <input type="hidden" name="mod_rscontact_module_id" value="<?php echo $module->id; ?>" /> <input type="hidden" name="mod_rscontact_module_name" value="<?php echo modRSContactHelper::cleanInput($module->title); ?>" /> <?php if ($form_pre_text) { ?> <div class="mod-rscontact-pre-text"> <?php echo $form_pre_text; ?> </div> <?php } ?> <?php if ($show_salutation) { //salut array forms if ($show_salutation_req && !$show_label) { $salutation_select = Text::_('MOD_RSCONTACT_SALUTATION_SELECT').' '.$required_marker; }else{ $salutation_select = Text::_('MOD_RSCONTACT_SALUTATION_SELECT'); } $forms = array( HTMLHelper::_('select.option', "", $salutation_select), HTMLHelper::_('select.option', Text::_('MOD_RSCONTACT_SALUTATION_MR')), HTMLHelper::_('select.option', Text::_('MOD_RSCONTACT_SALUTATION_MS')), HTMLHelper::_('select.option', Text::_('MOD_RSCONTACT_SALUTATION_MRS')), HTMLHelper::_('select.option', Text::_('MOD_RSCONTACT_SALUTATION_DR')), HTMLHelper::_('select.option', Text::_('MOD_RSCONTACT_SALUTATION_PROF')) ); if ($show_salutation_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod_rscontact_salutation" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_SALUTATION'); if ($show_salutation_req) { ?> <span class="help-inline"><?php echo $required_marker; ?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <?php echo HTMLHelper::_('select.genericlist', $forms, 'mod_rscontact_salutation', 'class="'.$class.'"', 'value', 'text', null, 'mod_rscontact_salutation_'.$uniqid); ?> </div> </div> <?php } ?> <?php if ($show_name) { if ($show_name_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } ?> <?php if ($show_full_name) { $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_FULL_NAME').'"' : ''; if($show_name_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_FULL_NAME').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-full-name-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_FULL_NAME'); if ($show_name_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_full_name" id="mod-rscontact-full-name-<?php echo $uniqid; ?>" type="text" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php } else { $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_FIRST_NAME').'"' : ''; if($show_name_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_FIRST_NAME').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-first-name-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_FIRST_NAME'); if ($show_name_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_first_name" id="mod-rscontact-first-name-<?php echo $uniqid; ?>" type="text" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_LAST_NAME').'"' : ''; if($show_name_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_LAST_NAME').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-last-name-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_LAST_NAME'); if ($show_name_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_last_name" id="mod-rscontact-last-name-<?php echo $uniqid; ?>" type="text" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php } ?> <?php } ?> <?php $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_EMAIL').' '.$required_marker.'"' : ''; ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-email-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_EMAIL').'<span class="help-inline">'.$required_marker.'</span>'; ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_email" id="mod-rscontact-email-<?php echo $uniqid; ?>" type="email" class="required <?php echo $class_auto;?>" value="<?php echo Factory::getUser()->email; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php if ($show_address_1) { ?> <?php if ($address_1_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_ADDRESS_1').'"' : ''; if($address_1_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_ADDRESS_1').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-address-1-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_ADDRESS_1'); if ($address_1_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_address_1" id="mod-rscontact-address-1-<?php echo $uniqid; ?>" type="text" value="" class="<?php echo $class;?>" <?php echo $placeholder; ?> /> </div> </div> <?php } ?> <?php if ($show_address_2) { ?> <?php if ($address_2_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_ADDRESS_2').'"' : ''; if($address_2_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_ADDRESS_2').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-address-2-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_ADDRESS_2'); if ($address_2_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_address_2" id="mod-rscontact-address-2-<?php echo $uniqid; ?>" type="text" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php } ?> <?php if ($show_city) { ?> <?php if ($show_city_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_CITY').'"' : ''; if($show_city_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_CITY').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-city<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_CITY'); if ($show_city_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_city" id="mod-rscontact-city<?php echo $uniqid; ?>" type="text" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php } ?> <?php if ($show_state) { ?> <?php if ($show_state_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } if ($show_state_req && !$show_label) { $state_select = Text::_('MOD_RSCONTACT_STATES_SELECT').' '.$required_marker; } else { $state_select = Text::_('MOD_RSCONTACT_STATES_SELECT'); } $data_state[] = HTMLHelper::_('select.option', "", $state_select); foreach (modRSContactHelper::$states as $stateCode => $stateText) { $data_state[] = HTMLHelper::_('select.option', $stateCode, $stateText); } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod_rscontact_states" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_STATES'); if ($show_state_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <?php echo HTMLHelper::_('select.genericlist', $data_state, 'mod_rscontact_states', 'class="'.$class.'"', 'value', 'text', null, 'mod_rscontact_states_'.$uniqid); ?> </div> </div> <?php } ?> <?php if ($show_zip) { ?> <?php if ($show_zip_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_ZIP').'"' : ''; if($show_zip_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_ZIP').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-zip-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_ZIP'); if ($show_zip_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_zip" id="mod-rscontact-zip-<?php echo $uniqid; ?>" type="text" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php } ?> <?php if ($show_home_phone) { ?> <?php if ($home_phone_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_HOME_PHONE').'"' : ''; if($home_phone_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_HOME_PHONE').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-home-phone-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_HOME_PHONE'); if ($home_phone_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_home_phone" id="mod-rscontact-home-phone-<?php echo $uniqid; ?>" type="tel" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php } ?> <?php if ($show_mobile_phone) { ?> <?php if ($mobile_phone_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_MOBILE_PHONE').'"' : ''; if($mobile_phone_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_MOBILE_PHONE').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-mobile-phone-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_MOBILE_PHONE'); if ($mobile_phone_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_mobile_phone" id="mod-rscontact-mobile-phone-<?php echo $uniqid; ?>" type="tel" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php } ?> <?php if ($show_work_phone) { ?> <?php if ($work_phone_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_WORK_PHONE').'"' : ''; if($work_phone_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_WORK_PHONE').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-work-phone-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_WORK_PHONE'); if ($work_phone_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_work_phone" id="mod-rscontact-work-phone-<?php echo $uniqid; ?>" type="tel" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php } ?> <?php if ($show_company) { ?> <?php if ($company_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_COMPANY').'"' : ''; if($company_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_COMPANY').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-company-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_COMPANY'); if ($company_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_company" id="mod-rscontact-company-<?php echo $uniqid; ?>" type="text" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php } ?> <?php if ($show_website) { ?> <?php if ($website_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_WEBSITE').'"' : ''; if($website_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_WEBSITE').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-website-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_WEBSITE'); if ($website_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <input name="mod_rscontact_website" id="mod-rscontact-website-<?php echo $uniqid; ?>" type="url" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> </div> </div> <?php } ?> <?php if ($show_subject) { ?> <?php if ($subject_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_SUBJECT').'"' : ''; if($subject_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_SUBJECT').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) {?> <label for="mod-rscontact-subject-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_SUBJECT'); if ($subject_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <?php switch ($subject_type) { case "input": ?> <input type="text" name="mod_rscontact_subject" id="mod-rscontact-subject-<?php echo $uniqid; ?>" value="" class="<?php echo $class; ?>" <?php echo $placeholder; ?> /> <?php break; ?> <?php case "textarea": ?> <textarea rows="5" name="mod_rscontact_subject" id="mod-rscontact-subject-<?php echo $uniqid; ?>" class="<?php echo $class; ?>" <?php echo $placeholder; ?> ></textarea> <?php break; ?> <?php case "select": if ($subject_input) { if (is_string($subject_input)) { $options = modRSContactHelper::split($subject_input); } if ($subject_req && !$show_label){ $subject_select = Text::_('MOD_RSCONTACT_SUBJECT_SELECT').' '.$required_marker; } else { $subject_select = Text::_('MOD_RSCONTACT_SUBJECT_SELECT'); } $data_subject[] = HTMLHelper::_('select.option', "", $subject_select); foreach ($options as $input) { $data_subject[] = HTMLHelper::_('select.option', $input, $input); } echo HTMLHelper::_('select.genericlist', $data_subject, 'mod_rscontact_subject', array('class' => $class), 'value', 'text', null, 'mod-rscontact-subject-'.$uniqid); } else { ?> <div class="alert alert-error alert-danger"> <?php Text::sprintf('MOD_RSCONTACT_INPUT_ERROR', Text::_('MOD_RSCONTACT_SUBJECT')); ?> </div> <?php } break; ?> <?php case "radio": if ($subject_input) { if (is_string($subject_input)) { $options = modRSContactHelper::split($subject_input); } if (!$show_label) { ?> <label for="mod_rscontact_subject" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_SUBJECT');?> <?php if ($subject_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } foreach ($options as $option) { $id = 'mod-rscontact-subject-'.OutputFilter::stringURLSafe($option).'-'.$uniqid; ?> <label for="<?php echo $id;?>" class="radio"> <input type="radio" class="<?php echo $class; ?>" id="<?php echo $id;?>" name="<?php echo 'mod_rscontact_subject'; ?>" value="<?php echo $option; ?>" /><?php echo $option; ?> </label> <?php } ?> <label for="mod_rscontact_subject" class="mod-rscontact-error" style="display: none;"></label> <?php } else { ?> <div class="alert alert-error alert-danger"> <?php echo Text::sprintf('MOD_RSCONTACT_INPUT_ERROR', Text::_('MOD_RSCONTACT_SUBJECT')); ?> </div> <?php } break; ?> <?php case "checkbox": if ($subject_input) { if (is_string($subject_input)) { $options = modRSContactHelper::split($subject_input); } if (!$show_label) { ?> <label for="mod_rscontact_subject" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_SUBJECT');?> <?php if ($subject_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } foreach ($options as $option) { $id = 'mod-rscontact-subject-'.OutputFilter::stringURLSafe($option).'-'.$uniqid; ?> <label for="<?php echo $id;?>" class="checkbox"> <input type="checkbox" class="<?php echo $class; ?>" id="<?php echo $id;?>" name="<?php echo 'mod_rscontact_subject'; ?>[]" value="<?php echo $option; ?>" /><?php echo $option; ?> </label> <?php } ?> <label for="mod_rscontact_subject" class="mod-rscontact-error" style="display: none;"></label> <?php } else { ?> <div class="alert alert-error alert-danger"> <?php echo Text::sprintf('MOD_RSCONTACT_INPUT_ERROR', Text::_('MOD_RSCONTACT_SUBJECT')); ?> </div> <?php } break; } ?> </div> </div> <?php } ?> <?php require ModuleHelper::getLayoutPath('mod_rscontact', 'default_custom'); ?> <?php if ($show_message) { if ($message_req) { $class = 'required'.$class_auto; } else { $class = 'ignore'.$class_auto; } $placeholder = !$show_label ? 'placeholder="'.Text::_('MOD_RSCONTACT_MESSAGE').'"' : ''; if($message_req && !$show_label){ $placeholder = 'placeholder="'.Text::_('MOD_RSCONTACT_MESSAGE').' '.$required_marker.'"'; } ?> <div class="control-group"> <?php if ($show_label) { ?> <label for="mod-rscontact-message-<?php echo $uniqid; ?>" class="control-label"> <?php echo Text::_('MOD_RSCONTACT_MESSAGE'); if ($message_req) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <div class="controls"> <textarea name="mod_rscontact_message" id="mod-rscontact-message-<?php echo $uniqid; ?>" rows="5" class="<?php echo $class;?>" <?php echo $placeholder;?> maxlength="<?php echo $msg_len; ?>"></textarea> </div> </div> <?php } ?> <?php if ($show_send_copy_to_self) { ?> <div class="control-group"> <div class="controls"> <label for="mod-rscontact-selfcopy-<?php echo $uniqid; ?>" class="checkbox"> <input type="checkbox" name="mod_rscontact_selfcopy" id="mod-rscontact-selfcopy-<?php echo $uniqid; ?>" value="1" > <?php echo Text::_('MOD_RSCONTACT_SEND_COPY_FRONT');?> </label> </div> </div> <?php } ?> <?php if ($show_display_consent) { ?> <div class="control-group"> <div class="controls"> <label for="mod-rscontact-display-consent-<?php echo $uniqid; ?>" class="checkbox"> <input type="checkbox" name="mod_rscontact_display_consent" id="mod-rscontact-display-consent-<?php echo $uniqid; ?>" value="1" > <?php echo Text::_('MOD_RSCONTACT_DISPLAY_CONSENT_FRONT');?> </label> </div> </div> <?php } ?> <?php if ($show_captcha) { ?> <div class="control-group"> <div class="controls"> <?php if (!$rez = modRSContactHelper::captchaGenerate('onDisplay', '', $uniqid)) { ?> <div class="alert alert-error alert-danger"> <?php echo Text::_('MOD_RSCONTACT_CAPTCHA_ERROR_SETUP'); ?> </div> <?php } else { echo $rez; } ?> </div> </div> <?php } ?> <div class="control-group" id="mod-rscontact-error-msg-<?php echo $uniqid;?>" style="display:none"></div> <div class="controls"> <button type="submit" id="mod-rscontact-submit-btn-<?php echo $uniqid;?>" name="mod_rscontact_submit-btn-<?php echo $uniqid;?>" class="btn btn-primary submit"> <span class="icon icon-envelope"></span> <?php echo Text::_('MOD_RSCONTACT_SUBMIT_LABEL');?> </button> </div> <?php if ($form_post_text) { ?> <div class="mod-rscontact-post-text"> <?php echo $form_post_text; ?> </div> <?php } ?> </fieldset> </form> <div id="mod-rscontact-msg-<?php echo $uniqid;?>" style="display:none"></div> <div id="mod-rscontact-warning-msg-<?php echo $uniqid;?>" style="display:none"></div> </div> mod_rscontact/tmpl/default_custom_radio.php000077500000002562152160445060015301 0ustar00<?php /** * @package RSContact! * @copyright (C) 2015 www.rsjoomla.com * @license GPL, http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); use Joomla\Filter\OutputFilter; use Joomla\CMS\Language\Text; if (${"cf" .$i. "_input"}) { if (is_string(${"cf" .$i. "_input"})) { $options = modRSContactHelper::split(${"cf" .$i. "_input"}); } ?> <?php if (!$show_label) { ?> <label for="mod-rscontact-cf<?php echo $i.'-'.$uniqid; ?>" class="control-label"> <?php echo ${"cf" . $i. "_name"};?> <?php if( ${"show_cf" .$i. "_req"}) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } ?> <?php foreach ($options as $option) { $id = 'mod-rscontact-cf'.$i.'-'.OutputFilter::stringURLSafe($option).'-'.$uniqid; ?> <label for="<?php echo $id;?>" class="radio"> <input type="radio" class="<?php echo $class; ?>" id="<?php echo $id;?>" name="<?php echo 'mod_rscontact_cf'.$i; ?>" value="<?php echo $option; ?>" /><?php echo $option; ?> </label> <?php } ?> <label for="mod_rscontact_cf<?php echo $i; ?>" class="mod-rscontact-error" style="display: none;"></label> <?php } else { ?> <div class="alert alert-error alert-danger"> <?php echo Text::sprintf('MOD_RSCONTACT_INPUT_ERROR', ${"cf" . $i. "_name"}); ?> </div> <?php } ?>mod_rscontact/tmpl/.htaccess000044400000000177152160445060012163 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_rscontact/tmpl/default_custom_checkbox.php000077500000002557152160445060015775 0ustar00<?php /** * @package RSContact! * @copyright (C) 2015 www.rsjoomla.com * @license GPL, http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Filter\OutputFilter; use Joomla\CMS\Language\Text; if (${"cf" .$i. "_input"}) { if (is_string(${"cf" .$i. "_input"})) { $options = modRSContactHelper::split(${"cf" .$i. "_input"}); } ?> <?php if (!$show_label) { ?> <label for="mod-rscontact-cf<?php echo $i.'-'.$uniqid; ?>" class="control-label"> <?php echo ${"cf" . $i. "_name"}; if(${"show_cf" .$i. "_req"}) { ?> <span class="help-inline"><?php echo $required_marker;?></span> <?php } ?> </label> <?php } foreach ($options as $option){ $id = 'mod-rscontact-cf'.$i.'-'.OutputFilter::stringURLSafe($option).'-'.$uniqid; ?> <label for="<?php echo $id;?>" class="checkbox"> <input type="checkbox" class="<?php echo $class; ?>" id="<?php echo $id;?>" name="<?php echo 'mod_rscontact_cf'.$i; ?>[]" value="<?php echo $option; ?>" /><?php echo $option; ?> </label> <?php } ?> <label for="mod_rscontact_cf<?php echo $i; ?>" class="mod-rscontact-error" style="display: none;"></label> <?php } else { ?> <div class="alert alert-error alert-danger"> <?php echo Text::sprintf('MOD_RSCONTACT_INPUT_ERROR', ${"cf" . $i. "_name"}); ?> </div> <?php } ?>mod_rscontact/tmpl/default_custom_textarea.php000077500000000565152160445060016021 0ustar00<?php /** * @package RSContact! * @copyright (C) 2015 www.rsjoomla.com * @license GPL, http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?> <textarea rows="5" name="mod_rscontact_cf<?php echo $i; ?>" id="mod-rscontact-cf<?php echo $i.'-'.$uniqid; ?>" class="<?php echo $class; ?>" <?php echo $placeholder; ?> ></textarea> mod_rscontact/mod_rscontact.php000077500000007270152160445060012771 0ustar00<?php /** * @package RSContact! * @copyright (C) 2015 www.rsjoomla.com * @license GPL, http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Factory; use Joomla\CMS\Helper\ModuleHelper; // Load our helper file require_once dirname(__FILE__).'/helper.php'; // Load jQuery if ($params->get('jquery')) { HTMLHelper::_('jquery.framework'); } // Load form validation HTMLHelper::_('behavior.formvalidator'); // Load our scripts modRSContactHelper::loadJS('jquery.validate'); modRSContactHelper::loadJS('rscontact'); // Load our stylesheet modRSContactHelper::loadCSS('rscontact'); // Load extra scripts & stylesheets $document = Factory::getDocument(); if ($css = $params->get('css')) { $document->addStyleDeclaration($css); } if ($js = $params->get('js')) { $document->addScriptDeclaration($js); } // Get a unique id for the module to be used as a suffix $uniqid = $module->id; // Define parameters $form_pre_text = $params->get('form_pre'); $form_post_text = $params->get('form_post'); $show_salutation = $params->get('salut'); $show_salutation_req = $show_salutation == 2; $show_label = !$params->get('label'); $show_name = $params->get('name'); $show_name_req = $show_name == 2; $name_type = $params->get('name_type'); $show_full_name = $name_type == 1; $show_address_1 = $params->get('addr_1'); $address_1_req = $show_address_1 == 2; $show_address_2 = $params->get('addr_2'); $address_2_req = $show_address_2 == 2; $show_city = $params->get('city'); $show_city_req = $show_city == 2; $show_state = $params->get('state'); $show_state_req = $show_state == 2; $show_zip = $params->get('zip'); $show_zip_req = $show_zip == 2; $show_home_phone = $params->get('h_phone'); $home_phone_req = $show_home_phone == 2; $show_mobile_phone = $params->get('m_phone'); $mobile_phone_req = $show_mobile_phone == 2; $show_work_phone = $params->get('w_phone'); $work_phone_req = $show_work_phone == 2; $show_company = $params->get('comp'); $company_req = $show_company == 2; $show_website = $params->get('web'); $website_req = $show_website == 2; $show_subject = $params->get('subj'); $subject_req = $show_subject == 2; $subject_type = $params->get('subj_type'); $subject_input = $params->get('subject_input'); $required_marker = $params->get('req_marker'); $show_send_copy = $params->get('send_copy'); $show_send_copy_to_self = $show_send_copy == 2; $show_message = $params->get('msg'); $message_req = $show_message == 2; $msg_len = (int) $params->get('msg_len', 1000) ? (int) $params->get('msg_len', 1000) : 1000; $auto_width = $params->get('auto_width'); $form_horizontal = $params->get('form_h'); $show_captcha = $params->get('captcha'); $show_display_consent = $params->get('display_consent'); // Custom fields $show_cf1 = $params->get('cf1'); $show_cf1_req = $show_cf1 == 2; $show_cf1_type = $params->get('cf1_type'); $cf1_name = $params->get('cf1_name'); $cf1_input = $params->get('cf1_inp'); $show_cf2 = $params->get('cf2'); $show_cf2_req = $show_cf2 == 2; $show_cf2_type = $params->get('cf2_type'); $cf2_name = $params->get('cf2_name'); $cf2_input = $params->get('cf2_inp'); $show_cf3 = $params->get('cf3'); $show_cf3_req = $show_cf3 == 2; $show_cf3_type = $params->get('cf3_type'); $cf3_name = $params->get('cf3_name'); $cf3_input = $params->get('cf3_inp'); $options = ''; $document->addScriptDeclaration( "jQuery(function() { RSContact.init({$uniqid}); });" ); require ModuleHelper::getLayoutPath('mod_rscontact', $params->get('layout', 'default'));mod_rscontact/helper.php000077500000035340152160445060011410 0ustar00<?php /** * @package RSContact! * @copyright (C) 2015 www.rsjoomla.com * @license GPL, http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Factory; use Joomla\CMS\Captcha\Captcha; use Joomla\CMS\Date\Date; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Utilities\IpHelper; use Joomla\Registry\Registry; use Joomla\CMS\Uri\Uri; use Joomla\CMS\Mail\MailHelper; use Joomla\CMS\Session\Session; Text::script('MOD_RSCONTACT_SALUTATION_ERROR'); Text::script('MOD_RSCONTACT_FIRST_NAME_ERROR'); Text::script('MOD_RSCONTACT_LAST_NAME_ERROR'); Text::script('MOD_RSCONTACT_FULL_NAME_ERROR'); Text::script('MOD_RSCONTACT_EMAIL_ERROR'); Text::script('MOD_RSCONTACT_ADDRESS_1_ERROR'); Text::script('MOD_RSCONTACT_ADDRESS_2_ERROR'); Text::script('MOD_RSCONTACT_CITY_ERROR'); Text::script('MOD_RSCONTACT_STATE_ERROR'); Text::script('MOD_RSCONTACT_ZIP_ERROR'); Text::script('MOD_RSCONTACT_ZIP_NOT_A_ALPHANUMERIC_ERROR'); Text::script('MOD_RSCONTACT_HOME_PHONE_ERROR'); Text::script('MOD_RSCONTACT_MOBILE_PHONE_ERROR'); Text::script('MOD_RSCONTACT_WORK_PHONE_ERROR'); Text::script('MOD_RSCONTACT_PHONE_NOT_A_NUMBER_ERROR'); Text::script('MOD_RSCONTACT_COMPANY_ERROR'); Text::script('MOD_RSCONTACT_WEBSITE_ERROR'); Text::script('MOD_RSCONTACT_SUBJECT_ERROR'); Text::script('MOD_RSCONTACT_MESSAGE_ERROR'); Text::script('MOD_RSCONTACT_CHARACTERS_LEFT'); class modRSContactHelper { static $states = array( 'AK' => 'Alaska', 'AL' => 'Alabama', 'AR' => 'Arkansas', 'AZ' => 'Arizona', 'CA' => 'California', 'CO' => 'Colorado', 'CT' => 'Connecticut', 'DC' => 'District of Columbia', 'DE' => 'Delaware', 'FL' => 'Florida', 'GA' => 'Georgia', 'HI' => 'Hawaii', 'IA' => 'Iowa', 'ID' => 'Idaho', 'IL' => 'Illinois', 'IN' => 'Indiana', 'KS' => 'Kansas', 'KY' => 'Kentucky', 'LA' => 'Louisiana', 'MA' => 'Massachusetts', 'MD' => 'Maryland', 'ME' => 'Maine', 'MI' => 'Michigan', 'MN' => 'Minnesota', 'MO' => 'Missouri', 'MS' => 'Mississippi', 'MT' => 'Montana', 'NC' => 'North Carolina', 'ND' => 'North Dakota', 'NE' => 'Nebraska', 'NH' => 'New Hampshire', 'NJ' => 'New Jersey', 'NM' => 'New Mexico', 'NV' => 'Nevada', 'NY' => 'New York', 'OH' => 'Ohio', 'OK' => 'Oklahoma', 'OR' => 'Oregon', 'PA' => 'Pennsylvania', 'PR' => 'Puerto Rico', 'RI' => 'Rhode Island', 'SC' => 'South Carolina', 'SD' => 'South Dakota', 'TN' => 'Tennessee', 'TX' => 'Texas', 'UT' => 'Utah', 'VA' => 'Virginia', 'VT' => 'Vermont', 'WA' => 'Washington', 'WI' => 'Wisconsin', 'WV' => 'West Virginia', 'WY' => 'Wyoming', 'OU' => 'Outside US' ); public static function loadJs($file) { HTMLHelper::_('script', 'mod_rscontact/'.$file.'.js', array('relative' => true, 'version' => 'auto')); } public static function loadCss($file) { HTMLHelper::_('stylesheet', 'mod_rscontact/'.$file.'.css', array('relative' => true, 'version' => 'auto')); } protected static function encodeHTML(&$item, $key) { $item = self::cleanInput($item); } protected static function flatten(&$item, $key) { if (is_array($item)) { $item = implode(', ', $item); } } public static function cleanInput($input) { if ($input === null) { $input = ''; } elseif (is_array($input)) { $input = implode(', ', $input); } return htmlspecialchars($input, ENT_QUOTES, "UTF-8"); } protected static function replacePlaceholders($text, $placeholders, $escapeCallable = null) { // Performance check if (strpos($text, '{') === false) { return $text; } array_walk($placeholders, array('modRSContactHelper', 'flatten')); // Escape placeholders with user supplied function if ($escapeCallable) { // Built-in "HTML" encoding function if (strtolower($escapeCallable) == 'html') { $escapeCallable = array('modRSContactHelper', 'encodeHTML'); } if (is_callable($escapeCallable)) { array_walk($placeholders, $escapeCallable); } } return str_replace(array_keys($placeholders), array_values($placeholders), $text); } public static function captchaGenerate($event, $value = null, $id = '') { if ($value !== null && !strlen(trim($value))) { $value = null; } try { $captcha = Captcha::getInstance(Factory::getConfig()->get('captcha')); } catch (Exception $e) { Factory::getApplication()->enqueueMessage($e->getMessage(), 'error'); return false; } if (!$captcha) { Factory::getApplication()->enqueueMessage(Text::_('MOD_RSCONTACT_NO_CAPTCHA_CONFIGURED'), 'error'); return false; } switch ($event) { case 'onDisplay': return $captcha->display('mod-rscontact-captcha-' . $id, 'mod-rscontact-captcha-' . $id, 'required'); break; case 'onCheckAnswer': return $captcha->checkAnswer($value); break; default: return false; break; } } public static function split($input) { $options = trim($input); $options = str_replace(array("\r\n", "\r"), "\n", $options); $options = preg_split("/[\n,]+/", $options); return $options; } protected static function showResponse($status, $message, $warnings = array()) { $response = (object) array( 'status' => $status, 'message' => $message, 'warnings' => $warnings ); Factory::getDocument()->setMimeEncoding('application/json'); echo json_encode($response); Factory::getApplication()->close(); } public static function isEmailAddress($value) { return MailHelper::isEmailAddress($value); } public static function getAjax(){ Factory::getLanguage()->load('mod_rscontact'); $warning = array(); $jInput = Factory::getApplication()->input; //ajax submit $inputs = $jInput->get('data', array(), 'array'); $user = Factory::getUser(); $config = Factory::getConfig(); $user_id = $user->get('id'); $username = $user->get('username'); $user_email = $user->get('email'); $timeZone = $config->get('offset'); $myDate = Date::getInstance('now', $timeZone); $date = $myDate->format('d-m-Y', true, true); $date_time = $myDate->format('d-m-Y H:i:s', true, true); if (!empty($inputs['mod_rscontact_module_id'])) { $module = ModuleHelper::getModuleById($inputs['mod_rscontact_module_id']); } else { $module = ModuleHelper::getModule('rscontact', $inputs['mod_rscontact_module_name']); } $params = new Registry(); $params->loadString($module->params); $recipient = $params->get('mail_to', ''); $bcc = $params->get('mail_bcc', ''); $cc = $params->get('mail_cc', ''); $message_set = $params->get('mail_msg', ''); $fullname_email = $params->get('name_type') == 1; $thank_you = $params->get('thank_you', Text::_('MOD_RSCONTACT_THANK_YOU_DEFAULT')); $send_copy = $params->get('send_copy') == 1; $show_captcha = $params->get('captcha'); $show_consent = $params->get('display_consent'); $subject_predef = $params->get('email_subj', ''); $set_reply = $params->get('reply_to', ''); $reply_email = $params->get('reply_email', ''); $reply_name = $params->get('reply_name', ''); $ip_remote = IpHelper::getIp(); $salut_form = !empty($inputs['mod_rscontact_salutation']) ? $inputs['mod_rscontact_salutation'] : ''; $first_name = !empty($inputs['mod_rscontact_first_name']) ? $inputs['mod_rscontact_first_name'] : ''; $last_name = !empty($inputs['mod_rscontact_last_name']) ? $inputs['mod_rscontact_last_name'] : ''; $fullname = !empty($inputs['mod_rscontact_full_name']) ? $inputs['mod_rscontact_full_name'] : ''; $email = !empty($inputs['mod_rscontact_email']) ? $inputs['mod_rscontact_email'] : ''; $address_1 = !empty($inputs['mod_rscontact_address_1']) ? $inputs['mod_rscontact_address_1'] : ''; $address_2 = !empty($inputs['mod_rscontact_address_2']) ? $inputs['mod_rscontact_address_2'] : ''; $city = !empty($inputs['mod_rscontact_city']) ? $inputs['mod_rscontact_city'] : ''; $state = !empty($inputs['mod_rscontact_states']) ? $inputs['mod_rscontact_states'] : ''; $zip = !empty($inputs['mod_rscontact_zip']) ? $inputs['mod_rscontact_zip'] : ''; $h_phone = !empty($inputs['mod_rscontact_home_phone']) ? $inputs['mod_rscontact_home_phone'] : ''; $m_phone = !empty($inputs['mod_rscontact_mobile_phone']) ? $inputs['mod_rscontact_mobile_phone'] : ''; $w_phone = !empty($inputs['mod_rscontact_work_phone']) ? $inputs['mod_rscontact_work_phone'] : ''; $company = !empty($inputs['mod_rscontact_company']) ? $inputs['mod_rscontact_company'] : ''; $website = !empty($inputs['mod_rscontact_website']) ? $inputs['mod_rscontact_website'] : ''; $subject = !empty($inputs['mod_rscontact_subject']) ? $inputs['mod_rscontact_subject'] : ''; $message = !empty($inputs['mod_rscontact_message']) ? $inputs['mod_rscontact_message'] : ''; $cf1 = !empty($inputs['mod_rscontact_cf1']) ? $inputs['mod_rscontact_cf1'] : ''; $cf2 = !empty($inputs['mod_rscontact_cf2']) ? $inputs['mod_rscontact_cf2'] : ''; $cf3 = !empty($inputs['mod_rscontact_cf3']) ? $inputs['mod_rscontact_cf3'] : ''; $selfcopy = !empty($inputs['mod_rscontact_selfcopy']) ? $inputs['mod_rscontact_selfcopy'] : ''; $consent = !empty($inputs['mod_rscontact_display_consent']) ? $inputs['mod_rscontact_display_consent'] : ''; try { if (!Session::checkToken()) { throw new Exception(Text::_('MOD_RSCONTACT_INVALID_TOKEN')); } if(!static::isEmailAddress($email)){ throw new Exception(Text::_('MOD_RSCONTACT_EMAIL_ERROR')); } if(!$recipient){ throw new Exception(Text::_('MOD_RSCONTACT_EMAIL_TO_ERROR')); } if($show_consent && !$consent) { throw new Exception(Text::_('MOD_RSCONTACT_DISPLAY_CONSENT_ERROR')); } if ($show_captcha && !self::captchaGenerate('onCheckAnswer', null, $module->id)) { throw new Exception(Text::_('MOD_RSCONTACT_CAPTCHA_ERROR')); } if($fullname_email){ $sender = $fullname; } else { $sender = $first_name.' '.$last_name; } if (isset(self::$states[$state])) { $state = self::$states[$state]; } $placeholders = array( '{salut-form}' => $salut_form, '{salutation}' => $salut_form, '{first-name}' => $first_name, '{last-name}' => $last_name, '{fullname}' => $fullname, '{subject}' => $subject, '{email}' => $email, '{address-1}' => $address_1, '{address-2}' => $address_2, '{city}' => $city, '{state}' => $state, '{zip}' => $zip, '{home-phone}' => $h_phone, '{mobile-phone}' => $m_phone, '{work-phone}' => $w_phone, '{company}' => $company, '{website}' => $website, '{message}' => $message, '{cf1}' => $cf1, '{cf2}' => $cf2, '{cf3}' => $cf3, '{consent}' => Text::_('MOD_RSCONTACT_DISPLAY_CONSENT_PLACEHOLDER'), '{username}' => $username, '{user-id}' => $user_id, '{user-email}' => $user_email, '{date}' => $date, '{date-time}' => $date_time, '{ip}' => $ip_remote, '{your-website}' => $config->get('sitename'), '{your-website-url}' => Uri::root() ); // Replace placeholders for the email body $msg = self::replacePlaceholders($message_set, $placeholders, 'html'); // Replace placeholders for the email subject $subject_predef = self::replacePlaceholders($subject_predef, $placeholders); // Replace placeholders for the Thank You message $thank_you = self::replacePlaceholders($thank_you, $placeholders, 'html'); // array email addresses $recipient = array_filter(preg_split('/[;,]+/', $recipient), array('modRSContactHelper', 'isEmailAddress')); $bcc = array_filter(preg_split('/[;,]+/', $bcc), array('modRSContactHelper', 'isEmailAddress')); $cc = array_filter(preg_split('/[;,]+/', $cc), array('modRSContactHelper', 'isEmailAddress')); if (!$set_reply) { $replyTo = self::replacePlaceholders($reply_email, $placeholders); $replyToName = self::replacePlaceholders($reply_name, $placeholders); } else { $replyTo = $email; $replyToName = $sender; } if (!$replyTo || !static::isEmailAddress($replyTo)) { $replyTo = null; $replyToName = null; } // send admin email $sent_admin = Factory::getMailer()->sendMail($config->get('mailfrom'), $sender, $recipient, $subject_predef, $msg, true, $cc, $bcc, null, $replyTo, $replyToName); // send selfcopy email if ($selfcopy || $send_copy) { $subject = Text::sprintf('MOD_RSCONTACT_SEND_COPY_SUBJECT', $config->get('sitename')); $sent_user = Factory::getMailer()->sendMail($config->get('mailfrom'), $config->get('fromname'), $email, $subject, $msg, true); if ($sent_user !== true) { $errorMessage = Text::_('MOD_RSCONTACT_NO_FURTHER_INFORMATION_AVAILABLE'); if (is_object($sent_user) && is_callable(array($sent_user, 'getMessage'))) { $errorMessage = $sent_user->getMessage(); } $warning[] = Text::sprintf('MOD_RSCONTACT_EMAIL_FAILED_COPY', $errorMessage); } } if ($sent_admin !== true) { $db = Factory::getDbo(); $jdate = new Date('now'); $query = $db->getQuery(true); // Get all admin users for database $query->clear() ->select($db->qn(array('id', 'name', 'email', 'sendEmail'))) ->from($db->qn('#__users')) ->where($db->qn('sendEmail') . ' = ' . 1); $db->setQuery($query); if ($rows = $db->loadObjectList()) { foreach ($rows as $row) { $user_send_from = $user_id ? $user_id : $row->id; $not_sent = Text::sprintf('MOD_RSCONTACT_ADMIN_EMAIL_NOT_SENT', '<strong>'.$params->get('mail_to').'</strong><br />'); $values = array($db->q($user_send_from), $db->q($row->id), $db->q($jdate->toSql()), $db->q($subject_predef), $db->q($not_sent.$msg)); $query->clear() ->insert($db->qn('#__messages')) ->columns($db->qn(array('user_id_from', 'user_id_to', 'date_time', 'subject', 'message'))) ->values(implode(',', $values)); $db->setQuery($query); $db->execute(); } } $errorMessage = Text::_('MOD_RSCONTACT_NO_FURTHER_INFORMATION_AVAILABLE'); if (is_object($sent_admin) && is_callable(array($sent_admin, 'getMessage'))) { $errorMessage = $sent_admin->getMessage(); } $warning[] = Text::sprintf('MOD_RSCONTACT_EMAIL_FAILED', $errorMessage); } self::showResponse(1, $thank_you, $warning); } catch (Exception $e) { self::showResponse(0, $e->getMessage()); } } }mod_rscontact/script.rscontact.php000077500000006625152160445060013440 0ustar00<?php /** * @package RSContact! * @copyright (C) 2015 www.rsjoomla.com * @license GPL, http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); class mod_rscontactInstallerScript { public function preflight($type, $parent) { if ($type !== 'uninstall') { try { $minJoomla = '3.10.0'; if (!class_exists('\\Joomla\\CMS\\Version')) { throw new Exception(sprintf('Please upgrade to at least Joomla! %s before continuing!', $minJoomla)); } $jversion = new \Joomla\CMS\Version; if (!$jversion->isCompatible($minJoomla)) { throw new Exception(sprintf('Please upgrade to at least Joomla! %s before continuing!', $minJoomla)); } } catch (Exception $e) { if (class_exists('\Joomla\CMS\Factory')) { $app = \Joomla\CMS\Factory::getApplication(); } elseif (class_exists('JFactory')) { $app = JFactory::getApplication(); } if (!empty($app)) { $app->enqueueMessage($e->getMessage(), 'error'); } return false; } } return true; } public function postflight($type, $parent) { if ($type == 'uninstall') { return true; } $db = \Joomla\CMS\Factory::getDbo(); $query = $db->getQuery(true); $query->select('id') ->from($db->qn('#__modules')) ->where($db->qn('module').' = '.$db->q('mod_rscontact')); $moduleId = $db->setQuery($query)->loadResult(); ?> <style type="text/css"> .version-history { margin: 0 0 2em 0; padding: 0; list-style-type: none; } .version-history > li { margin: 0 0 0.5em 0; padding: 0 0 0 4em; text-align:left; font-weight:normal; } .version-new, .version-fixed, .version-upgraded { float: left; font-size: 0.8em; margin-left: -4.9em; width: 4.5em; color: white; text-align: center; font-weight: bold; text-transform: uppercase; border-radius: 4px; } .version-new { background: #7dc35b; } .version-fixed { background: #e9a130; } .version-upgraded { background: #61b3de; } .install-ok { background: #7dc35b; color: #fff; padding: 3px; } .install-not-ok { background: #E9452F; color: #fff; padding: 3px; } #installer-left { border: 1px solid #e0e0e0; float: left; margin: 10px; } #installer-right { float: left; } </style> <div id="installer-left"> <?php echo \Joomla\CMS\HTML\HTMLHelper::_('image', 'mod_rscontact/logo.png', 'RSContact! Logo', null, true); ?> </div> <div id="installer-right"> <h3>RSContact! v2.0.3 Changelog</h3> <ul class="version-history"> <li><span class="version-new">New</span> Joomla! 5 native compatibility - no longer needs the 'Behaviour - Backward Compatibility' plugin.</li> </ul> <?php if ($moduleId) { ?> <a class="btn btn-primary btn-large" href="index.php?option=com_modules&task=module.edit&id=<?php echo (int) $moduleId; ?>">Start using RSContact!</a> <?php } ?> <a class="btn btn-secondary" href="https://www.rsjoomla.com/support/documentation/rscontact.html" target="_blank">Read the RSContact! User Guide</a> <a class="btn btn-secondary" href="https://www.rsjoomla.com/forum/rscontact.html" target="_blank">Get Support!</a> </div> <div style="clear: both;"></div> <?php } }mod_rscontact/mod_rscontact.xml000077500000041341152160445060012777 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" client="site" method="upgrade" version="3.9.0"> <name>RSContact!</name> <author>RSJoomla!</author> <creationDate>January 2015</creationDate> <copyright>Copyright (C) 2015 - 2023</copyright> <license>GNU General Public License version 2 or later</license> <authorEmail>supporttickets@rsjoomla.com</authorEmail> <authorUrl>www.rsjoomla.com</authorUrl> <version>2.0.3</version> <description>MOD_RSCONTACT_DESC</description> <scriptfile>script.rscontact.php</scriptfile> <updateservers> <server type="extension" priority="1" name="RSContact!">https://www.rsjoomla.com/updates/free/mod_rscontact/mod_rscontact.xml</server> </updateservers> <files> <filename module="mod_rscontact">mod_rscontact.php</filename> <filename>helper.php</filename> <filename>index.html</filename> <folder>tmpl</folder> </files> <media destination="mod_rscontact" folder="media"> <folder>css</folder> <folder>images</folder> <folder>js</folder> <filename>index.html</filename> </media> <languages> <language tag="en-GB">language/en-GB/en-GB.mod_rscontact.ini</language> <language tag="en-GB">language/en-GB/en-GB.mod_rscontact.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="fields" label="MOD_RSCONTACT_FIELD_OPTIONS" description="MOD_RSCONTACT_FIELD_OPTIONS_DESC"> <field type="spacer" name="stdspacer" label="MOD_RSCONTACT_STANDARD_FIELDS"/> <field name="salut" class="btn-group" type="radio" label="MOD_RSCONTACT_SALUTATION" default="1" description="MOD_RSCONTACT_SALUTATION_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="name" class="btn-group" type="radio" label="MOD_RSCONTACT_NAME" default="1" description="MOD_RSCONTACT_NAME_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="name_type" class="inputbox" type="list" label="MOD_RSCONTACT_NAME_TYPE" default="1" description="MOD_RSCONTACT_NAME_TYPE_DESC"> <option value="0">MOD_RSCONTACT_NAME_TYPE1</option> <option value="1">MOD_RSCONTACT_NAME_TYPE2</option> </field> <field name="addr_1" class="btn-group" type="radio" label="MOD_RSCONTACT_ADDRESS_1" default="1" description="MOD_RSCONTACT_ADDRESS_1_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="addr_2" class="btn-group" type="radio" label="MOD_RSCONTACT_ADDRESS_2" default="1" description="MOD_RSCONTACT_ADDRESS_2_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="city" class="btn-group" type="radio" label="MOD_RSCONTACT_CITY" default="1" description="MOD_RSCONTACT_CITY_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="state" class="btn-group" type="radio" label="MOD_RSCONTACT_STATES" default="1" description="MOD_RSCONTACT_STATE_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="zip" class="btn-group" type="radio" label="MOD_RSCONTACT_ZIP" default="1" description="MOD_RSCONTACT_ZIP_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="h_phone" class="btn-group" type="radio" label="MOD_RSCONTACT_HOME_PHONE" default="1" description="MOD_RSCONTACT_HOME_PHONE_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="m_phone" class="btn-group" type="radio" label="MOD_RSCONTACT_MOBILE_PHONE" default="1" description="MOD_RSCONTACT_MOBILE_PHONE_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="w_phone" class="btn-group" type="radio" label="MOD_RSCONTACT_WORK_PHONE" default="1" description="MOD_RSCONTACT_WORK_PHONE_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="comp" class="btn-group" type="radio" label="MOD_RSCONTACT_COMPANY" default="1" description="MOD_RSCONTACT_COMPANY_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="web" class="btn-group" type="radio" label="MOD_RSCONTACT_WEBSITE" default="1" description="MOD_RSCONTACT_WEBSITE_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="subj" class="btn-group" type="radio" label="MOD_RSCONTACT_SUBJECT" default="1" description="MOD_RSCONTACT_SUBJECT_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="subj_type" class="inputbox" type="list" label="MOD_RSCONTACT_SUBJECT_TYPE" default="1" description="MOD_RSCONTACT_SUBJECT_TYPE_DESC"> <option value="input">MOD_RSCONTACT_TEXTBOX</option> <option value="textarea">MOD_RSCONTACT_TEXTAREA</option> <option value="select">MOD_RSCONTACT_DROPBOX</option> <option value="radio">MOD_RSCONTACT_RADIO</option> <option value="checkbox">MOD_RSCONTACT_CHECKBOX</option> </field> <field name="subject_input" type="textarea" default="" filter="raw" label="MOD_RSCONTACT_SUBJECT_INPUT" description="MOD_RSCONTACT_SUBJECT_INPUT_DESC" rows="5" cols="35" showon="subj_type:select[OR]subj_type:radio[OR]subj_type:checkbox" /> <field name="msg" class="btn-group" type="radio" label="MOD_RSCONTACT_MESSAGE" default="1" description="MOD_RSCONTACT_MESSAGE_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="msg_len" type="text" size="5" default="1000" label="MOD_RSCONTACT_MESSAGE_LENGTH" description="MOD_RSCONTACT_MESSAGE_LENGTH_DESC" /> <field type="spacer" name="captchaspacer" label="MOD_RSCONTACT_SPAM_PROTECTION"/> <field name="captcha" class="btn-group" type="radio" label="MOD_RSCONTACT_CAPTCHA" default="0" description="MOD_RSCONTACT_CAPTCHA_DESC"> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field type="spacer" name="cfspacer" label="MOD_RSCONTACT_CUSTOM_FIELDS"/> <field name="cf1" class="btn-group" type="radio" label="MOD_RSCONTACT_CUSTOM_FIELD1" default="1" description="MOD_RSCONTACT_CUSTOM_FIELD1_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="cf1_name" type="text" label="MOD_RSCONTACT_CUSTOM_FIELD1_NAME" description="MOD_RSCONTACT_CUSTOM_FIELD1_NAME_DESC" default="Custom Field 1" /> <field name="cf1_type" class="inputbox" type="list" label="MOD_RSCONTACT_CUSTOM_FIELD1_TYPE" default="1" description="MOD_RSCONTACT_CUSTOM_FIELD_TYPE_DESC"> <option value="input">MOD_RSCONTACT_TEXTBOX</option> <option value="textarea">MOD_RSCONTACT_TEXTAREA</option> <option value="select">MOD_RSCONTACT_DROPBOX</option> <option value="radio">MOD_RSCONTACT_RADIO</option> <option value="checkbox">MOD_RSCONTACT_CHECKBOX</option> </field> <field name="cf1_inp" type="textarea" default="" filter="raw" label="MOD_RSCONTACT_CUSTOM_FIELD_INPUT_NAME" description="MOD_RSCONTACT_CUSTOM_FIELD_INPUT_DESC" rows="5" cols="35" /> <field name="cf2" class="btn-group" type="radio" label="MOD_RSCONTACT_CUSTOM_FIELD2" default="1" description="MOD_RSCONTACT_CUSTOM_FIELD2_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="cf2_name" type="text" label="MOD_RSCONTACT_CUSTOM_FIELD2_NAME" description="MOD_RSCONTACT_CUSTOM_FIELD2_NAME_DESC" default="Custom Field 2" /> <field name="cf2_type" class="inputbox" type="list" label="MOD_RSCONTACT_CUSTOM_FIELD2_TYPE" default="1" description="MOD_RSCONTACT_CUSTOM_FIELD_TYPE_DESC"> <option value="input">MOD_RSCONTACT_TEXTBOX</option> <option value="textarea">MOD_RSCONTACT_TEXTAREA</option> <option value="select">MOD_RSCONTACT_DROPBOX</option> <option value="radio">MOD_RSCONTACT_RADIO</option> <option value="checkbox">MOD_RSCONTACT_CHECKBOX</option> </field> <field name="cf2_inp" type="textarea" default="" filter="raw" label="MOD_RSCONTACT_CUSTOM_FIELD_INPUT_NAME" description="MOD_RSCONTACT_CUSTOM_FIELD_INPUT_DESC" rows="5" cols="35" /> <field name="cf3" class="btn-group" type="radio" label="MOD_RSCONTACT_CUSTOM_FIELD3" default="1" description="MOD_RSCONTACT_CUSTOM_FIELD3_DESC"> <option value="2">MOD_RSCONTACT_REQUIRED</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="cf3_name" type="text" label="MOD_RSCONTACT_CUSTOM_FIELD3_NAME" description="MOD_RSCONTACT_CUSTOM_FIELD3_NAME_DESC" default="Custom Field 3" /> <field name="cf3_type" class="inputbox" type="list" label="MOD_RSCONTACT_CUSTOM_FIELD3_TYPE" default="1" description="MOD_RSCONTACT_CUSTOM_FIELD_TYPE_DESC"> <option value="input">MOD_RSCONTACT_TEXTBOX</option> <option value="textarea">MOD_RSCONTACT_TEXTAREA</option> <option value="select">MOD_RSCONTACT_DROPBOX</option> <option value="radio">MOD_RSCONTACT_RADIO</option> <option value="checkbox">MOD_RSCONTACT_CHECKBOX</option> </field> <field name="cf3_inp" type="textarea" default="" filter="raw" label="MOD_RSCONTACT_CUSTOM_FIELD_INPUT_NAME" description="MOD_RSCONTACT_CUSTOM_FIELD_INPUT_DESC" rows="5" cols="35" /> <field name="send_copy" class="btn-group" type="radio" label="MOD_RSCONTACT_SEND_COPY" default="1" description="MOD_RSCONTACT_SEND_COPY_DESC"> <option value="2">MOD_RSCONTACT_USER_DECIDE</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="display_consent" class="btn-group" type="radio" label="MOD_RSCONTACT_DISPLAY_CONSENT" default="0" description="MOD_RSCONTACT_DISPLAY_CONSENT_DESC"> <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> <fieldset name="form_options" label="MOD_RSCONTACT_FORM_OPTIONS" description="MOD_RSCONTACT_FORM_OPTIONS_DESC"> <field name="form_pre" type="editor" rows="4" default="" filter="raw" label="MOD_RSCONTACT_FORM_BEFORE_TEXT" description="MOD_RSCONTACT_FORM_BEFORE_TEXT_DESC" /> <field name="form_post" type="editor" rows="4" default="" filter="raw" label="MOD_RSCONTACT_FORM_AFTER_TEXT" description="MOD_RSCONTACT_FORM_AFTER_TEXT_DESC"/> <field name="css" type="textarea" default="" filter="raw" label="MOD_RSCONTACT_CUSTOM_CSS" description="MOD_RSCONTACT_CUSTOM_CSS_DESC" rows="5" cols="35" /> <field name="js" type="textarea" default="" filter="raw" label="MOD_RSCONTACT_CUSTOM_JS" description="MOD_RSCONTACT_CUSTOM_JS_DESC" rows="5" cols="35" /> <field name="req_marker" type="text" size="30" default="*" label="MOD_RSCONTACT_REQUIRED_FIELD_MARKER" description="MOD_RSCONTACT_REQUIRED_FIELD_MARKER_DESC" /> <field name="label" class="btn-group" type="radio" label="MOD_RSCONTACT_LABEL_POS" default="1" description="MOD_RSCONTACT_LABEL_POS_DESC"> <option value="1">MOD_RSCONTACT_LABEL_INSIDE</option> <option value="0">MOD_RSCONTACT_LABEL_OUTSIDE</option> </field> <field name="form_h" class="btn-group" type="radio" showon="label:0" label="MOD_RSCONTACT_FORM_HORIZONTAL" default="0" description="MOD_RSCONTACT_FORM_HORIZONTAL_DESC"> <option value="1">MOD_RSCONTACT_FORM_HORIZONTAL_SHOW</option> <option value="0">MOD_RSCONTACT_FORM_HORIZONTAL_NOT_SHOW</option> </field> <field name="auto_width" class="btn-group" type="radio" label="MOD_RSCONTACT_AUTO_WIDTH" default="1" description="MOD_RSCONTACT_AUTO_WIDTH_DESC"> <option value="1">MOD_RSCONTACT_AUTO_WIDTH_FIELDS</option> <option value="0">MOD_RSCONTACT_AUTO_WIDTH_TEMPLATE</option> </field> <field name="thank_you" type="editor" rows="4" default="" filter="raw" label="MOD_RSCONTACT_THANK_YOU" description="MOD_RSCONTACT_THANK_YOU_DESC" /> </fieldset> <fieldset name="email_options" label="MOD_RSCONTACT_EMAIL_OPTIONS" description="MOD_RSCONTACT_EMAIL_OPTIONS_DESC"> <field name="mail_to" type="text" size="40" default="" label="MOD_RSCONTACT_ADMIN_EMAIL" description="MOD_RSCONTACT_ADMIN_EMAIL_DESC" /> <field name="mail_cc" type="text" size="40" default="" label="MOD_RSCONTACT_CC_EMAIL" description="MOD_RSCONTACT_CC_EMAIL_DESC" /> <field name="mail_bcc" type="text" size="40" default="" label="MOD_RSCONTACT_BCC_EMAIL" description="MOD_RSCONTACT_BCC_EMAIL_DESC" /> <field name="email_subj" type="text" size="40" default="You have a new contact request from {your-website}!" label="MOD_RSCONTACT_EMAIL_SUBJECT" description="MOD_RSCONTACT_EMAIL_SUBJECT_DESC" /> <field name="mail_msg" type="editor" rows="15" cols="35" filter="raw" label="MOD_RSCONTACT_EMAIL_BODY" description="MOD_RSCONTACT_EMAIL_BODY_DESC" default="<p> From: {salutation} {first-name} {last-name} {fullname} </p> <p> Subject: {subject} </p> <p> Email: {email} </p> <p> Home Phone: {home-phone} </p> <p> Mobile Phone: {mobile-phone} </p> <p> Work Phone: {work-phone} </p> <p> Address: {address-1} </p> <p> Address 2: {address-2} </p> <p> City: {city} </p> <p> State: {state} </p> <p> Zip/Postal Code: {zip} </p> <p> Company: {company} </p> <p> Website: {website} </p> <p> Message: {message} </p> <p> {cf1} </p> <p> {cf2} </p> <p> {cf3} </p> <p> {consent} </p> <hr / > <p> Username: {username} </p> <p> User Id: {user-id} </p> <p> User Email: {user-email} </p> <p> Date: {date} </p> <p> Date-Time: {date-time} </p> <p> IP: {ip} </p> " /> <field name="reply_to" class="btn-group" type="radio" label="MOD_RSCONTACT_REPLY_TO" default="1" description="MOD_RSCONTACT_REPLY_TO_DESC"> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="reply_email" type="text" size="40" default="" label="MOD_RSCONTACT_REPLY_EMAIL" description="MOD_RSCONTACT_REPLY_EMAIL_DESC" showon="reply_to:0" /> <field name="reply_name" type="text" size="40" default="" label="MOD_RSCONTACT_REPLY_NAME" description="MOD_RSCONTACT_REPLY_NAME_DESC" showon="reply_to:0" /> </fieldset> <fieldset name="advanced"> <field name="jquery" class="btn-group" type="radio" label="MOD_RSCONTACT_LOAD_JQUERY" default="1" description="MOD_RSCONTACT_LOAD_JQUERY_DESC"> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="moduleclass_sfx" type="textarea" rows="3" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" /> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" class="form-select" validate="moduleLayout" /> <field name="cache" type="list" default="1" label="COM_MODULES_FIELD_CACHING_LABEL" > <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" default="900" filter="integer" /> <field name="cachemode" type="hidden" default="static"> <option value="static"></option> </field> </fieldset> </fields> </config> </extension>mod_rscontact/.htaccess000044400000000177152160445060011207 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_ariquizresult/script.php000077500000002473152160445060012361 0ustar00<?php /* * * @package ARI Quiz * @author ARI Soft * @copyright Copyright (c) 2011 www.ari-soft.com. All rights reserved * @license GNU/GPL (http://www.gnu.org/copyleft/gpl.html) * */ defined('_JEXEC') or die('Restricted access'); class mod_ariquizresultInstallerScript { function preflight($type, $parent) { $type = strtolower($type); if ($type == 'install' || $type == 'update') $this->updateManifest($parent); } function postflight($type, $parent) { $type = strtolower($type); if ($type == 'install' || $type == 'update') $this->deleteHelpManifest($parent); } private function updateManifest($parent) { jimport('joomla.filesystem.file'); $installer = $parent->getParent(); $manifestFile = basename($installer->getPath('manifest')); $cleanManifestFile = preg_replace('/^\_+/i', '', $manifestFile); $dir = dirname(__FILE__) . '/install/'; JFile::delete($dir . $cleanManifestFile); JFile::copy($dir . '../' . $cleanManifestFile, $dir . $cleanManifestFile); } private function deleteHelpManifest($parent) { jimport('joomla.filesystem.file'); $installer = $parent->getParent(); $manifestFile = basename($installer->getPath('manifest')); JFile::delete(JPATH_ROOT . '/modules/mod_ariquizresult/' . $manifestFile); } }mod_ariquizresult/index.html000077500000000054152160445060012332 0ustar00<html><body bgcolor="#FFFFFF"></body></html>mod_ariquizresult/mod_ariquizresult.xml000077500000003110152160445060014635 0ustar00<?xml version="1.0" encoding="UTF-8"?> <extension version="1.6.0" type="module" method="upgrade" client="site"> <name>ARI Quiz results</name> <creationDate>October 2011</creationDate> <author>ARI Soft</author> <authorEmail>info@ari-soft.com</authorEmail> <authorUrl>www.ari-soft.com</authorUrl> <version>1.2.0</version> <description>Shows last quizzes results</description> <files> <filename module="mod_ariquizresult">mod_ariquizresult.php</filename> <filename>mod_ariquizresult.xml</filename> <filename>index.xml</filename> </files> <config> <fields name="params"> <fieldset name="basic"> <field name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="A suffix to be applied to the css class of the module (table.moduletable), this allows individual module styling" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="label" type="text" default="Last Results" label="Label" description="Header text" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="count" type="text" default="5" label="Count" description="The number of items to display (default 5)" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="pointUnit" type="list" default="percent" label="Result measure unit" description="Result measure unit (default percent)"> <option value="percent">Percent</option> <option value="point">Point</option> </field> </fieldset> </fields> </config> </extension>mod_ariquizresult/mod_ariquizresult.php000077500000003104152160445060014627 0ustar00<?php defined('_JEXEC') or die('Restricted access'); $basePath = JPATH_SITE . '/components/modules/'; $adminBasePath = JPATH_SITE . '/administrator/components/com_ariquizlite/'; if (@file_exists($adminBasePath)): require_once ($adminBasePath . 'utils/constants.php'); require_once ($adminBasePath . 'kernel/class.AriKernel.php'); AriKernel::import('Controllers.ResultController'); AriKernel::import('Web.Utils.QuizWebHelper'); AriKernel::import('I18N.I18N'); $count = intval($params->get('count', 5)); if ($count < 0) $count = 5; $measureUnit = $params->get('pointUnit', 'percent'); $moduleclass_sfx = $params->get('moduleclass_sfx', ''); $label = $params->get('label', 'Last Results'); $resultController = new AriQuizResultController(); $results = $resultController->call('getLastResults', $count); ?> <?php if (!empty($results)) { ?> <table style="width: 100%; font-size: 100%;" class="aqmodtable<?php echo $moduleclass_sfx; ?>"> <tr> <th colspan="3"><?php echo $label; ?></th> </tr> <?php foreach ($results as $result) { ?> <tr> <td class="aqmodquiz<?php echo $moduleclass_sfx; ?>"><?php AriQuizWebHelper::displayDbValue($result->QuizName); ?></td> <td class="aqmoduser<?php echo $moduleclass_sfx; ?>"><?php AriQuizWebHelper::displayDbValue($result->UserName); ?></td> <td class="aqmodpoint<?php echo $moduleclass_sfx; ?>" style="width: 1%; white-space: nowrap;"><?php echo $measureUnit == 'point' ? $result->UserScore : sprintf('%.2f %%', $result->PercentScore); ?></td> </tr> <?php } ?> </table> <?php } endif; ?>mod_ariquizresult/.htaccess000044400000000177152160445060012132 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_random_image/mod_random_image.xml000064400000004401152160445060014032 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_random_image</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_RANDOM_IMAGE_XML_DESCRIPTION</description> <files> <filename module="mod_random_image">mod_random_image.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_random_image.ini</language> <language tag="en-GB">en-GB.mod_random_image.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_RANDOM_IMAGE" /> <config> <fields name="params"> <fieldset name="basic"> <field name="type" type="text" label="MOD_RANDOM_IMAGE_FIELD_TYPE_LABEL" description="MOD_RANDOM_IMAGE_FIELD_TYPE_DESC" default="jpg" /> <field name="folder" type="text" label="MOD_RANDOM_IMAGE_FIELD_FOLDER_LABEL" description="MOD_RANDOM_IMAGE_FIELD_FOLDER_DESC" validate="filePath" /> <field name="link" type="text" label="MOD_RANDOM_IMAGE_FIELD_LINK_LABEL" description="MOD_RANDOM_IMAGE_FIELD_LINK_DESC" /> <field name="width" type="number" label="MOD_RANDOM_IMAGE_FIELD_WIDTH_LABEL" description="MOD_RANDOM_IMAGE_FIELD_WIDTH_DESC" default="100" filter="integer" /> <field name="height" type="number" label="MOD_RANDOM_IMAGE_FIELD_HEIGHT_LABEL" description="MOD_RANDOM_IMAGE_FIELD_HEIGHT_DESC" filter="integer" /> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> </fieldset> </fields> </config> </extension> mod_random_image/mod_random_image.php000064400000001546152160445060014030 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_random_image * * @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 random image functions only once JLoader::register('ModRandomImageHelper', __DIR__ . '/helper.php'); $link = $params->get('link'); $folder = ModRandomImageHelper::getFolder($params); $images = ModRandomImageHelper::getImages($params, $folder); if (!count($images)) { echo JText::_('MOD_RANDOM_IMAGE_NO_IMAGES'); return; } $image = ModRandomImageHelper::getRandomImage($params, $images); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_random_image', $params->get('layout', 'default')); mod_random_image/tmpl/default.php000064400000001300152160445060013133 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_random_image * * @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="random-image<?php echo $moduleclass_sfx; ?>"> <?php if ($link) : ?> <a href="<?php echo htmlspecialchars($link, ENT_QUOTES, 'UTF-8'); ?>"> <?php endif; ?> <?php echo JHtml::_('image', $image->folder . '/' . htmlspecialchars($image->name, ENT_COMPAT, 'UTF-8'), htmlspecialchars($image->name, ENT_COMPAT, 'UTF-8'), array('width' => $image->width, 'height' => $image->height)); ?> <?php if ($link) : ?> </a> <?php endif; ?> </div> mod_random_image/tmpl/.htaccess000044400000000177152160445060012605 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_random_image/helper.php000064400000005706152160445060012030 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_random_image * * @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; use Joomla\String\StringHelper; /** * Helper for mod_random_image * * @since 1.5 */ class ModRandomImageHelper { /** * Retrieves a random image * * @param \Joomla\Registry\Registry &$params module parameters object * @param array $images list of images * * @return mixed */ public static function getRandomImage(&$params, $images) { $width = $params->get('width', 100); $height = $params->get('height', null); $i = count($images); $random = mt_rand(0, $i - 1); $image = $images[$random]; $size = getimagesize(JPATH_BASE . '/' . $image->folder . '/' . $image->name); if ($size[0] < $width) { $width = $size[0]; } $coeff = $size[0] / $size[1]; if ($height === null) { $height = (int) ($width / $coeff); } else { $newheight = min($height, (int) ($width / $coeff)); if ($newheight < $height) { $height = $newheight; } else { $width = $height * $coeff; } } $image->width = $width; $image->height = $height; $image->folder = str_replace('\\', '/', $image->folder); return $image; } /** * Retrieves images from a specific folder * * @param \Joomla\Registry\Registry &$params module params * @param string $folder folder to get the images from * * @return array */ public static function getImages(&$params, $folder) { $type = $params->get('type', 'jpg'); $files = array(); $images = array(); $dir = JPATH_BASE . '/' . $folder; // Check if directory exists if (is_dir($dir)) { if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if ($file !== '.' && $file !== '..' && $file !== 'CVS' && $file !== 'index.html') { $files[] = $file; } } } closedir($handle); $i = 0; foreach ($files as $img) { if (!is_dir($dir . '/' . $img) && preg_match('/' . $type . '/', $img)) { $images[$i] = new stdClass; $images[$i]->name = $img; $images[$i]->folder = $folder; $i++; } } } return $images; } /** * Get sanitized folder * * @param \Joomla\Registry\Registry &$params module params objects * * @return mixed */ public static function getFolder(&$params) { $folder = $params->get('folder'); $LiveSite = JUri::base(); // If folder includes livesite info, remove if (StringHelper::strpos($folder, $LiveSite) === 0) { $folder = str_replace($LiveSite, '', $folder); } // If folder includes absolute path, remove if (StringHelper::strpos($folder, JPATH_SITE) === 0) { $folder = str_replace(JPATH_BASE, '', $folder); } return str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $folder); } } mod_random_image/.htaccess000044400000000177152160445060011631 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_search/mod_search.php000064400000003672152160445060011500 0ustar00<?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/tmpl/default.php000064400000004227152160445060011771 0ustar00<?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/tmpl/.htaccess000044400000000177152160445060011430 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_search/helper.php000064400000001074152160445060010645 0ustar00<?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_search/mod_search.xml000064400000010775152160445060011513 0ustar00<?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/.htaccess000044400000000177152160445060010454 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_custom/mod_custom.xml000064400000005020152160445060011610 0ustar00<?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.php000064400000001151152160445060011600 0ustar00<?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.php000064400000000754152160445060012037 0ustar00<?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_custom/tmpl/.htaccess000044400000000177152160445060011475 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_custom/.htaccess000044400000000177152160445060010521 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_syndicate/tmpl/default.php000064400000001275152160445060012507 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_syndicate * * @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; ?> <a href="<?php echo $link; ?>" class="syndicate-module<?php echo $moduleclass_sfx; ?>"> <?php echo JHtml::_('image', 'system/livemarks.png', 'feed-image', null, true); ?> <?php if ($params->get('display_text', 1)) : ?> <span> <?php if (str_replace(' ', '', $text) !== '') : ?> <?php echo $text; ?> <?php else : ?> <?php echo JText::_('MOD_SYNDICATE_DEFAULT_FEED_ENTRIES'); ?> <?php endif; ?> </span> <?php endif; ?> </a> mod_syndicate/tmpl/.htaccess000044400000000177152160445060012146 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_syndicate/mod_syndicate.php000064400000001361152160445060012725 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_syndicate * * @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; // Include the syndicate functions only once JLoader::register('ModSyndicateHelper', __DIR__ . '/helper.php'); $params->def('format', 'rss'); $link = ModSyndicateHelper::getLink($params); if ($link === null) { return; } $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); $text = htmlspecialchars($params->get('text', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_syndicate', $params->get('layout', 'default')); mod_syndicate/mod_syndicate.xml000064400000004262152160445060012741 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_syndicate</name> <author>Joomla! Project</author> <creationDate>May 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_SYNDICATE_XML_DESCRIPTION</description> <files> <filename module="mod_syndicate">mod_syndicate.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_syndicate.ini</language> <language tag="en-GB">en-GB.mod_syndicate.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_SYNDICATION_FEEDS" /> <config> <fields name="params"> <fieldset name="basic"> <field name="display_text" type="radio" label="MOD_SYNDICATE_FIELD_DISPLAYTEXT_LABEL" description="MOD_SYNDICATE_FIELD_DISPLAYTEXT_DESC" default="1" filter="integer" class="btn-group btn-group-yesno" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="text" type="text" label="MOD_SYNDICATE_FIELD_TEXT_LABEL" description="MOD_SYNDICATE_FIELD_TEXT_DESC" showon="display_text:1" /> <field name="format" type="list" label="MOD_SYNDICATE_FIELD_FORMAT_LABEL" description="MOD_SYNDICATE_FIELD_FORMAT_DESC" default="rss" > <option value="rss">MOD_SYNDICATE_FIELD_VALUE_RSS</option> <option value="atom">MOD_SYNDICATE_FIELD_VALUE_ATOM</option> </field> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> </fieldset> </fields> </config> </extension> mod_syndicate/helper.php000064400000001500152160445060011355 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_syndicate * * @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; use Joomla\Utilities\ArrayHelper; /** * Helper for mod_syndicate * * @since 1.5 */ class ModSyndicateHelper { /** * Gets the link * * @param \Joomla\Registry\Registry &$params module parameters * * @return array The link as a string * * @since 1.5 */ public static function getLink(&$params) { $document = JFactory::getDocument(); foreach ($document->_links as $link => $value) { $value = ArrayHelper::toString($value); if (strpos($value, 'application/' . $params->get('format') . '+xml')) { return $link; } } } } mod_syndicate/.htaccess000044400000000177152160445060011172 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_feed/mod_feed.php000064400000001431152160445060010563 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_feed * * @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 feed functions only once JLoader::register('ModFeedHelper', __DIR__ . '/helper.php'); $rssurl = $params->get('rssurl', ''); $rssrtl = $params->get('rssrtl', 0); // Check if feed URL has been set if (empty ($rssurl)) { echo '<div>'; echo JText::_('MOD_FEED_ERR_NO_URL'); echo '</div>'; return; } $feed = ModFeedHelper::getFeed($params); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_feed', $params->get('layout', 'default')); mod_feed/tmpl/default.php000064400000006346152160445060011433 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_feed * * @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; ?> <?php if (!empty($feed) && is_string($feed)) { echo $feed; } else { $lang = JFactory::getLanguage(); $myrtl = $params->get('rssrtl', 0); $direction = ' '; $isRtl = $lang->isRtl(); if ($isRtl && $myrtl == 0) { $direction = ' redirect-rtl'; } // Feed description elseif ($isRtl && $myrtl == 1) { $direction = ' redirect-ltr'; } elseif ($isRtl && $myrtl == 2) { $direction = ' redirect-rtl'; } elseif ($myrtl == 0) { $direction = ' redirect-ltr'; } elseif ($myrtl == 1) { $direction = ' redirect-ltr'; } elseif ($myrtl == 2) { $direction = ' redirect-rtl'; } if ($feed !== false) { ?> <div style="direction: <?php echo $rssrtl ? 'rtl' :'ltr'; ?>; text-align: <?php echo $rssrtl ? 'right' :'left'; ?> !important" class="feed<?php echo $moduleclass_sfx; ?>"> <?php // Feed description if ($feed->title !== null && $params->get('rsstitle', 1)) { ?> <h2 class="<?php echo $direction; ?>"> <a href="<?php echo htmlspecialchars($rssurl, ENT_COMPAT, 'UTF-8'); ?>" target="_blank"> <?php echo $feed->title; ?></a> </h2> <?php } // Feed date if ($params->get('rssdate', 1)) : ?> <h3> <?php echo JHtml::_('date', $feed->publishedDate, JText::_('DATE_FORMAT_LC3')); ?> </h3> <?php endif; // Feed description if ($params->get('rssdesc', 1)) { ?> <?php echo $feed->description; ?> <?php } // Feed image if ($feed->image && $params->get('rssimage', 1)) : ?> <img src="<?php echo $feed->image->uri; ?>" alt="<?php echo $feed->image->title; ?>"/> <?php endif; ?> <!-- Show items --> <?php if (!empty($feed)) { ?> <ul class="newsfeed<?php echo $params->get('moduleclass_sfx'); ?>"> <?php for ($i = 0, $max = min(count($feed), $params->get('rssitems', 3)); $i < $max; $i++) { ?> <?php $uri = $feed[$i]->uri || !$feed[$i]->isPermaLink ? trim($feed[$i]->uri) : trim($feed[$i]->guid); $uri = !$uri || stripos($uri, 'http') !== 0 ? $rssurl : $uri; $text = $feed[$i]->content !== '' ? trim($feed[$i]->content) : ''; ?> <li> <?php if (!empty($uri)) : ?> <span class="feed-link"> <a href="<?php echo htmlspecialchars($uri, ENT_COMPAT, 'UTF-8'); ?>" target="_blank"> <?php echo trim($feed[$i]->title); ?></a></span> <?php else : ?> <span class="feed-link"><?php echo trim($feed[$i]->title); ?></span> <?php endif; ?> <?php if ($params->get('rssitemdate', 0)) : ?> <div class="feed-item-date"> <?php echo JHtml::_('date', $feed[$i]->publishedDate, JText::_('DATE_FORMAT_LC3')); ?> </div> <?php endif; ?> <?php if ($params->get('rssitemdesc', 1) && $text !== '') : ?> <div class="feed-item-description"> <?php // Strip the images. $text = JFilterOutput::stripImages($text); $text = JHtml::_('string.truncate', $text, $params->get('word_count', 0)); echo str_replace(''', "'", $text); ?> </div> <?php endif; ?> </li> <?php } ?> </ul> <?php } ?> </div> <?php } } mod_feed/tmpl/.htaccess000044400000000177152160445060011066 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_feed/mod_feed.xml000064400000011065152160445060010600 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_feed</name> <author>Joomla! Project</author> <creationDate>July 2005</creationDate> <copyright>(C) 2005 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>MOD_FEED_XML_DESCRIPTION</description> <files> <filename module="mod_feed">mod_feed.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_feed.ini</language> <language tag="en-GB">en-GB.mod_feed.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_FEED_DISPLAY" /> <config> <fields name="params"> <fieldset name="basic"> <field name="rssurl" type="url" label="MOD_FEED_FIELD_RSSURL_LABEL" description="MOD_FEED_FIELD_RSSURL_DESC" size="50" filter="url" required="true" validate="url" /> <field name="rssrtl" type="radio" label="MOD_FEED_FIELD_RTL_LABEL" description="MOD_FEED_FIELD_RTL_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="rsstitle" type="radio" label="MOD_FEED_FIELD_RSSTITLE_LABEL" description="MOD_FEED_FIELD_RSSTITLE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="rssdesc" type="radio" label="MOD_FEED_FIELD_DESCRIPTION_LABEL" description="MOD_FEED_FIELD_DESCRIPTION_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="rssdate" type="radio" label="MOD_FEED_FIELD_DATE_LABEL" description="MOD_FEED_FIELD_DATE_DESC" class="btn-group btn-group-yesno" default="0" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="rssimage" type="radio" label="MOD_FEED_FIELD_IMAGE_LABEL" description="MOD_FEED_FIELD_IMAGE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="rssitems" type="number" label="MOD_FEED_FIELD_ITEMS_LABEL" description="MOD_FEED_FIELD_ITEMS_DESC" default="3" filter="integer" /> <field name="rssitemdesc" type="radio" label="MOD_FEED_FIELD_ITEMDESCRIPTION_LABEL" description="MOD_FEED_FIELD_ITEMDESCRIPTION_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="rssitemdate" type="radio" label="MOD_FEED_FIELD_ITEMDATE_LABEL" description="MOD_FEED_FIELD_ITEMDATE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="word_count" type="text" label="MOD_FEED_FIELD_WORDCOUNT_LABEL" description="MOD_FEED_FIELD_WORDCOUNT_DESC" size="6" default="0" filter="integer" /> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> <field name="cache" type="list" label="COM_MODULES_FIELD_CACHING_LABEL" description="COM_MODULES_FIELD_CACHING_DESC" default="1" filter="integer" > <option value="1">JGLOBAL_USE_GLOBAL</option> <option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option> </field> <field name="cache_time" type="number" label="COM_MODULES_FIELD_CACHE_TIME_LABEL" description="COM_MODULES_FIELD_CACHE_TIME_DESC" default="900" filter="integer" /> </fieldset> </fields> </config> </extension> mod_feed/helper.php000064400000001611152160445060010300 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_feed * * @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_feed * * @since 1.5 */ class ModFeedHelper { /** * Retrieve feed information * * @param \Joomla\Registry\Registry $params module parameters * * @return JFeedReader|string */ public static function getFeed($params) { // Module params $rssurl = $params->get('rssurl', ''); // Get RSS parsed object try { $feed = new JFeedFactory; $rssDoc = $feed->getFeed($rssurl); } catch (Exception $e) { return JText::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED'); } if (empty($rssDoc)) { return JText::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED'); } if ($rssDoc) { return $rssDoc; } } } mod_feed/.htaccess000044400000000177152160445060010112 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_users_latest/mod_users_latest.php000064400000001237152160445060014213 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_users_latest * * @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 latest functions only once JLoader::register('ModUsersLatestHelper', __DIR__ . '/helper.php'); $shownumber = $params->get('shownumber', 5); $names = ModUsersLatestHelper::getUsers($params); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_users_latest', $params->get('layout', 'default')); mod_users_latest/mod_users_latest.xml000064400000005077152160445060014232 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_users_latest</name> <author>Joomla! Project</author> <creationDate>December 2009</creationDate> <copyright>(C) 2009 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_USERS_LATEST_XML_DESCRIPTION</description> <files> <filename module="mod_users_latest">mod_users_latest.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_users_latest.ini</language> <language tag="en-GB">en-GB.mod_users_latest.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_LATEST_USERS" /> <config> <fields name="params"> <fieldset name="basic"> <field name="shownumber" type="number" label="MOD_USERS_LATEST_FIELD_NUMBER_LABEL" description="MOD_USERS_LATEST_FIELD_NUMBER_DESC" default="5" filter="integer" /> <field name="filter_groups" type="radio" label="MOD_USERS_LATEST_FIELD_FILTER_GROUPS_LABEL" description="MOD_USERS_LATEST_FIELD_FILTER_GROUPS_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="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_users_latest/tmpl/default.php000064400000000755152160445060013243 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_users_latest * * @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; ?> <?php if (!empty($names)) : ?> <ul class="latestusers<?php echo $moduleclass_sfx; ?> mod-list" > <?php foreach ($names as $name) : ?> <li> <?php echo $name->username; ?> </li> <?php endforeach; ?> </ul> <?php endif; ?> mod_users_latest/tmpl/.htaccess000044400000000177152160445060012700 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_users_latest/helper.php000064400000002763152160445060012123 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_users_latest * * @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_users_latest * * @since 1.6 */ class ModUsersLatestHelper { /** * Get users sorted by activation date * * @param \Joomla\Registry\Registry $params module parameters * * @return array The array of users * * @since 1.6 */ public static function getUsers($params) { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName(array('a.id', 'a.name', 'a.username', 'a.registerDate'))) ->order($db->quoteName('a.registerDate') . ' DESC') ->from('#__users AS a'); $user = JFactory::getUser(); if (!$user->authorise('core.admin') && $params->get('filter_groups', 0) == 1) { $groups = $user->getAuthorisedGroups(); if (empty($groups)) { return array(); } $query->join('LEFT', '#__user_usergroup_map AS m ON m.user_id = a.id') ->join('LEFT', '#__usergroups AS ug ON ug.id = m.group_id') ->where('ug.id in (' . implode(',', $groups) . ')') ->where('ug.id <> 1'); } $db->setQuery($query, 0, $params->get('shownumber', 5)); try { return (array) $db->loadObjectList(); } catch (RuntimeException $e) { JFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); return array(); } } } mod_users_latest/.htaccess000044400000000177152160445060011724 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_languages/mod_languages.php000064400000001305152160445060012671 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_languages * * @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 languages functions only once JLoader::register('ModLanguagesHelper', __DIR__ . '/helper.php'); $headerText = $params->get('header_text'); $footerText = $params->get('footer_text'); $list = ModLanguagesHelper::getList($params); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_languages', $params->get('layout', 'default')); mod_languages/mod_languages.xml000064400000011122152160445060012700 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_languages</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.5.0</version> <description>MOD_LANGUAGES_XML_DESCRIPTION</description> <files> <filename module="mod_languages">mod_languages.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_languages.ini</language> <language tag="en-GB">en-GB.mod_languages.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_LANGUAGE_SWITCHER" /> <config> <fieldset> <field name="language" type="list" label="JFIELD_LANGUAGE_LABEL" description="JFIELD_MODULE_LANGUAGE_DESC" > <option value="*">JALL</option> </field> </fieldset> <fields name="params"> <fieldset name="basic"> <field name="header_text" type="textarea" label="MOD_LANGUAGES_FIELD_HEADER_LABEL" description="MOD_LANGUAGES_FIELD_HEADER_DESC" filter="safehtml" rows="3" cols="40" /> <field name="footer_text" type="textarea" label="MOD_LANGUAGES_FIELD_FOOTER_LABEL" description="MOD_LANGUAGES_FIELD_FOOTER_DESC" filter="safehtml" rows="3" cols="40" /> <field name="dropdown" type="radio" label="MOD_LANGUAGES_FIELD_DROPDOWN_LABEL" description="MOD_LANGUAGES_FIELD_DROPDOWN_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="dropdownimage" type="radio" label="MOD_LANGUAGES_FIELD_DROPDOWN_IMAGE_LABEL" description="MOD_LANGUAGES_FIELD_DROPDOWN_IMAGE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" showon="dropdown:1" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="lineheight" type="radio" label="MOD_LANGUAGES_FIELD_LINEHEIGHT_LABEL" description="MOD_LANGUAGES_FIELD_LINEHEIGHT_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" showon="dropdown:1[AND]dropdownimage:1" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="image" type="radio" label="MOD_LANGUAGES_FIELD_USEIMAGE_LABEL" description="MOD_LANGUAGES_FIELD_USEIMAGE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" showon="dropdown:0" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="spacer3" type="spacer" label="MOD_LANGUAGES_SPACER_USENAME_LABEL" class="text" showon="image:0[AND]dropdown:0" /> <field name="show_active" type="radio" label="MOD_LANGUAGES_FIELD_ACTIVE_LABEL" description="MOD_LANGUAGES_FIELD_ACTIVE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" showon="dropdownimage:1[OR]dropdown:0" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="full_name" type="radio" label="MOD_LANGUAGES_FIELD_FULL_NAME_LABEL" description="MOD_LANGUAGES_FIELD_FULL_NAME_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" showon="dropdown:0[AND]image:0" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="inline" type="radio" label="MOD_LANGUAGES_FIELD_INLINE_LABEL" description="MOD_LANGUAGES_FIELD_INLINE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" showon="dropdown:0" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="MOD_LANGUAGES_FIELD_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> </fieldset> </fields> </config> </extension> mod_languages/tmpl/default.php000064400000011345152160445060012471 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_languages * * @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::_('stylesheet', 'mod_languages/template.css', array('version' => 'auto', 'relative' => true)); if ($params->get('dropdown', 0) && !$params->get('dropdownimage', 1)) { JHtml::_('formbehavior.chosen'); } ?> <div class="mod-languages<?php echo $moduleclass_sfx; ?>"> <?php if ($headerText) : ?> <div class="pretext"><p><?php echo $headerText; ?></p></div> <?php endif; ?> <?php if ($params->get('dropdown', 0) && !$params->get('dropdownimage', 1)) : ?> <form name="lang" method="post" action="<?php echo htmlspecialchars_decode(htmlspecialchars(JUri::current(), ENT_COMPAT, 'UTF-8'), ENT_NOQUOTES); ?>"> <select class="inputbox advancedSelect" onchange="document.location.replace(this.value);" > <?php foreach ($list as $language) : ?> <option dir=<?php echo $language->rtl ? '"rtl"' : '"ltr"'; ?> value="<?php echo htmlspecialchars_decode(htmlspecialchars($language->link, ENT_QUOTES, 'UTF-8'), ENT_NOQUOTES); ?>" <?php echo $language->active ? 'selected="selected"' : ''; ?>> <?php echo $language->title_native; ?></option> <?php endforeach; ?> </select> </form> <?php elseif ($params->get('dropdown', 0) && $params->get('dropdownimage', 1)) : ?> <div class="btn-group"> <?php foreach ($list as $language) : ?> <?php if ($language->active) : ?> <a href="#" data-toggle="dropdown" class="btn dropdown-toggle"> <span class="caret"></span> <?php if ($language->image) : ?> <?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.gif', '', null, true); ?> <?php endif; ?> <?php echo $language->title_native; ?> </a> <?php endif; ?> <?php endforeach; ?> <ul class="<?php echo $params->get('lineheight', 0) ? 'lang-block' : 'lang-inline'; ?> dropdown-menu" dir="<?php echo JFactory::getLanguage()->isRtl() ? 'rtl' : 'ltr'; ?>"> <?php foreach ($list as $language) : ?> <?php if (!$language->active) : ?> <li> <a href="<?php echo htmlspecialchars_decode(htmlspecialchars($language->link, ENT_QUOTES, 'UTF-8'), ENT_NOQUOTES); ?>"> <?php if ($language->image) : ?> <?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.gif', '', null, true); ?> <?php endif; ?> <?php echo $language->title_native; ?> </a> </li> <?php elseif ($params->get('show_active', 1)) : ?> <?php $base = JUri::getInstance(); ?> <li class="lang-active"> <a href="<?php echo htmlspecialchars_decode(htmlspecialchars($base, ENT_QUOTES, 'UTF-8'), ENT_NOQUOTES); ?>"> <?php if ($language->image) : ?> <?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.gif', '', null, true); ?> <?php endif; ?> <?php echo $language->title_native; ?> </a> </li> <?php endif; ?> <?php endforeach; ?> </ul> </div> <?php else : ?> <ul class="<?php echo $params->get('inline', 1) ? 'lang-inline' : 'lang-block'; ?>" dir="<?php echo JFactory::getLanguage()->isRtl() ? 'rtl' : 'ltr'; ?>"> <?php foreach ($list as $language) : ?> <?php if (!$language->active) : ?> <li> <a href="<?php echo htmlspecialchars_decode(htmlspecialchars($language->link, ENT_QUOTES, 'UTF-8'), ENT_NOQUOTES); ?>"> <?php if ($params->get('image', 1)) : ?> <?php if ($language->image) : ?> <?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, array('title' => $language->title_native), true); ?> <?php else : ?> <span class="label"><?php echo strtoupper($language->sef); ?></span> <?php endif; ?> <?php else : ?> <?php echo $params->get('full_name', 1) ? $language->title_native : strtoupper($language->sef); ?> <?php endif; ?> </a> </li> <?php elseif ($params->get('show_active', 1)) : ?> <?php $base = JUri::getInstance(); ?> <li class="lang-active"> <a href="<?php echo htmlspecialchars_decode(htmlspecialchars($base, ENT_QUOTES, 'UTF-8'), ENT_NOQUOTES); ?>"> <?php if ($params->get('image', 1)) : ?> <?php if ($language->image) : ?> <?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, array('title' => $language->title_native), true); ?> <?php else : ?> <span class="label"><?php echo strtoupper($language->sef); ?></span> <?php endif; ?> <?php else : ?> <?php echo $params->get('full_name', 1) ? $language->title_native : strtoupper($language->sef); ?> <?php endif; ?> </a> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> <?php if ($footerText) : ?> <div class="posttext"><p><?php echo $footerText; ?></p></div> <?php endif; ?> </div> mod_languages/tmpl/.htaccess000044400000000177152160445060012131 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_languages/helper.php000064400000007731152160445060011354 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_languages * * @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('MenusHelper', JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php'); /** * Helper for mod_languages * * @since 1.6 */ abstract class ModLanguagesHelper { /** * Gets a list of available languages * * @param \Joomla\Registry\Registry &$params module params * * @return array */ public static function getList(&$params) { $user = JFactory::getUser(); $lang = JFactory::getLanguage(); $languages = JLanguageHelper::getLanguages(); $app = JFactory::getApplication(); $menu = $app->getMenu(); $active = $menu->getActive(); // Get menu home items $homes = array(); $homes['*'] = $menu->getDefault('*'); foreach ($languages as $item) { $default = $menu->getDefault($item->lang_code); if ($default && $default->language === $item->lang_code) { $homes[$item->lang_code] = $default; } } // Load associations $assoc = JLanguageAssociations::isEnabled(); if ($assoc) { if ($active) { $associations = MenusHelper::getAssociations($active->id); } // Load component associations $option = $app->input->get('option'); $class = ucfirst(str_replace('com_', '', $option)) . 'HelperAssociation'; \JLoader::register($class, JPATH_SITE . '/components/' . $option . '/helpers/association.php'); if (class_exists($class) && is_callable(array($class, 'getAssociations'))) { $cassociations = call_user_func(array($class, 'getAssociations')); } } $levels = $user->getAuthorisedViewLevels(); $sitelangs = JLanguageHelper::getInstalledLanguages(0); $multilang = JLanguageMultilang::isEnabled(); // Filter allowed languages foreach ($languages as $i => &$language) { // Do not display language without frontend UI if (!array_key_exists($language->lang_code, $sitelangs)) { unset($languages[$i]); } // Do not display language without specific home menu elseif (!isset($homes[$language->lang_code])) { unset($languages[$i]); } // Do not display language without authorized access level elseif (isset($language->access) && $language->access && !in_array($language->access, $levels)) { unset($languages[$i]); } else { $language->active = ($language->lang_code === $lang->getTag()); // Fetch language rtl // If loaded language get from current JLanguage metadata if ($language->active) { $language->rtl = $lang->isRtl(); } // If not loaded language fetch metadata directly for performance else { $languageMetadata = JLanguageHelper::getMetadata($language->lang_code); $language->rtl = $languageMetadata['rtl']; } if ($multilang) { if (isset($cassociations[$language->lang_code])) { $language->link = JRoute::_($cassociations[$language->lang_code] . '&lang=' . $language->sef); } elseif (isset($associations[$language->lang_code]) && $menu->getItem($associations[$language->lang_code])) { $itemid = $associations[$language->lang_code]; $language->link = JRoute::_('index.php?lang=' . $language->sef . '&Itemid=' . $itemid); } elseif ($active && $active->language == '*') { $language->link = JRoute::_('index.php?lang=' . $language->sef . '&Itemid=' . $active->id); } else { if ($language->active) { $language->link = JUri::getInstance()->toString(array('path', 'query')); } else { $itemid = isset($homes[$language->lang_code]) ? $homes[$language->lang_code]->id : $homes['*']->id; $language->link = JRoute::_('index.php?lang=' . $language->sef . '&Itemid=' . $itemid); } } } else { $language->link = JRoute::_('&Itemid=' . $homes['*']->id); } } } return $languages; } } mod_languages/.htaccess000044400000000177152160445060011155 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_menu/mod_menu.php000064400000001542152160445060010670 0ustar00<?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/tmpl/default_heading.php000064400000001616152160445060013146 0ustar00<?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_component.php000064400000002504152160445060013546 0ustar00<?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.php000064400000003534152160445060011470 0ustar00<?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_menu/tmpl/default_url.php000064400000002742152160445060012352 0ustar00<?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/.htaccess000044400000000177152160445060011127 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_menu/tmpl/default_separator.php000064400000001615152160445060013546 0ustar00<?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/helper.php000064400000014531152160445060010346 0ustar00<?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.xml000064400000010544152160445060010703 0ustar00<?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/.htaccess000044400000000177152160445060010153 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_related_items/mod_related_items.php000064400000001717152160445060014426 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_related_items * * @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 related items functions only once JLoader::register('ModRelatedItemsHelper', __DIR__ . '/helper.php'); $cacheparams = new stdClass; $cacheparams->cachemode = 'safeuri'; $cacheparams->class = 'ModRelatedItemsHelper'; $cacheparams->method = 'getList'; $cacheparams->methodparams = $params; $cacheparams->modeparams = array('id' => 'int', 'Itemid' => 'int'); $list = JModuleHelper::moduleCache($module, $params, $cacheparams); if (!count($list)) { return; } $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); $showDate = $params->get('showDate', 0); require JModuleHelper::getLayoutPath('mod_related_items', $params->get('layout', 'default')); mod_related_items/tmpl/default.php000064400000001104152160445060013334 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_related_items * * @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="relateditems<?php echo $moduleclass_sfx; ?> mod-list"> <?php foreach ($list as $item) : ?> <li> <a href="<?php echo $item->route; ?>"> <?php if ($showDate) echo JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC4')) . ' - '; ?> <?php echo $item->title; ?></a> </li> <?php endforeach; ?> </ul> mod_related_items/tmpl/.htaccess000044400000000177152160445060013004 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_related_items/mod_related_items.xml000064400000004621152160445060014434 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_related_items</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_RELATED_XML_DESCRIPTION</description> <files> <filename module="mod_related_items">mod_related_items.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_related_items.ini</language> <language tag="en-GB">en-GB.mod_related_items.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_ARTICLES_RELATED" /> <config> <fields name="params"> <fieldset name="basic"> <field name="showDate" type="radio" label="MOD_RELATED_FIELD_SHOWDATE_LABEL" description="MOD_RELATED_FIELD_SHOWDATE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="maximum" type="number" label="MOD_RELATED_FIELD_MAX_LABEL" description="MOD_RELATED_FIELD_MAX_DESC" default="5" filter="integer" /> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> <field name="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_related_items/helper.php000064400000010267152160445060012225 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_related_items * * @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'); /** * Helper for mod_related_items * * @since 1.5 */ abstract class ModRelatedItemsHelper { /** * Get a list of related articles * * @param \Joomla\Registry\Registry &$params module parameters * * @return array */ public static function getList(&$params) { $db = JFactory::getDbo(); $app = JFactory::getApplication(); $user = JFactory::getUser(); $groups = implode(',', $user->getAuthorisedViewLevels()); $date = JFactory::getDate(); $maximum = (int) $params->get('maximum', 5); // Get an instance of the generic articles model JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_content/models'); $articles = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true)); if ($articles === false) { JFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); return array(); } // Set application parameters in model $appParams = $app->getParams(); $articles->setState('params', $appParams); $option = $app->input->get('option'); $view = $app->input->get('view'); if (!($option === 'com_content' && $view === 'article')) { return array(); } $temp = $app->input->getString('id'); $temp = explode(':', $temp); $id = $temp[0]; $nullDate = $db->getNullDate(); $now = $date->toSql(); $related = array(); $query = $db->getQuery(true); if ($id) { // Select the meta keywords from the item $query->select('metakey') ->from('#__content') ->where('id = ' . (int) $id); $db->setQuery($query); try { $metakey = trim($db->loadResult()); } catch (RuntimeException $e) { JFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); return array(); } // Explode the meta keys on a comma $keys = explode(',', $metakey); $likes = array(); // Assemble any non-blank word(s) foreach ($keys as $key) { $key = trim($key); if ($key) { $likes[] = $db->escape($key); } } if (count($likes)) { // Select other items based on the metakey field 'like' the keys found $query->clear() ->select('a.id') ->from('#__content AS a') ->where('a.id != ' . (int) $id) ->where('a.state = 1') ->where('a.access IN (' . $groups . ')'); $wheres = array(); foreach ($likes as $keyword) { $wheres[] = 'a.metakey LIKE ' . $db->quote('%' . $keyword . '%'); } $query->where('(' . implode(' OR ', $wheres) . ')') ->where('(a.publish_up = ' . $db->quote($nullDate) . ' OR a.publish_up <= ' . $db->quote($now) . ')') ->where('(a.publish_down = ' . $db->quote($nullDate) . ' OR a.publish_down >= ' . $db->quote($now) . ')'); // Filter by language if (JLanguageMultilang::isEnabled()) { $query->where('a.language in (' . $db->quote(JFactory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')'); } $db->setQuery($query, 0, $maximum); try { $articleIds = $db->loadColumn(); } catch (RuntimeException $e) { JFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); return array(); } if (count($articleIds)) { $articles->setState('filter.article_id', $articleIds); $articles->setState('filter.published', 1); $related = $articles->getItems(); } unset($articleIds); } } if (count($related)) { // Prepare data for display using display options foreach ($related as &$item) { $item->slug = $item->id . ':' . $item->alias; /** @deprecated Catslug is deprecated, use catid instead. 4.0 */ $item->catslug = $item->catid . ':' . $item->category_alias; $item->route = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); } } return $related; } } mod_related_items/.htaccess000044400000000177152160445060012030 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_category/mod_articles_category.xml000064400000042275152160445060016207 0ustar00<?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/tmpl/default.php000064400000013114152160445060014222 0ustar00<?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/tmpl/.htaccess000044400000000177152160445060013666 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_category/helper.php000064400000034742152160445060013113 0ustar00<?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_articles_category/.htaccess000044400000000177152160445060012712 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_category/mod_articles_category.php000064400000005075152160445060016173 0ustar00<?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_tags_popular/mod_tags_popular.xml000064400000011635152160445060014175 0ustar00<?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.php000064400000001765152160445060014167 0ustar00<?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/cloud.php000064400000003164152160445060012705 0ustar00<?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_tags_popular/tmpl/default.php000064400000001731152160445060013221 0ustar00<?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/.htaccess000044400000000177152160445060012663 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_tags_popular/helper.php000064400000010236152160445060012100 0ustar00<?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/.htaccess000044400000000177152160445060011707 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_banners/mod_banners.xml000064400000007703152160445060012056 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_banners</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_BANNERS_XML_DESCRIPTION</description> <files> <filename module="mod_banners">mod_banners.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_banners.ini</language> <language tag="en-GB">en-GB.mod_banners.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_BANNERS" /> <config> <fields name="params"> <fieldset name="basic" addfieldpath="/administrator/components/com_banners/models/fields" > <field name="target" type="list" label="MOD_BANNERS_FIELD_TARGET_LABEL" description="MOD_BANNERS_FIELD_TARGET_DESC" default="1" filter="integer" > <option value="0">JBROWSERTARGET_PARENT</option> <option value="1">JBROWSERTARGET_NEW</option> <option value="2">JBROWSERTARGET_POPUP</option> </field> <field name="count" type="number" label="MOD_BANNERS_FIELD_COUNT_LABEL" description="MOD_BANNERS_FIELD_COUNT_DESC" default="5" filter="integer" class="validate-numeric" /> <field name="cid" type="bannerclient" label="MOD_BANNERS_FIELD_BANNERCLIENT_LABEL" description="MOD_BANNERS_FIELD_BANNERCLIENT_DESC" filter="integer" /> <field name="catid" type="category" label="JCATEGORY" description="MOD_BANNERS_FIELD_CATEGORY_DESC" extension="com_banners" multiple="true" filter="int_array" class="multipleCategories" /> <field name="tag_search" type="radio" label="MOD_BANNERS_FIELD_TAG_LABEL" description="MOD_BANNERS_FIELD_TAG_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="ordering" type="list" label="MOD_BANNERS_FIELD_RANDOMISE_LABEL" description="MOD_BANNERS_FIELD_RANDOMISE_DESC" default="0" > <option value="0">MOD_BANNERS_VALUE_STICKYORDERING</option> <option value="random">MOD_BANNERS_VALUE_STICKYRANDOMISE</option> </field> <field name="header_text" type="textarea" label="MOD_BANNERS_FIELD_HEADER_LABEL" description="MOD_BANNERS_FIELD_HEADER_DESC" filter="safehtml" rows="3" cols="40" /> <field name="footer_text" type="textarea" label="MOD_BANNERS_FIELD_FOOTER_LABEL" description="MOD_BANNERS_FIELD_FOOTER_DESC" filter="safehtml" rows="3" cols="40" /> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> <field name="cache" type="list" label="COM_MODULES_FIELD_CACHING_LABEL" description="COM_MODULES_FIELD_CACHING_DESC" default="1" filter="integer" > <option value="1">JGLOBAL_USE_GLOBAL</option> <option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option> </field> <field name="cache_time" type="number" label="COM_MODULES_FIELD_CACHE_TIME_LABEL" description="COM_MODULES_FIELD_CACHE_TIME_DESC" default="900" filter="integer" /> </fieldset> </fields> </config> </extension> mod_banners/mod_banners.php000064400000001503152160445060012035 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_banners * * @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 banners functions only once JLoader::register('ModBannersHelper', __DIR__ . '/helper.php'); $headerText = trim($params->get('header_text', '')); $footerText = trim($params->get('footer_text', '')); JLoader::register('BannersHelper', JPATH_ADMINISTRATOR . '/components/com_banners/helpers/banners.php'); BannersHelper::updateReset(); $list = &ModBannersHelper::getList($params); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_banners', $params->get('layout', 'default')); mod_banners/tmpl/default.php000064400000010645152160445060012155 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_banners * * @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('BannerHelper', JPATH_ROOT . '/components/com_banners/helpers/banner.php'); ?> <div class="bannergroup<?php echo $moduleclass_sfx; ?>"> <?php if ($headerText) : ?> <div class="bannerheader"> <?php echo $headerText; ?> </div> <?php endif; ?> <?php foreach ($list as $item) : ?> <div class="banneritem"> <?php $link = JRoute::_('index.php?option=com_banners&task=click&id=' . $item->id); ?> <?php if ($item->type == 1) : ?> <?php // Text based banners ?> <?php echo str_replace(array('{CLICKURL}', '{NAME}'), array($link, $item->name), $item->custombannercode); ?> <?php else : ?> <?php $imageurl = $item->params->get('imageurl'); ?> <?php $width = $item->params->get('width'); ?> <?php $height = $item->params->get('height'); ?> <?php if (BannerHelper::isImage($imageurl)) : ?> <?php // Image based banner ?> <?php $baseurl = strpos($imageurl, 'http') === 0 ? '' : JUri::base(); ?> <?php $alt = $item->params->get('alt'); ?> <?php $alt = $alt ?: $item->name; ?> <?php $alt = $alt ?: JText::_('MOD_BANNERS_BANNER'); ?> <?php if ($item->clickurl) : ?> <?php // Wrap the banner in a link ?> <?php $target = $params->get('target', 1); ?> <?php if ($target == 1) : ?> <?php // Open in a new window ?> <a href="<?php echo $link; ?>" target="_blank" rel="noopener noreferrer" title="<?php echo htmlspecialchars($item->name, ENT_QUOTES, 'UTF-8'); ?>"> <img src="<?php echo $baseurl . $imageurl; ?>" alt="<?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?>" <?php if (!empty($width)) echo ' width="' . $width . '"';?> <?php if (!empty($height)) echo ' height="' . $height . '"';?> /> </a> <?php elseif ($target == 2) : ?> <?php // Open in a popup window ?> <a href="<?php echo $link; ?>" onclick="window.open(this.href, '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false" title="<?php echo htmlspecialchars($item->name, ENT_QUOTES, 'UTF-8'); ?>"> <img src="<?php echo $baseurl . $imageurl; ?>" alt="<?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?>" <?php if (!empty($width)) echo ' width="' . $width . '"';?> <?php if (!empty($height)) echo ' height="' . $height . '"';?> /> </a> <?php else : ?> <?php // Open in parent window ?> <a href="<?php echo $link; ?>" title="<?php echo htmlspecialchars($item->name, ENT_QUOTES, 'UTF-8'); ?>"> <img src="<?php echo $baseurl . $imageurl; ?>" alt="<?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?>" <?php if (!empty($width)) echo ' width="' . $width . '"';?> <?php if (!empty($height)) echo ' height="' . $height . '"';?> /> </a> <?php endif; ?> <?php else : ?> <?php // Just display the image if no link specified ?> <img src="<?php echo $baseurl . $imageurl; ?>" alt="<?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?>" <?php if (!empty($width)) echo ' width="' . $width . '"';?> <?php if (!empty($height)) echo ' height="' . $height . '"';?> /> <?php endif; ?> <?php elseif (BannerHelper::isFlash($imageurl)) : ?> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" <?php if (!empty($width)) echo ' width="' . $width . '"';?> <?php if (!empty($height)) echo ' height="' . $height . '"';?> > <param name="movie" value="<?php echo $imageurl; ?>" /> <embed src="<?php echo $imageurl; ?>" loop="false" pluginspage="http://www.macromedia.com/go/get/flashplayer" type="application/x-shockwave-flash" <?php if (!empty($width)) echo ' width="' . $width . '"';?> <?php if (!empty($height)) echo ' height="' . $height . '"';?> /> </object> <?php endif; ?> <?php endif; ?> <div class="clr"></div> </div> <?php endforeach; ?> <?php if ($footerText) : ?> <div class="bannerfooter"> <?php echo $footerText; ?> </div> <?php endif; ?> </div> mod_banners/tmpl/.htaccess000044400000000177152160445060011613 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_banners/helper.php000064400000003237152160445060011033 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_banners * * @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; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Environment\Browser; /** * Helper for mod_banners * * @since 1.5 */ class ModBannersHelper { /** * Retrieve list of banners * * @param \Joomla\Registry\Registry &$params module parameters * * @return mixed */ public static function &getList(&$params) { JModelLegacy::addIncludePath(JPATH_ROOT . '/components/com_banners/models', 'BannersModel'); $document = JFactory::getDocument(); $app = JFactory::getApplication(); $keywords = explode(',', $document->getMetaData('keywords')); $config = ComponentHelper::getParams('com_banners'); $model = JModelLegacy::getInstance('Banners', 'BannersModel', array('ignore_request' => true)); $model->setState('filter.client_id', (int) $params->get('cid')); $model->setState('filter.category_id', $params->get('catid', array())); $model->setState('list.limit', (int) $params->get('count', 1)); $model->setState('list.start', 0); $model->setState('filter.ordering', $params->get('ordering')); $model->setState('filter.tag_search', $params->get('tag_search')); $model->setState('filter.keywords', $keywords); $model->setState('filter.language', $app->getLanguageFilter()); $banners = $model->getItems(); if ($banners) { if ($config->get('track_robots_impressions', 1) == 1 || !Browser::getInstance()->isRobot()) { $model->impress(); } } return $banners; } } mod_banners/.htaccess000044400000000177152160445060010637 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>.htaccess000044400000000177152160445060006350 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_categories/mod_articles_categories.php000064400000002275152160445060017012 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_articles_categories * * @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('ModArticlesCategoriesHelper', __DIR__ . '/helper.php'); JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php'); JLoader::register('JCategoryNode', JPATH_BASE . '/libraries/legacy/categories/categories.php'); $cacheid = md5($module->id); $cacheparams = new stdClass; $cacheparams->cachemode = 'id'; $cacheparams->class = 'ModArticlesCategoriesHelper'; $cacheparams->method = 'getList'; $cacheparams->methodparams = $params; $cacheparams->modeparams = $cacheid; $list = JModuleHelper::moduleCache($module, $params, $cacheparams); if (!empty($list)) { $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); $startLevel = reset($list)->getParent()->level; require JModuleHelper::getLayoutPath('mod_articles_categories', $params->get('layout', 'default')); } mod_articles_categories/tmpl/default_items.php000064400000003223152160445060015733 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_articles_categories * * @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; $input = JFactory::getApplication()->input; $option = $input->getCmd('option'); $view = $input->getCmd('view'); $id = $input->getInt('id'); foreach ($list as $item) : ?> <li<?php if ($id == $item->id && in_array($view, array('category', 'categories')) && $option == 'com_content') echo ' class="active"'; ?>> <?php $levelup = $item->level - $startLevel - 1; ?> <h<?php echo $params->get('item_heading') + $levelup; ?>> <a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id)); ?>"> <?php echo $item->title; ?> <?php if ($params->get('numitems')) : ?> (<?php echo $item->numitems; ?>) <?php endif; ?> </a> </h<?php echo $params->get('item_heading') + $levelup; ?>> <?php if ($params->get('show_description', 0)) : ?> <?php echo JHtml::_('content.prepare', $item->description, $item->getParams(), 'mod_articles_categories.content'); ?> <?php endif; ?> <?php if ($params->get('show_children', 0) && (($params->get('maxlevel', 0) == 0) || ($params->get('maxlevel') >= ($item->level - $startLevel))) && count($item->getChildren())) : ?> <?php echo '<ul>'; ?> <?php $temp = $list; ?> <?php $list = $item->getChildren(); ?> <?php require JModuleHelper::getLayoutPath('mod_articles_categories', $params->get('layout', 'default') . '_items'); ?> <?php $list = $temp; ?> <?php echo '</ul>'; ?> <?php endif; ?> </li> <?php endforeach; ?> mod_articles_categories/tmpl/default.php000064400000000723152160445060014534 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_articles_categories * * @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="categories-module<?php echo $moduleclass_sfx; ?> mod-list"> <?php require JModuleHelper::getLayoutPath('mod_articles_categories', $params->get('layout', 'default') . '_items'); ?> </ul> mod_articles_categories/tmpl/.htaccess000044400000000177152160445060014176 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_categories/mod_articles_categories.xml000064400000012007152160445060017015 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_articles_categories</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_CATEGORIES_XML_DESCRIPTION</description> <files> <filename module="mod_articles_categories">mod_articles_categories.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_articles_categories.ini</language> <language tag="en-GB">en-GB.mod_articles_categories.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_ARTICLES_CATEGORIES" /> <config> <fields name="params"> <fieldset name="basic" addfieldpath="/administrator/components/com_categories/models/fields" > <field name="parent" type="modal_category" label="MOD_ARTICLES_CATEGORIES_FIELD_PARENT_LABEL" description="MOD_ARTICLES_CATEGORIES_FIELD_PARENT_DESC" extension="com_content" filter="integer" published="" required="true" select="true" new="true" edit="true" clear="true" /> <field name="show_description" type="radio" label="MOD_ARTICLES_CATEGORIES_FIELD_SHOW_DESCRIPTION_LABEL" description="MOD_ARTICLES_CATEGORIES_FIELD_SHOW_DESCRIPTION_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="numitems" type="radio" label="MOD_ARTICLES_CATEGORIES_FIELD_NUMITEMS_LABEL" description="MOD_ARTICLES_CATEGORIES_FIELD_NUMITEMS_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="show_children" type="radio" label="MOD_ARTICLES_CATEGORIES_FIELD_SHOW_CHILDREN_LABEL" description="MOD_ARTICLES_CATEGORIES_FIELD_SHOW_CHILDREN_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="count" type="list" label="MOD_ARTICLES_CATEGORIES_FIELD_COUNT_LABEL" description="MOD_ARTICLES_CATEGORIES_FIELD_COUNT_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="maxlevel" type="list" label="MOD_ARTICLES_CATEGORIES_FIELD_MAXLEVEL_LABEL" description="MOD_ARTICLES_CATEGORIES_FIELD_MAXLEVEL_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> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="item_heading" type="list" label="MOD_ARTICLES_CATEGORIES_TITLE_HEADING_LABEL" description="MOD_ARTICLES_CATEGORIES_TITLE_HEADING_DESC" default="4" validate="options" > <option value="1">JH1</option> <option value="2">JH2</option> <option value="3">JH3</option> <option value="4">JH4</option> <option value="5">JH5</option> </field> <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_categories/helper.php000064400000002010152160445060013402 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_articles_categories * * @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Helper for mod_articles_categories * * @since 1.5 */ abstract class ModArticlesCategoriesHelper { /** * Get list of articles * * @param \Joomla\Registry\Registry &$params module parameters * * @return array * * @since 1.5 */ public static function getList(&$params) { $options = array(); $options['countItems'] = $params->get('numitems', 0); $categories = JCategories::getInstance('Content', $options); $category = $categories->get($params->get('parent', 'root')); if ($category !== null) { $items = $category->getChildren(); $count = $params->get('count', 0); if ($count > 0 && count($items) > $count) { $items = array_slice($items, 0, $count); } return $items; } } } mod_articles_categories/.htaccess000044400000000177152160445060013222 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_latest/tmpl/default.php000064400000001111152160445060013673 0ustar00<?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_articles_latest/tmpl/.htaccess000044400000000177152160445060013345 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_latest/helper.php000064400000007356152160445060012573 0ustar00<?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.xml000064400000007773152160445060015351 0ustar00<?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/.htaccess000044400000000177152160445060012371 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_latest/mod_articles_latest.php000064400000001170152160445060015321 0ustar00<?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_news/mod_articles_news.php000064400000001161152160445060014461 0ustar00<?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.php000064400000001305152160445060014125 0ustar00<?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/vertical.php000064400000001333152160445060013546 0ustar00<?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/tmpl/default.php000064400000000720152160445060013360 0ustar00<?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.php000064400000003055152160445060013035 0ustar00<?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/.htaccess000044400000000177152160445060013025 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_news/helper.php000064400000013424152160445060012244 0ustar00<?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_articles_news/mod_articles_news.xml000064400000016412152160445060014477 0ustar00<?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/.htaccess000044400000000177152160445060012051 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_login/mod_login.php000064400000001462152160445060011201 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_login * * @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 login functions only once JLoader::register('ModLoginHelper', __DIR__ . '/helper.php'); $params->def('greeting', 1); $type = ModLoginHelper::getType(); $return = ModLoginHelper::getReturnUrl($params, $type); $twofactormethods = JAuthenticationHelper::getTwoFactorMethods(); $user = JFactory::getUser(); $layout = $params->get('layout', 'default'); // Logged users must load the logout sublayout if (!$user->guest) { $layout .= '_logout'; } require JModuleHelper::getLayoutPath('mod_login', $layout); mod_login/mod_login.xml000064400000010021152160445060011201 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_login</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_LOGIN_XML_DESCRIPTION</description> <files> <filename module="mod_login">mod_login.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_login.ini</language> <language tag="en-GB">en-GB.mod_login.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_LOGIN" /> <config> <fields name="params"> <fieldset name="basic" addfieldpath="/administrator/components/com_menus/models/fields" > <field name="pretext" type="textarea" label="MOD_LOGIN_FIELD_PRE_TEXT_LABEL" description="MOD_LOGIN_FIELD_PRE_TEXT_DESC" filter="safehtml" cols="30" rows="5" /> <field name="posttext" type="textarea" label="MOD_LOGIN_FIELD_POST_TEXT_LABEL" description="MOD_LOGIN_FIELD_POST_TEXT_DESC" filter="safehtml" cols="30" rows="5" /> <field name="login" type="modal_menu" label="MOD_LOGIN_FIELD_LOGIN_REDIRECTURL_LABEL" description="MOD_LOGIN_FIELD_LOGIN_REDIRECTURL_DESC" disable="separator,alias,heading,url" select="true" new="true" edit="true" clear="true" > <option value="">JDEFAULT</option> </field> <field name="logout" type="modal_menu" label="MOD_LOGIN_FIELD_LOGOUT_REDIRECTURL_LABEL" description="MOD_LOGIN_FIELD_LOGOUT_REDIRECTURL_DESC" disable="separator,alias,heading,url" select="true" new="true" edit="true" clear="true" > <option value="">JDEFAULT</option> </field> <field name="greeting" type="radio" label="MOD_LOGIN_FIELD_GREETING_LABEL" description="MOD_LOGIN_FIELD_GREETING_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="name" type="list" label="MOD_LOGIN_FIELD_NAME_LABEL" description="MOD_LOGIN_FIELD_NAME_DESC" default="0" filter="integer" showon="greeting:1" > <option value="0">MOD_LOGIN_VALUE_NAME</option> <option value="1">MOD_LOGIN_VALUE_USERNAME</option> </field> <field name="profilelink" type="radio" label="MOD_LOGIN_FIELD_PROFILE_LABEL" description="MOD_LOGIN_FIELD_PROFILE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="usesecure" type="radio" label="MOD_LOGIN_FIELD_USESECURE_LABEL" description="MOD_LOGIN_FIELD_USESECURE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="usetext" type="list" label="MOD_LOGIN_FIELD_USETEXT_LABEL" description="MOD_LOGIN_FIELD_USETEXT_DESC" default="0" filter="integer" > <option value="0">MOD_LOGIN_VALUE_ICONS</option> <option value="1">MOD_LOGIN_VALUE_TEXT</option> </field> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> </fieldset> </fields> </config> </extension> mod_login/tmpl/default.php000064400000013057152160445060011635 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_login * * @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('UsersHelperRoute', JPATH_SITE . '/components/com_users/helpers/route.php'); JHtml::_('behavior.keepalive'); JHtml::_('bootstrap.tooltip'); ?> <form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure', 0)); ?>" method="post" id="login-form" class="form-inline"> <?php if ($params->get('pretext')) : ?> <div class="pretext"> <p><?php echo $params->get('pretext'); ?></p> </div> <?php endif; ?> <div class="userdata"> <div id="form-login-username" class="control-group"> <div class="controls"> <?php if (!$params->get('usetext', 0)) : ?> <div class="input-prepend"> <span class="add-on"> <span class="icon-user hasTooltip" title="<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME'); ?>"></span> <label for="modlgn-username" class="element-invisible"><?php echo JText::_('MOD_LOGIN_VALUE_USERNAME'); ?></label> </span> <input id="modlgn-username" type="text" name="username" class="input-small" tabindex="0" size="18" placeholder="<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME'); ?>" /> </div> <?php else : ?> <label for="modlgn-username"><?php echo JText::_('MOD_LOGIN_VALUE_USERNAME'); ?></label> <input id="modlgn-username" type="text" name="username" class="input-small" tabindex="0" size="18" placeholder="<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME'); ?>" /> <?php endif; ?> </div> </div> <div id="form-login-password" class="control-group"> <div class="controls"> <?php if (!$params->get('usetext', 0)) : ?> <div class="input-prepend"> <span class="add-on"> <span class="icon-lock hasTooltip" title="<?php echo JText::_('JGLOBAL_PASSWORD'); ?>"> </span> <label for="modlgn-passwd" class="element-invisible"><?php echo JText::_('JGLOBAL_PASSWORD'); ?> </label> </span> <input id="modlgn-passwd" type="password" name="password" class="input-small" tabindex="0" size="18" placeholder="<?php echo JText::_('JGLOBAL_PASSWORD'); ?>" /> </div> <?php else : ?> <label for="modlgn-passwd"><?php echo JText::_('JGLOBAL_PASSWORD'); ?></label> <input id="modlgn-passwd" type="password" name="password" class="input-small" tabindex="0" size="18" placeholder="<?php echo JText::_('JGLOBAL_PASSWORD'); ?>" /> <?php endif; ?> </div> </div> <?php if (count($twofactormethods) > 1) : ?> <div id="form-login-secretkey" class="control-group"> <div class="controls"> <?php if (!$params->get('usetext', 0)) : ?> <div class="input-prepend input-append"> <span class="add-on"> <span class="icon-star hasTooltip" title="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>"> </span> <label for="modlgn-secretkey" class="element-invisible"><?php echo JText::_('JGLOBAL_SECRETKEY'); ?> </label> </span> <input id="modlgn-secretkey" autocomplete="one-time-code" type="text" name="secretkey" class="input-small" tabindex="0" size="18" placeholder="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>" /> <span class="btn width-auto hasTooltip" title="<?php echo JText::_('JGLOBAL_SECRETKEY_HELP'); ?>"> <span class="icon-help"></span> </span> </div> <?php else : ?> <label for="modlgn-secretkey"><?php echo JText::_('JGLOBAL_SECRETKEY'); ?></label> <input id="modlgn-secretkey" autocomplete="one-time-code" type="text" name="secretkey" class="input-small" tabindex="0" size="18" placeholder="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>" /> <span class="btn width-auto hasTooltip" title="<?php echo JText::_('JGLOBAL_SECRETKEY_HELP'); ?>"> <span class="icon-help"></span> </span> <?php endif; ?> </div> </div> <?php endif; ?> <?php if (JPluginHelper::isEnabled('system', 'remember')) : ?> <div id="form-login-remember" class="control-group checkbox"> <label for="modlgn-remember" class="control-label"><?php echo JText::_('MOD_LOGIN_REMEMBER_ME'); ?></label> <input id="modlgn-remember" type="checkbox" name="remember" class="inputbox" value="yes"/> </div> <?php endif; ?> <div id="form-login-submit" class="control-group"> <div class="controls"> <button type="submit" tabindex="0" name="Submit" class="btn btn-primary login-button"><?php echo JText::_('JLOGIN'); ?></button> </div> </div> <?php $usersConfig = JComponentHelper::getParams('com_users'); ?> <ul class="unstyled"> <?php if ($usersConfig->get('allowUserRegistration')) : ?> <li> <a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>"> <?php echo JText::_('MOD_LOGIN_REGISTER'); ?> <span class="icon-arrow-right"></span></a> </li> <?php endif; ?> <li> <a href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?>"> <?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?></a> </li> <li> <a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>"> <?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?></a> </li> </ul> <input type="hidden" name="option" value="com_users" /> <input type="hidden" name="task" value="user.login" /> <input type="hidden" name="return" value="<?php echo $return; ?>" /> <?php echo JHtml::_('form.token'); ?> </div> <?php if ($params->get('posttext')) : ?> <div class="posttext"> <p><?php echo $params->get('posttext'); ?></p> </div> <?php endif; ?> </form> mod_login/tmpl/default_logout.php000064400000002654152160445060013227 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_login * * @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::_('behavior.keepalive'); ?> <form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure', 0)); ?>" method="post" id="login-form" class="form-vertical"> <?php if ($params->get('greeting', 1)) : ?> <div class="login-greeting"> <?php if (!$params->get('name', 0)) : ?> <?php echo JText::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('name'), ENT_COMPAT, 'UTF-8')); ?> <?php else : ?> <?php echo JText::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('username'), ENT_COMPAT, 'UTF-8')); ?> <?php endif; ?> </div> <?php endif; ?> <?php if ($params->get('profilelink', 0)) : ?> <ul class="unstyled"> <li> <a href="<?php echo JRoute::_('index.php?option=com_users&view=profile'); ?>"> <?php echo JText::_('MOD_LOGIN_PROFILE'); ?></a> </li> </ul> <?php endif; ?> <div class="logout-button"> <input type="submit" name="Submit" class="btn btn-primary" value="<?php echo JText::_('JLOGOUT'); ?>" /> <input type="hidden" name="option" value="com_users" /> <input type="hidden" name="task" value="user.logout" /> <input type="hidden" name="return" value="<?php echo $return; ?>" /> <?php echo JHtml::_('form.token'); ?> </div> </form> mod_login/tmpl/.htaccess000044400000000177152160445060011273 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_login/helper.php000064400000003131152160445060010504 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_login * * @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_login * * @since 1.5 */ class ModLoginHelper { /** * Retrieve the URL where the user should be returned after logging in * * @param \Joomla\Registry\Registry $params module parameters * @param string $type return type * * @return string */ public static function getReturnUrl($params, $type) { $app = JFactory::getApplication(); $item = $app->getMenu()->getItem($params->get($type)); // Stay on the same page $url = JUri::getInstance()->toString(); if ($item) { $lang = ''; if ($item->language !== '*' && JLanguageMultilang::isEnabled()) { $lang = '&lang=' . $item->language; } $url = 'index.php?Itemid=' . $item->id . $lang; } return base64_encode($url); } /** * Returns the current users type * * @return string */ public static function getType() { $user = JFactory::getUser(); return (!$user->get('guest')) ? 'logout' : 'login'; } /** * Get list of available two factor methods * * @return array * * @deprecated 4.0 Use JAuthenticationHelper::getTwoFactorMethods() instead. */ public static function getTwoFactorMethods() { JLog::add(__METHOD__ . ' is deprecated, use JAuthenticationHelper::getTwoFactorMethods() instead.', JLog::WARNING, 'deprecated'); return JAuthenticationHelper::getTwoFactorMethods(); } } mod_login/.htaccess000044400000000177152160445060010317 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_ariquizuserresult/script.php000077500000002503152160445060013252 0ustar00<?php /* * * @package ARI Quiz * @author ARI Soft * @copyright Copyright (c) 2011 www.ari-soft.com. All rights reserved * @license GNU/GPL (http://www.gnu.org/copyleft/gpl.html) * */ defined('_JEXEC') or die('Restricted access'); class mod_ariquizuserresultInstallerScript { function preflight($type, $parent) { $type = strtolower($type); if ($type == 'install' || $type == 'update') $this->updateManifest($parent); } function postflight($type, $parent) { $type = strtolower($type); if ($type == 'install' || $type == 'update') $this->deleteHelpManifest($parent); } private function updateManifest($parent) { jimport('joomla.filesystem.file'); $installer = $parent->getParent(); $manifestFile = basename($installer->getPath('manifest')); $cleanManifestFile = preg_replace('/^\_+/i', '', $manifestFile); $dir = dirname(__FILE__) . '/install/'; JFile::delete($dir . $cleanManifestFile); JFile::copy($dir . '../' . $cleanManifestFile, $dir . $cleanManifestFile); } private function deleteHelpManifest($parent) { jimport('joomla.filesystem.file'); $installer = $parent->getParent(); $manifestFile = basename($installer->getPath('manifest')); JFile::delete(JPATH_ROOT . '/modules/mod_ariquizuserresult/' . $manifestFile); } }mod_ariquizuserresult/index.html000077500000000054152160445060013231 0ustar00<html><body bgcolor="#FFFFFF"></body></html>mod_ariquizuserresult/mod_ariquizuserresult.php000077500000003025152160445060016427 0ustar00<?php defined('_JEXEC') or die('Restricted access'); $basePath = JPATH_SITE . '/components/modules/'; $adminBasePath = JPATH_SITE . '/administrator/components/com_ariquizlite/'; if (@file_exists($adminBasePath)): require_once ($adminBasePath . 'utils/constants.php'); require_once ($adminBasePath . 'kernel/class.AriKernel.php'); AriKernel::import('Controllers.ResultController'); AriKernel::import('Web.Utils.QuizWebHelper'); AriKernel::import('I18N.I18N'); $count = intval($params->get('count', 5)); if ($count < 0) $count = 5; $measureUnit = $params->get('pointUnit', 'percent'); $moduleclass_sfx = $params->get('moduleclass_sfx', ''); $label = $params->get('label', 'My Last Results'); $user =& JFactory::getUser(); $userId = $user->get('id'); $resultController = new AriQuizResultController(); $results = $resultController->call('getLastUserResults', $userId, $count); ?> <?php if (!empty($results)) { ?> <table style="width: 100%; font-size: 100%;" class="aqmodtable<?php echo $moduleclass_sfx; ?>"> <tr> <th colspan="2"><?php echo $label; ?></th> </tr> <?php foreach ($results as $result) { ?> <tr> <td class="aqmodquiz<?php echo $moduleclass_sfx; ?>"><?php AriQuizWebHelper::displayDbValue($result->QuizName); ?></td> <td class="aqmodpoint<?php echo $moduleclass_sfx; ?>" style="width: 1%; white-space: nowrap;"><?php echo $measureUnit == 'point' ? $result->UserScore : sprintf('%.2f %%', $result->PercentScore); ?></td> </tr> <?php } ?> </table> <?php } endif; ?>mod_ariquizuserresult/mod_ariquizuserresult.xml000077500000003154152160445060016443 0ustar00<?xml version="1.0" encoding="UTF-8"?> <extension version="1.6.0" type="module" method="upgrade" client="site"> <name>ARI Quiz user results</name> <creationDate>October 2012</creationDate> <author>ARI Soft</author> <authorEmail>info@ari-soft.com</authorEmail> <authorUrl>www.ari-soft.com</authorUrl> <version>1.2.0</version> <description>Shows last quizzes results for logged user</description> <files> <filename module="mod_ariquizuserresult">mod_ariquizuserresult.php</filename> <filename>mod_ariquizuserresult.xml</filename> <filename>index.html</filename> </files> <config> <fields name="params"> <fieldset name="basic"> <field name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="A suffix to be applied to the css class of the module (table.moduletable), this allows individual module styling" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="label" type="text" default="My Last Results" label="Label" description="Header text" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="count" type="text" default="5" label="Count" description="The number of items to display (default 5)" /> <field name="@spacer" type="spacer" default="" label="" description="" /> <field name="pointUnit" type="list" default="percent" label="Result measure unit" description="Result measure unit (default percent)"> <option value="percent">Percent</option> <option value="point">Point</option> </field> </fieldset> </fields> </config> </extension>mod_ariquizuserresult/.htaccess000044400000000177152160445060013031 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_popular/mod_articles_popular.php000064400000001162152160445060015676 0ustar00<?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/tmpl/default.php000064400000001110152160445060014060 0ustar00<?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/tmpl/.htaccess000044400000000177152160445060013533 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_popular/helper.php000064400000006102152160445060012745 0ustar00<?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.xml000064400000011031152160445060015703 0ustar00<?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_popular/.htaccess000044400000000177152160445060012557 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_finder/mod_finder.php000064400000003413152160445060011475 0ustar00<?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_finder/tmpl/default.php000064400000011040152160445060011762 0ustar00<?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/helper.php000064400000004533152160445060010652 0ustar00<?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/mod_finder.xml000064400000012277152160445060011516 0ustar00<?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/.htaccess000044400000000177152160445060010456 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_archive/mod_articles_archive.php000064400000001210152160445060015566 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_articles_archive * * @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 archive functions only once JLoader::register('ModArchiveHelper', __DIR__ . '/helper.php'); $params->def('count', 10); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); $list = ModArchiveHelper::getList($params); require JModuleHelper::getLayoutPath('mod_articles_archive', $params->get('layout', 'default')); mod_articles_archive/mod_articles_archive.xml000064400000004402152160445060015605 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_articles_archive</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_ARCHIVE_XML_DESCRIPTION</description> <files> <filename module="mod_articles_archive">mod_articles_archive.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_articles_archive.ini</language> <language tag="en-GB">en-GB.mod_articles_archive.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_ARTICLES_ARCHIVE" /> <config> <fields name="params"> <fieldset name="basic"> <field name="count" type="number" label="MOD_ARTICLES_ARCHIVE_FIELD_COUNT_LABEL" description="MOD_ARTICLES_ARCHIVE_FIELD_COUNT_DESC" default="10" filter="integer" /> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> <field name="cache" type="list" label="COM_MODULES_FIELD_CACHING_LABEL" description="COM_MODULES_FIELD_CACHING_DESC" default="1" filter="integer" > <option value="1">JGLOBAL_USE_GLOBAL</option> <option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option> </field> <field name="cache_time" type="number" label="COM_MODULES_FIELD_CACHE_TIME_LABEL" description="COM_MODULES_FIELD_CACHE_TIME_DESC" default="900" filter="integer" /> <field name="cachemode" type="hidden" default="static" > <option value="static"></option> </field> </fieldset> </fields> </config> </extension> mod_articles_archive/tmpl/default.php000064400000001031152160445060014021 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_articles_archive * * @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; ?> <?php if (!empty($list)) : ?> <ul class="archive-module<?php echo $moduleclass_sfx; ?> mod-list"> <?php foreach ($list as $item) : ?> <li> <a href="<?php echo $item->link; ?>"> <?php echo $item->text; ?> </a> </li> <?php endforeach; ?> </ul> <?php endif; ?> mod_articles_archive/tmpl/.htaccess000044400000000177152160445060013472 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_articles_archive/helper.php000064400000004625152160445060012714 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_articles_archive * * @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_articles_archive * * @since 1.5 */ class ModArchiveHelper { /** * Retrieve list of archived articles * * @param \Joomla\Registry\Registry &$params module parameters * * @return array * * @since 1.5 */ public static function getList(&$params) { // Get database $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($query->month($db->quoteName('created')) . ' AS created_month') ->select('MIN(' . $db->quoteName('created') . ') AS created') ->select($query->year($db->quoteName('created')) . ' AS created_year') ->from('#__content') ->where('state = 2') ->group($query->year($db->quoteName('created')) . ', ' . $query->month($db->quoteName('created'))) ->order($query->year($db->quoteName('created')) . ' DESC, ' . $query->month($db->quoteName('created')) . ' DESC'); // Filter by language if (JFactory::getApplication()->getLanguageFilter()) { $query->where('language in (' . $db->quote(JFactory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')'); } $db->setQuery($query, 0, (int) $params->get('count')); try { $rows = (array) $db->loadObjectList(); } catch (RuntimeException $e) { JFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); return array(); } $app = JFactory::getApplication(); $menu = $app->getMenu(); $item = $menu->getItems('link', 'index.php?option=com_content&view=archive', true); $itemid = (isset($item) && !empty($item->id)) ? '&Itemid=' . $item->id : ''; $i = 0; $lists = array(); foreach ($rows as $row) { $date = JFactory::getDate($row->created); $createdMonth = $date->format('n'); $createdYear = $date->format('Y'); $createdYearCal = JHtml::_('date', $row->created, 'Y'); $monthNameCal = JHtml::_('date', $row->created, 'F'); $lists[$i] = new stdClass; $lists[$i]->link = JRoute::_('index.php?option=com_content&view=archive&year=' . $createdYear . '&month=' . $createdMonth . $itemid); $lists[$i]->text = JText::sprintf('MOD_ARTICLES_ARCHIVE_DATE', $monthNameCal, $createdYearCal); $i++; } return $lists; } } mod_articles_archive/.htaccess000044400000000177152160445060012516 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_stats/mod_stats.xml000064400000006155152160445060011272 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_stats</name> <author>Joomla! Project</author> <creationDate>July 2004</creationDate> <copyright>(C) 2005 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>MOD_STATS_XML_DESCRIPTION</description> <files> <filename module="mod_stats">mod_stats.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_stats.ini</language> <language tag="en-GB">en-GB.mod_stats.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_STATISTICS" /> <config> <fields name="params"> <fieldset name="basic"> <field name="serverinfo" type="radio" label="MOD_STATS_FIELD_SERVERINFO_LABEL" description="MOD_STATS_FIELD_SERVERINFO_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="siteinfo" type="radio" label="MOD_STATS_FIELD_SITEINFO_LABEL" description="MOD_STATS_FIELD_SITEINFO_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="counter" type="radio" label="MOD_STATS_FIELD_COUNTER_LABEL" description="MOD_STATS_FIELD_COUNTER_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="increase" type="number" label="MOD_STATS_FIELD_INCREASECOUNTER_LABEL" description="MOD_STATS_FIELD_INCREASECOUNTER_DESC" default="0" filter="integer" /> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" /> <field name="cache" type="list" label="COM_MODULES_FIELD_CACHING_LABEL" description="COM_MODULES_FIELD_CACHING_DESC" default="1" filter="integer" > <option value="1">JGLOBAL_USE_GLOBAL</option> <option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option> </field> <field name="cache_time" type="number" label="COM_MODULES_FIELD_CACHE_TIME_LABEL" description="COM_MODULES_FIELD_CACHE_TIME_DESC" default="900" filter="integer" /> <field name="cachemode" type="hidden" default="static" > <option value="static"></option> </field> </fieldset> </fields> </config> </extension> mod_stats/tmpl/default.php000064400000000703152160445060011655 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_stats * * @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; ?> <dl class="stats-module<?php echo $moduleclass_sfx; ?>"> <?php foreach ($list as $item) : ?> <dt><?php echo $item->title; ?></dt> <dd><?php echo $item->data; ?></dd> <?php endforeach; ?> </dl> mod_stats/tmpl/.htaccess000044400000000177152160445060011321 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_stats/helper.php000064400000006770152160445060010546 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_stats * * @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_stats * * @since 1.5 */ class ModStatsHelper { /** * Get list of stats * * @param \Joomla\Registry\Registry &$params module parameters * * @return array */ public static function &getList(&$params) { $app = JFactory::getApplication(); $db = JFactory::getDbo(); $rows = array(); $query = $db->getQuery(true); $serverinfo = $params->get('serverinfo', 0); $siteinfo = $params->get('siteinfo', 0); $counter = $params->get('counter', 0); $increase = $params->get('increase', 0); $i = 0; if ($serverinfo) { $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_OS'); $rows[$i]->data = substr(php_uname(), 0, 7); $i++; $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_PHP'); $rows[$i]->data = phpversion(); $i++; $rows[$i] = new stdClass; $rows[$i]->title = JText::_($db->name); $rows[$i]->data = $db->getVersion(); $i++; $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_TIME'); $rows[$i]->data = JHtml::_('date', 'now', 'H:i'); $i++; $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_CACHING'); $rows[$i]->data = $app->get('caching') ? JText::_('JENABLED') : JText::_('JDISABLED'); $i++; $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_GZIP'); $rows[$i]->data = $app->get('gzip') ? JText::_('JENABLED') : JText::_('JDISABLED'); $i++; } if ($siteinfo) { $query->select('COUNT(id) AS count_users') ->from('#__users'); $db->setQuery($query); try { $users = $db->loadResult(); } catch (RuntimeException $e) { $users = false; } $query->clear() ->select('COUNT(id) AS count_items') ->from('#__content') ->where('state = 1'); $db->setQuery($query); try { $items = $db->loadResult(); } catch (RuntimeException $e) { $items = false; } if ($users) { $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_USERS'); $rows[$i]->data = $users; $i++; } if ($items) { $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_ARTICLES'); $rows[$i]->data = $items; $i++; } } if ($counter) { $query->clear() ->select('SUM(hits) AS count_hits') ->from('#__content') ->where('state = 1'); $db->setQuery($query); try { $hits = $db->loadResult(); } catch (RuntimeException $e) { $hits = false; } if ($hits) { $rows[$i] = new stdClass; $rows[$i]->title = JText::_('MOD_STATS_ARTICLES_VIEW_HITS'); $rows[$i]->data = $hits + $increase; $i++; } } // Include additional data defined by published system plugins JPluginHelper::importPlugin('system'); $arrays = (array) $app->triggerEvent('onGetStats', array('mod_stats')); foreach ($arrays as $response) { foreach ($response as $row) { // We only add a row if the title and data are given if (isset($row['title']) && isset($row['data'])) { $rows[$i] = new stdClass; $rows[$i]->title = $row['title']; $rows[$i]->icon = isset($row['icon']) ? $row['icon'] : 'info'; $rows[$i]->data = $row['data']; $i++; } } } return $rows; } } mod_stats/.htaccess000044400000000177152160445060010345 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_stats/mod_stats.php000064400000001270152160445060011252 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_stats * * @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 statistics functions only once JLoader::register('ModStatsHelper', __DIR__ . '/helper.php'); $serverinfo = $params->get('serverinfo', 0); $siteinfo = $params->get('siteinfo', 0); $list = ModStatsHelper::getList($params); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_stats', $params->get('layout', 'default')); mod_whosonline/tmpl/default.php000064400000001645152160445060012712 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_whosonline * * @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; ?> <?php if ($showmode == 0 || $showmode == 2) : ?> <?php $guest = JText::plural('MOD_WHOSONLINE_GUESTS', $count['guest']); ?> <?php $member = JText::plural('MOD_WHOSONLINE_MEMBERS', $count['user']); ?> <p><?php echo JText::sprintf('MOD_WHOSONLINE_WE_HAVE', $guest, $member); ?></p> <?php endif; ?> <?php if (($showmode > 0) && count($names)) : ?> <?php if ($params->get('filter_groups', 0)) : ?> <p><?php echo JText::_('MOD_WHOSONLINE_SAME_GROUP_MESSAGE'); ?></p> <?php endif; ?> <ul class="whosonline<?php echo $moduleclass_sfx; ?>"> <?php foreach ($names as $name) : ?> <li> <?php echo $name->username; ?> </li> <?php endforeach; ?> </ul> <?php endif; mod_whosonline/tmpl/.htaccess000044400000000177152160445060012350 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_whosonline/helper.php000064400000005176152160445060011574 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_whosonline * * @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_whosonline * * @since 1.5 */ class ModWhosonlineHelper { /** * Show online count * * @return array The number of Users and Guests online. * * @since 1.5 **/ public static function getOnlineCount() { $db = JFactory::getDbo(); // Calculate number of guests and users $result = array(); $user_array = 0; $guest_array = 0; $whereCondition = JFactory::getConfig()->get('shared_session', '0') ? 'IS NULL' : '= 0'; $query = $db->getQuery(true) ->select('guest, client_id') ->from('#__session') ->where('client_id ' . $whereCondition); $db->setQuery($query); try { $sessions = (array) $db->loadObjectList(); } catch (RuntimeException $e) { $sessions = array(); } if (count($sessions)) { foreach ($sessions as $session) { // If guest increase guest count by 1 if ($session->guest == 1) { $guest_array ++; } // If member increase member count by 1 if ($session->guest == 0) { $user_array ++; } } } $result['user'] = $user_array; $result['guest'] = $guest_array; return $result; } /** * Show online member names * * @param mixed $params The parameters * * @return array (array) $db->loadObjectList() The names of the online users. * * @since 1.5 **/ public static function getOnlineUserNames($params) { $whereCondition = JFactory::getConfig()->get('shared_session', '0') ? 'IS NULL' : '= 0'; $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName(array('a.username', 'a.userid', 'a.client_id'))) ->from('#__session AS a') ->where($db->quoteName('a.userid') . ' != 0') ->where($db->quoteName('a.client_id') . ' ' . $whereCondition) ->group($db->quoteName(array('a.username', 'a.userid', 'a.client_id'))); $user = JFactory::getUser(); if (!$user->authorise('core.admin') && $params->get('filter_groups', 0) == 1) { $groups = $user->getAuthorisedGroups(); if (empty($groups)) { return array(); } $query->join('LEFT', '#__user_usergroup_map AS m ON m.user_id = a.userid') ->join('LEFT', '#__usergroups AS ug ON ug.id = m.group_id') ->where('ug.id in (' . implode(',', $groups) . ')') ->where('ug.id <> 1'); } $db->setQuery($query); try { return (array) $db->loadObjectList(); } catch (RuntimeException $e) { return array(); } } } mod_whosonline/mod_whosonline.php000064400000001412152160445060013326 0ustar00<?php /** * @package Joomla.Site * @subpackage mod_whosonline * * @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 whosonline functions only once JLoader::register('ModWhosonlineHelper', __DIR__ . '/helper.php'); $showmode = $params->get('showmode', 0); if ($showmode == 0 || $showmode == 2) { $count = ModWhosonlineHelper::getOnlineCount(); } if ($showmode > 0) { $names = ModWhosonlineHelper::getOnlineUserNames($params); } $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_whosonline', $params->get('layout', 'default')); mod_whosonline/.htaccess000044400000000177152160445060011374 0ustar00<FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>mod_whosonline/mod_whosonline.xml000064400000005061152160445060013343 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension type="module" version="3.1" client="site" method="upgrade"> <name>mod_whosonline</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_WHOSONLINE_XML_DESCRIPTION</description> <files> <filename module="mod_whosonline">mod_whosonline.php</filename> <folder>tmpl</folder> <filename>helper.php</filename> </files> <languages> <language tag="en-GB">en-GB.mod_whosonline.ini</language> <language tag="en-GB">en-GB.mod_whosonline.sys.ini</language> </languages> <help key="JHELP_EXTENSIONS_MODULE_MANAGER_WHO_ONLINE" /> <config> <fields name="params"> <fieldset name="basic"> <field name="showmode" type="list" label="MOD_WHOSONLINE_SHOWMODE_LABEL" description="MOD_WHOSONLINE_SHOWMODE_DESC" default="0" filter="integer" > <option value="0">MOD_WHOSONLINE_FIELD_VALUE_NUMBER</option> <option value="1">MOD_WHOSONLINE_FIELD_VALUE_NAMES</option> <option value="2">MOD_WHOSONLINE_FIELD_VALUE_BOTH</option> </field> <field name="filter_groups" type="radio" label="MOD_WHOSONLINE_FIELD_FILTER_GROUPS_LABEL" description="MOD_WHOSONLINE_FIELD_FILTER_GROUPS_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="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="0" filter="integer" > <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>
/var/www/consult-e-syn/public_html/./00a80/modules.tar