mod_atstickets/script.php000077500000000720152160445060011605 0ustar00
get('show_open', 1)): ?>
get('show_pending', 1)): ?>
get('show_closed', 1)): ?>
get('show_mytickets', 1)): ?>
mod_atstickets/tmpl/.htaccess000044400000000177152160445060012341 0ustar00 Order allow,deny Deny from all mod_atstickets/web.config000077500000001025152160445060011533 0ustar00 mod_atstickets/.htaccess000044400000000177152160445060011365 0ustar00 Order allow,deny Deny from all mod_atstickets/mod_atstickets.php000077500000002133152160445060013316 0ustar00guest) { 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 MOD_ATSTICKETS Nicholas K. Dionysopoulos 2023-07-26 Copyright (c)2011-2021 Nicholas K. Dionysopoulos / Akeeba Ltd GNU GPL v3 or later nicholas@akeeba.com www.akeeba.com 4.0.9.2 MOD_ATSTICKETS_DESCRIPTION mod_atstickets.php .htaccess web.config tmpl en-GB/en-GB.mod_atstickets.ini en-GB/en-GB.mod_atstickets.sys.ini
script.php
mod_ariquiztopresult/script.php000077500000002501152160445060013074 0ustar00updateManifest($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 0ustar00mod_ariquiztopresult/mod_ariquiztopresult.xml000077500000003123152160445060016107 0ustar00 ARI Quiz top results October 2011 ARI Soft info@ari-soft.com www.ari-soft.com 1.2.0 Shows top quizzes results mod_ariquiztopresult.php mod_ariquiztopresult.xml index.html
mod_ariquiztopresult/.htaccess000044400000000177152160445060012655 0ustar00 Order allow,deny Deny from all mod_ariquiztopresult/mod_ariquiztopresult.php000077500000003102152160445060016073 0ustar00get('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); ?>
QuizName); ?> UserName); ?> UserScore : sprintf('%.2f %%', $result->PercentScore); ?>
mod_footer/mod_footer.php000064400000001734152160445060011557 0ustar00 * @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 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
mod_footer/tmpl/.htaccess000044400000000177152160445060011461 0ustar00 Order allow,deny Deny from all mod_footer/mod_footer.xml000064400000003643152160445060011571 0ustar00 mod_footer Joomla! Project July 2006 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_FOOTER_XML_DESCRIPTION mod_footer.php tmpl en-GB.mod_footer.ini en-GB.mod_footer.sys.ini
mod_footer/.htaccess000044400000000177152160445060010505 0ustar00 Order allow,deny Deny from all mod_tags_similar/mod_tags_similar.xml000064400000005663152160445060014135 0ustar00 mod_tags_similar Joomla! Project January 2013 (C) 2013 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.1.0 MOD_TAGS_SIMILAR_XML_DESCRIPTION mod_tags_similar.php tmpl helper.php en-GB.mod_tags_similar.ini en-GB.mod_tags_similar.sys.ini
mod_tags_similar/tmpl/default.php000064400000002035152160445060013175 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
mod_tags_similar/tmpl/.htaccess000044400000000177152160445060012641 0ustar00 Order allow,deny Deny from all mod_tags_similar/mod_tags_similar.php000064400000001634152160445060014116 0ustar00 * @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 * @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 Order allow,deny Deny from all mod_ariquizusertopresult/script.php000077500000002511152160445060013774 0ustar00updateManifest($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 0ustar00mod_ariquizusertopresult/.htaccess000044400000000177152160445060013554 0ustar00 Order allow,deny Deny from all mod_ariquizusertopresult/mod_ariquizusertopresult.php000077500000003023152160445060017673 0ustar00get('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); ?>
QuizName); ?> UserScore : sprintf('%.2f %%', $result->PercentScore); ?>
mod_ariquizusertopresult/mod_ariquizusertopresult.xml000077500000003163152160445060017711 0ustar00 ARI Quiz user results October 2012 ARI Soft info@ari-soft.com www.ari-soft.com 1.2.0 Shows top quizzes results for logged user mod_ariquizusertopresult.php mod_ariquizusertopresult.xml index.html
mod_breadcrumbs/mod_breadcrumbs.php000064400000001375152160445060013546 0ustar00 * @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 mod_breadcrumbs Joomla! Project July 2006 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_BREADCRUMBS_XML_DESCRIPTION mod_breadcrumbs.php tmpl helper.php en-GB.mod_breadcrumbs.ini en-GB.mod_breadcrumbs.sys.ini
mod_breadcrumbs/tmpl/default.php000064400000004534152160445060013016 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
mod_breadcrumbs/tmpl/.htaccess000044400000000177152160445060012454 0ustar00 Order allow,deny Deny from all mod_breadcrumbs/helper.php000064400000004625152160445060011676 0ustar00 * @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 Order allow,deny Deny from all mod_atscredits/script.php000077500000000720152160445060011574 0ustar00get('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 0ustar00guest) { // 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); } ?>
mod_atscredits/tmpl/default_credits.php000077500000001552152160445060014411 0ustar00guest) { // 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); } ?>
mod_atscredits/tmpl/default.php000077500000000714152160445060012673 0ustar00 mod_atscredits/tmpl/.htaccess000044400000000177152160445060012330 0ustar00 Order allow,deny Deny from all mod_atscredits/mod_atscredits.xml000077500000005504152160445060013312 0ustar00 MOD_ATSCREDITS Nicholas K. Dionysopoulos 2023-07-26 Copyright (c)2011-2021 Nicholas K. Dionysopoulos / Akeeba Ltd GNU GPL v3 or later nicholas@akeeba.com www.akeeba.com 4.0.9.2 MOD_ATSCREDITS_DESCRIPTION tmpl mod_atscredits.php .htaccess web.config en-GB/en-GB.mod_atscredits.ini en-GB/en-GB.mod_atscredits.sys.ini
script.php
mod_atscredits/web.config000077500000001025152160445060011522 0ustar00 mod_atscredits/.htaccess000044400000000177152160445060011354 0ustar00 Order allow,deny Deny from all mod_wrapper/mod_wrapper.php000064400000002311152160445060012113 0ustar00 * @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 mod_wrapper Joomla! Project October 2004 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_WRAPPER_XML_DESCRIPTION mod_wrapper.php tmpl helper.php en-GB.mod_wrapper.ini en-GB.mod_wrapper.sys.ini
mod_wrapper/tmpl/default.php000064400000001405152160445060012177 0ustar00 * @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)); ?> mod_wrapper/tmpl/.htaccess000044400000000177152160445060011643 0ustar00 Order allow,deny Deny from all mod_wrapper/helper.php000064400000002604152160445060011060 0ustar00 * @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 Order allow,deny Deny from all index.html000064400000000037152160445060006544 0ustar00 mod_rscontact/index.html000077500000000000152160445060011376 0ustar00mod_rscontact/tmpl/default_custom.php000077500000002274152160445060014123 0ustar00
/> mod_rscontact/tmpl/default_custom_select.php000077500000002427152160445060015462 0ustar00
mod_rscontact/tmpl/index.html000077500000000040152160445060012356 0ustar00 mod_rscontact/tmpl/default.php000077500000057734152160445060012544 0ustar00
>
/>
/>
/>
/>
/>
/>
/>
$stateText) { $data_state[] = HTMLHelper::_('select.option', $stateCode, $stateText); } ?>
/>
/>
/>
/>
/>
/>
/> $class), 'value', 'text', null, 'mod-rscontact-subject-'.$uniqid); } else { ?>
mod_rscontact/tmpl/default_custom_radio.php000077500000002562152160445060015301 0ustar00
mod_rscontact/tmpl/.htaccess000044400000000177152160445060012163 0ustar00 Order allow,deny Deny from all mod_rscontact/tmpl/default_custom_checkbox.php000077500000002557152160445060015775 0ustar00
mod_rscontact/tmpl/default_custom_textarea.php000077500000000565152160445060016021 0ustar00 mod_rscontact/mod_rscontact.php000077500000007270152160445060012771 0ustar00get('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 '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', ''.$params->get('mail_to').'
'); $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 0ustar00isCompatible($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(); ?>

RSContact! v2.0.3 Changelog

Start using RSContact! Read the RSContact! User Guide Get Support!
RSContact! RSJoomla! January 2015 Copyright (C) 2015 - 2023 GNU General Public License version 2 or later supporttickets@rsjoomla.com www.rsjoomla.com 2.0.3 MOD_RSCONTACT_DESC script.rscontact.php https://www.rsjoomla.com/updates/free/mod_rscontact/mod_rscontact.xml mod_rscontact.php helper.php index.html tmpl css images js index.html language/en-GB/en-GB.mod_rscontact.ini language/en-GB/en-GB.mod_rscontact.sys.ini
mod_rscontact/.htaccess000044400000000177152160445060011207 0ustar00 Order allow,deny Deny from all mod_ariquizresult/script.php000077500000002473152160445060012361 0ustar00updateManifest($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 0ustar00mod_ariquizresult/mod_ariquizresult.xml000077500000003110152160445060014635 0ustar00 ARI Quiz results October 2011 ARI Soft info@ari-soft.com www.ari-soft.com 1.2.0 Shows last quizzes results mod_ariquizresult.php mod_ariquizresult.xml index.xml
mod_ariquizresult/mod_ariquizresult.php000077500000003104152160445060014627 0ustar00get('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); ?>
QuizName); ?> UserName); ?> UserScore : sprintf('%.2f %%', $result->PercentScore); ?>
mod_ariquizresult/.htaccess000044400000000177152160445060012132 0ustar00 Order allow,deny Deny from all mod_random_image/mod_random_image.xml000064400000004401152160445060014032 0ustar00 mod_random_image Joomla! Project July 2006 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_RANDOM_IMAGE_XML_DESCRIPTION mod_random_image.php tmpl helper.php en-GB.mod_random_image.ini en-GB.mod_random_image.sys.ini
mod_random_image/mod_random_image.php000064400000001546152160445060014030 0ustar00 * @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 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
folder . '/' . htmlspecialchars($image->name, ENT_COMPAT, 'UTF-8'), htmlspecialchars($image->name, ENT_COMPAT, 'UTF-8'), array('width' => $image->width, 'height' => $image->height)); ?>
mod_random_image/tmpl/.htaccess000044400000000177152160445060012605 0ustar00 Order allow,deny Deny from all mod_random_image/helper.php000064400000005706152160445060012030 0ustar00 * @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 Order allow,deny Deny from all mod_search/mod_search.php000064400000003672152160445060011500 0ustar00 * @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 * @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 = ''; } ?>
mod_search/tmpl/.htaccess000044400000000177152160445060011430 0ustar00 Order allow,deny Deny from all mod_search/helper.php000064400000001074152160445060010645 0ustar00 * @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 mod_search Joomla! Project July 2004 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_SEARCH_XML_DESCRIPTION mod_search.php tmpl helper.php en-GB.mod_search.ini en-GB.mod_search.sys.ini
mod_search/.htaccess000044400000000177152160445060010454 0ustar00 Order allow,deny Deny from all mod_custom/mod_custom.xml000064400000005020152160445060011610 0ustar00 mod_custom Joomla! Project July 2004 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_CUSTOM_XML_DESCRIPTION mod_custom.php tmpl en-GB.mod_custom.ini en-GB.mod_custom.sys.ini
mod_custom/mod_custom.php000064400000001151152160445060011600 0ustar00 * @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 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
get('backgroundimage')) : ?> style="background-image:url(get('backgroundimage'); ?>)" > content; ?>
mod_custom/tmpl/.htaccess000044400000000177152160445060011475 0ustar00 Order allow,deny Deny from all mod_custom/.htaccess000044400000000177152160445060010521 0ustar00 Order allow,deny Deny from all mod_syndicate/tmpl/default.php000064400000001275152160445060012507 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> get('display_text', 1)) : ?> mod_syndicate/tmpl/.htaccess000044400000000177152160445060012146 0ustar00 Order allow,deny Deny from all mod_syndicate/mod_syndicate.php000064400000001361152160445060012725 0ustar00 * @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 mod_syndicate Joomla! Project May 2006 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_SYNDICATE_XML_DESCRIPTION mod_syndicate.php tmpl helper.php en-GB.mod_syndicate.ini en-GB.mod_syndicate.sys.ini
mod_syndicate/helper.php000064400000001500152160445060011355 0ustar00 * @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 Order allow,deny Deny from all mod_feed/mod_feed.php000064400000001431152160445060010563 0ustar00 * @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 '
'; echo JText::_('MOD_FEED_ERR_NO_URL'); echo '
'; 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 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> 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) { ?>
title !== null && $params->get('rsstitle', 1)) { ?>

title; ?>

get('rssdate', 1)) : ?>

