File manager - Edit - /home/ferretapmx/public_html/mod_guidedtours.tar
Back
mod_guidedtours.xml 0000644 00000003550 15231065012 0010461 0 ustar 00 <?xml version="1.0" encoding="UTF-8"?> <extension type="module" client="administrator" method="upgrade"> <name>mod_guidedtours</name> <author>Joomla! Project</author> <creationDate>2023-02</creationDate> <copyright>(C) 2023 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>4.3.0</version> <description>MOD_GUIDEDTOURS_XML_DESCRIPTION</description> <namespace path="src">Joomla\Module\GuidedTours</namespace> <files> <folder module="mod_guidedtours">services</folder> <folder>src</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">language/en-GB/mod_guidedtours.ini</language> <language tag="en-GB">language/en-GB/mod_guidedtours.sys.ini</language> </languages> <help key="Admin_Modules:_Tours_Menu" /> <config> <fields name="params"> <fieldset name="basic"> <field name="contextcount" type="number" label="MOD_GUIDEDTOURS_FIELD_CONTEXT_TOUR_COUNT_LABEL" description="MOD_GUIDEDTOURS_FIELD_CONTEXT_TOUR_COUNT_DESC" default="7" filter="integer" min="0" validate="number" /> <field name="tourscount" type="number" label="MOD_GUIDEDTOURS_FIELD_TOUR_COUNT_LABEL" description="MOD_GUIDEDTOURS_FIELD_TOUR_COUNT_DESC" default="7" filter="integer" min="0" validate="number" /> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" class="form-select" validate="moduleLayout" /> <field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" rows="3" validate="CssIdentifier" /> </fieldset> </fields> </config> </extension> src/Helper/GuidedToursHelper.php 0000644 00000004140 15231065012 0012653 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage mod_guidedtours * * @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Module\GuidedTours\Administrator\Helper; use Joomla\CMS\Application\AdministratorApplication; use Joomla\CMS\Language\Multilanguage; use Joomla\Registry\Registry; use Joomla\Uri\Uri; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Helper for mod_guidedtours * * @since 4.3.0 */ class GuidedToursHelper { /** * Get a list of tours from a specific context. * * @param Registry $params Object holding the module parameters * @param AdministratorApplication $app The application * * @return mixed * * @since 4.3.0 */ public function getTours(Registry $params, AdministratorApplication $app) { $factory = $app->bootComponent('com_guidedtours')->getMVCFactory(); $user = $app->getIdentity(); // Get an instance of the guided tour model $tourModel = $factory->createModel('Tours', 'Administrator', ['ignore_request' => true]); $tourModel->setState('filter.published', 1); $tourModel->setState('filter.access', $app->getIdentity()->getAuthorisedViewLevels()); if (Multilanguage::isEnabled()) { $tourModel->setState('filter.language', ['*', $app->getLanguage()->getTag()]); } $items = $tourModel->getItems(); foreach ($items as $key => $item) { // The user can only see the tours of extensions that are allowed. $uri = new Uri($item->url); if ($extension = $uri->getVar('option')) { if ($extension === 'com_categories') { $extension = $uri->getVar('extension'); } if (!$user->authorise('core.manage', $extension)) { unset($items[$key]); } } } return $items; } } src/Helper/.htaccess 0000555 00000000355 15231065012 0010347 0 ustar 00 <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'> Order allow,deny Deny from all </FilesMatch>