publishedDate, JText::_('DATE_FORMAT_LC3')); ?>

get('rssdesc', 1)) { ?> description; ?> image && $params->get('rssimage', 1)) : ?> <?php echo $feed->image->title; ?>
Order allow,deny Deny from all mod_feed/mod_feed.xml000064400000011065152160445060010600 0ustar00 mod_feed Joomla! Project July 2005 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_FEED_XML_DESCRIPTION mod_feed.php tmpl helper.php en-GB.mod_feed.ini en-GB.mod_feed.sys.ini
mod_feed/helper.php000064400000001611152160445060010300 0ustar00 * @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 Order allow,deny Deny from all mod_users_latest/mod_users_latest.php000064400000001237152160445060014213 0ustar00 * @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 mod_users_latest Joomla! Project December 2009 (C) 2009 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_USERS_LATEST_XML_DESCRIPTION mod_users_latest.php tmpl helper.php en-GB.mod_users_latest.ini en-GB.mod_users_latest.sys.ini
mod_users_latest/tmpl/default.php000064400000000755152160445060013243 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> mod_users_latest/tmpl/.htaccess000044400000000177152160445060012700 0ustar00 Order allow,deny Deny from all mod_users_latest/helper.php000064400000002763152160445060012123 0ustar00 * @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 Order allow,deny Deny from all mod_languages/mod_languages.php000064400000001305152160445060012671 0ustar00 * @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 mod_languages Joomla! Project February 2010 (C) 2010 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.5.0 MOD_LANGUAGES_XML_DESCRIPTION mod_languages.php tmpl helper.php en-GB.mod_languages.ini en-GB.mod_languages.sys.ini
mod_languages/tmpl/default.php000064400000011345152160445060012471 0ustar00 * @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'); } ?>

get('dropdown', 0) && !$params->get('dropdownimage', 1)) : ?>
get('dropdown', 0) && $params->get('dropdownimage', 1)) : ?>
active) : ?> image) : ?>  image . '.gif', '', null, true); ?> title_native; ?>

mod_languages/tmpl/.htaccess000044400000000177152160445060012131 0ustar00 Order allow,deny Deny from all mod_languages/helper.php000064400000007731152160445060011354 0ustar00 * @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 Order allow,deny Deny from all mod_menu/mod_menu.php000064400000001542152160445060010670 0ustar00 * @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 * @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 .= '' . $item->title . ''; } } ?> > mod_menu/tmpl/default_component.php000064400000002504152160445060013546 0ustar00 * @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 .= '' . $item->title . ''; } } 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 * @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 ?> mod_menu/tmpl/default_url.php000064400000002742152160445060012352 0ustar00 * @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 .= '' . $item->title . ''; } } 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 Order allow,deny Deny from all mod_menu/tmpl/default_separator.php000064400000001615152160445060013546 0ustar00 * @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 .= '' . $item->title . ''; } } ?> > mod_menu/helper.php000064400000014531152160445060010346 0ustar00 * @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 mod_menu Joomla! Project July 2004 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_MENU_XML_DESCRIPTION mod_menu.php tmpl helper.php en-GB.mod_menu.ini en-GB.mod_menu.sys.ini
mod_menu/.htaccess000044400000000177152160445060010153 0ustar00 Order allow,deny Deny from all mod_related_items/mod_related_items.php000064400000001717152160445060014426 0ustar00 * @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 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> mod_related_items/tmpl/.htaccess000044400000000177152160445060013004 0ustar00 Order allow,deny Deny from all mod_related_items/mod_related_items.xml000064400000004621152160445060014434 0ustar00 mod_related_items Joomla! Project July 2004 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_RELATED_XML_DESCRIPTION mod_related_items.php tmpl helper.php en-GB.mod_related_items.ini en-GB.mod_related_items.sys.ini
mod_related_items/helper.php000064400000010267152160445060012225 0ustar00 * @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 Order allow,deny Deny from all mod_articles_category/mod_articles_category.xml000064400000042275152160445060016207 0ustar00 mod_articles_category Joomla! Project February 2010 (C) 2010 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_ARTICLES_CATEGORY_XML_DESCRIPTION mod_articles_category.php tmpl helper.php en-GB.mod_articles_category.ini en-GB.mod_articles_category.sys.ini
mod_articles_category/tmpl/default.php000064400000013114152160445060014222 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> mod_articles_category/tmpl/.htaccess000044400000000177152160445060013666 0ustar00 Order allow,deny Deny from all mod_articles_category/helper.php000064400000034742152160445060013113 0ustar00 * @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 ? '' . $item->category_title . '' : ''; } 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('

','

'), ' ', $introtext); $introtext = strip_tags($introtext, ''); $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 Order allow,deny Deny from all mod_articles_category/mod_articles_category.php000064400000005075152160445060016173 0ustar00 * @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 mod_tags_popular Joomla! Project January 2013 (C) 2013 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.1.0 MOD_TAGS_POPULAR_XML_DESCRIPTION mod_tags_popular.php tmpl helper.php en-GB.mod_tags_popular.ini en-GB.mod_tags_popular.sys.ini
mod_tags_popular/mod_tags_popular.php000064400000001765152160445060014167 0ustar00 * @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 * @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'); ?>
mod_tags_popular/tmpl/default.php000064400000001731152160445060013221 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> mod_tags_popular/tmpl/.htaccess000044400000000177152160445060012663 0ustar00 Order allow,deny Deny from all mod_tags_popular/helper.php000064400000010236152160445060012100 0ustar00 * @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 Order allow,deny Deny from all mod_banners/mod_banners.xml000064400000007703152160445060012056 0ustar00 mod_banners Joomla! Project July 2006 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_BANNERS_XML_DESCRIPTION mod_banners.php tmpl helper.php en-GB.mod_banners.ini en-GB.mod_banners.sys.ini
mod_banners/mod_banners.php000064400000001503152160445060012035 0ustar00 * @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 * @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'); ?>
id); ?> type == 1) : ?> name), $item->custombannercode); ?> params->get('imageurl'); ?> params->get('width'); ?> params->get('height'); ?> params->get('alt'); ?> name; ?> clickurl) : ?> get('target', 1); ?> <?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?> /> <?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?> /> <?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?> /> <?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?> /> > />
mod_banners/tmpl/.htaccess000044400000000177152160445060011613 0ustar00 Order allow,deny Deny from all mod_banners/helper.php000064400000003237152160445060011033 0ustar00 * @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 Order allow,deny Deny from all .htaccess000044400000000177152160445060006350 0ustar00 Order allow,deny Deny from all mod_articles_categories/mod_articles_categories.php000064400000002275152160445060017012 0ustar00 * @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 * @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) : ?> id && in_array($view, array('category', 'categories')) && $option == 'com_content') echo ' class="active"'; ?>> level - $startLevel - 1; ?> get('item_heading') + $levelup; ?>> title; ?> get('numitems')) : ?> (numitems; ?>) get('item_heading') + $levelup; ?>> get('show_description', 0)) : ?> description, $item->getParams(), 'mod_articles_categories.content'); ?> get('show_children', 0) && (($params->get('maxlevel', 0) == 0) || ($params->get('maxlevel') >= ($item->level - $startLevel))) && count($item->getChildren())) : ?> '; ?> getChildren(); ?> get('layout', 'default') . '_items'); ?> '; ?> mod_articles_categories/tmpl/default.php000064400000000723152160445060014534 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
    get('layout', 'default') . '_items'); ?>
mod_articles_categories/tmpl/.htaccess000044400000000177152160445060014176 0ustar00 Order allow,deny Deny from all mod_articles_categories/mod_articles_categories.xml000064400000012007152160445060017015 0ustar00 mod_articles_categories Joomla! Project February 2010 (C) 2010 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_ARTICLES_CATEGORIES_XML_DESCRIPTION mod_articles_categories.php tmpl helper.php en-GB.mod_articles_categories.ini en-GB.mod_articles_categories.sys.ini
mod_articles_categories/helper.php000064400000002010152160445060013402 0ustar00 * @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 Order allow,deny Deny from all mod_articles_latest/tmpl/default.php000064400000001111152160445060013673 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> mod_articles_latest/tmpl/.htaccess000044400000000177152160445060013345 0ustar00 Order allow,deny Deny from all mod_articles_latest/helper.php000064400000007356152160445060012573 0ustar00 * @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 mod_articles_latest Joomla! Project July 2004 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_LATEST_NEWS_XML_DESCRIPTION mod_articles_latest.php tmpl helper.php en-GB.mod_articles_latest.ini en-GB.mod_articles_latest.sys.ini
mod_articles_latest/.htaccess000044400000000177152160445060012371 0ustar00 Order allow,deny Deny from all mod_articles_latest/mod_articles_latest.php000064400000001170152160445060015321 0ustar00 * @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 * @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 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
  • 1 && (($i < $n - 1) || $params->get('showLastSeparator'))) : ?>  
mod_articles_news/tmpl/vertical.php000064400000001333152160445060013546 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
  • 1 && (($i < $n - 1) || $params->get('showLastSeparator'))) : ?>  
mod_articles_news/tmpl/default.php000064400000000720152160445060013360 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
mod_articles_news/tmpl/_item.php000064400000003055152160445060013035 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> get('item_title')) : ?> get('item_heading', 'h4'); ?> < class="newsflash-titleget('moduleclass_sfx'); ?>"> link !== '' && $params->get('link_titles')) : ?> title; ?> title; ?> > get('img_intro_full') !== 'none' && !empty($item->imageSrc)) : ?>
<?php echo $item->imageAlt; ?> imageCaption)) : ?>
imageCaption; ?>
get('intro_only')) : ?> afterDisplayTitle; ?> beforeDisplayContent; ?> get('show_introtext', 1)) : ?> introtext; ?> afterDisplayContent; ?> link) && $item->readmore != 0 && $params->get('readmore')) : ?> link . '">' . $item->linkText . ''; ?> mod_articles_news/tmpl/.htaccess000044400000000177152160445060013025 0ustar00 Order allow,deny Deny from all mod_articles_news/helper.php000064400000013424152160445060012244 0ustar00 * @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('/]*>/', '', $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 mod_articles_news Joomla! Project July 2006 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_ARTICLES_NEWS_XML_DESCRIPTION mod_articles_news.php tmpl helper.php en-GB.mod_articles_news.ini en-GB.mod_articles_news.sys.ini
mod_articles_news/.htaccess000044400000000177152160445060012051 0ustar00 Order allow,deny Deny from all mod_login/mod_login.php000064400000001462152160445060011201 0ustar00 * @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 mod_login Joomla! Project July 2006 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_LOGIN_XML_DESCRIPTION mod_login.php tmpl helper.php en-GB.mod_login.ini en-GB.mod_login.sys.ini
mod_login/tmpl/default.php000064400000013057152160445060011635 0ustar00 * @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'); ?>
get('pretext')) : ?>

get('pretext'); ?>

get('usetext', 0)) : ?>
get('usetext', 0)) : ?>
1) : ?>
get('usetext', 0)) : ?>
    get('allowUserRegistration')) : ?>
get('posttext')) : ?>

get('posttext'); ?>

mod_login/tmpl/default_logout.php000064400000002654152160445060013227 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::_('behavior.keepalive'); ?>
get('greeting', 1)) : ?> get('profilelink', 0)) : ?>
mod_login/tmpl/.htaccess000044400000000177152160445060011273 0ustar00 Order allow,deny Deny from all mod_login/helper.php000064400000003131152160445060010504 0ustar00 * @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 Order allow,deny Deny from all mod_ariquizuserresult/script.php000077500000002503152160445060013252 0ustar00updateManifest($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 0ustar00mod_ariquizuserresult/mod_ariquizuserresult.php000077500000003025152160445060016427 0ustar00get('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); ?>
QuizName); ?> UserScore : sprintf('%.2f %%', $result->PercentScore); ?>
mod_ariquizuserresult/mod_ariquizuserresult.xml000077500000003154152160445060016443 0ustar00 ARI Quiz user results October 2012 ARI Soft info@ari-soft.com www.ari-soft.com 1.2.0 Shows last quizzes results for logged user mod_ariquizuserresult.php mod_ariquizuserresult.xml index.html
mod_ariquizuserresult/.htaccess000044400000000177152160445060013031 0ustar00 Order allow,deny Deny from all mod_articles_popular/mod_articles_popular.php000064400000001162152160445060015676 0ustar00 * @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 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> mod_articles_popular/tmpl/.htaccess000044400000000177152160445060013533 0ustar00 Order allow,deny Deny from all mod_articles_popular/helper.php000064400000006102152160445060012745 0ustar00 * @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 mod_articles_popular Joomla! Project July 2006 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_POPULAR_XML_DESCRIPTION mod_articles_popular.php tmpl helper.php en-GB.mod_articles_popular.ini en-GB.mod_articles_popular.sys.ini
mod_articles_popular/.htaccess000044400000000177152160445060012557 0ustar00 Order allow,deny Deny from all mod_finder/mod_finder.php000064400000003413152160445060011475 0ustar00 * @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 * @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 = ''; $showLabel = $params->get('show_label', 1); $labelClass = (!$showLabel ? 'element-invisible ' : '') . 'finder' . $suffix; $label = ''; switch ($params->get('label_pos', 'left')) { case 'top' : $output = $label . '
' . $output; break; case 'bottom' : $output .= '
' . $label; break; case 'right' : $output .= $label; break; case 'left' : default : $output = $label . $output; break; } if ($params->get('show_button', 0)) { $button = ''; switch ($params->get('button_pos', 'left')) { case 'top' : $output = $button . '
' . $output; break; case 'bottom' : $output .= '
' . $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); ?>
mod_finder/helper.php000064400000004533152160445060010652 0ustar00 * @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[] = ''; } // Add a field for Itemid if we need one. if ($needId) { $id = $paramItem ?: JFactory::getApplication()->input->get('Itemid', '0', 'int'); $fields[] = ''; } 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 mod_finder Joomla! Project August 2011 (C) 2011 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_FINDER_XML_DESCRIPTION mod_finder.php tmpl helper.php language/en-GB/en-GB.mod_finder.ini language/en-GB/en-GB.mod_finder.sys.ini
mod_finder/.htaccess000044400000000177152160445060010456 0ustar00 Order allow,deny Deny from all mod_articles_archive/mod_articles_archive.php000064400000001210152160445060015566 0ustar00 * @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 mod_articles_archive Joomla! Project July 2006 (C) 2006 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_ARTICLES_ARCHIVE_XML_DESCRIPTION mod_articles_archive.php tmpl helper.php en-GB.mod_articles_archive.ini en-GB.mod_articles_archive.sys.ini
mod_articles_archive/tmpl/default.php000064400000001031152160445060014021 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> mod_articles_archive/tmpl/.htaccess000044400000000177152160445060013472 0ustar00 Order allow,deny Deny from all mod_articles_archive/helper.php000064400000004625152160445060012714 0ustar00 * @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 Order allow,deny Deny from all mod_stats/mod_stats.xml000064400000006155152160445060011272 0ustar00 mod_stats Joomla! Project July 2004 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_STATS_XML_DESCRIPTION mod_stats.php tmpl helper.php en-GB.mod_stats.ini en-GB.mod_stats.sys.ini
mod_stats/tmpl/default.php000064400000000703152160445060011655 0ustar00 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>
title; ?>
data; ?>
mod_stats/tmpl/.htaccess000044400000000177152160445060011321 0ustar00 Order allow,deny Deny from all mod_stats/helper.php000064400000006770152160445060010546 0ustar00 * @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 Order allow,deny Deny from all mod_stats/mod_stats.php000064400000001270152160445060011252 0ustar00 * @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 * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?>

0) && count($names)) : ?> get('filter_groups', 0)) : ?>

  • username; ?>
Order allow,deny Deny from all mod_whosonline/helper.php000064400000005176152160445060011574 0ustar00 * @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 * @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 Order allow,deny Deny from all mod_whosonline/mod_whosonline.xml000064400000005061152160445060013343 0ustar00 mod_whosonline Joomla! Project July 2004 (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 3.0.0 MOD_WHOSONLINE_XML_DESCRIPTION mod_whosonline.php tmpl helper.php en-GB.mod_whosonline.ini en-GB.mod_whosonline.sys.ini