forked from joomla/joomla-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
448 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
; Joomla! Project | ||
; (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> | ||
; License GNU General Public License version 2 or later; see LICENSE.txt | ||
; Note : All ini files need to be saved as UTF-8 | ||
|
||
MOD_GUIDEDTOURS="Guided Tours" | ||
MOD_GUIDEDTOURS_MENU="Take a Tour" | ||
MOD_GUIDEDTOURS_XML_DESCRIPTION="This module shows a list of the available guided tours." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
; Joomla! Project | ||
; (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> | ||
; License GNU General Public License version 2 or later; see LICENSE.txt | ||
; Note : All ini files need to be saved as UTF-8 | ||
|
||
MOD_GUIDEDTOURS="Guided Tours" | ||
MOD_GUIDEDTOURS_XML_DESCRIPTION="This module shows a list of the available guided tours." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage mod_guidedtours | ||
* | ||
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Helper\ModuleHelper; | ||
use Joomla\CMS\Plugin\PluginHelper; | ||
use Joomla\Module\GuidedTours\Administrator\Helper\GuidedToursHelper; | ||
|
||
if (!PluginHelper::isEnabled('system', 'tour')) { | ||
return; | ||
} | ||
|
||
$tours = GuidedToursHelper::getList($params); | ||
|
||
if (empty($tours)) { | ||
return; | ||
} | ||
|
||
require ModuleHelper::getLayoutPath('mod_guidedtours', $params->get('layout', 'default')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<extension type="module" client="administrator" method="upgrade"> | ||
<name>mod_guidedtours</name> | ||
<author>Joomla! Project</author> | ||
<creationDate>2023-01</creationDate> | ||
<copyright>(C) 2019 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> | ||
<filename module="mod_guidedtours">mod_guidedtours.php</filename> | ||
<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="advanced"> | ||
<field | ||
name="layout" | ||
type="modulelayout" | ||
label="JFIELD_ALT_LAYOUT_LABEL" | ||
class="form-select" | ||
/> | ||
|
||
<field | ||
name="moduleclass_sfx" | ||
type="textarea" | ||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" | ||
rows="3" | ||
validate="CssIdentifier" | ||
/> | ||
</fieldset> | ||
</fields> | ||
</config> | ||
</extension> |
55 changes: 55 additions & 0 deletions
55
administrator/modules/mod_guidedtours/src/Helper/GuidedToursHelper.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage mod_guidedtours | ||
* | ||
* @copyright (C) 2010 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\Factory; | ||
use Joomla\CMS\HTML\HTMLHelper; | ||
use Joomla\CMS\Language\LanguageHelper; | ||
use Joomla\CMS\Language\Text; | ||
use Joomla\CMS\Uri\Uri; | ||
|
||
// phpcs:disable PSR1.Files.SideEffects | ||
\defined('_JEXEC') or die; | ||
// phpcs:enable PSR1.Files.SideEffects | ||
|
||
/** | ||
* Helper for mod_login | ||
* | ||
* @since __DEPLOY_VERSION__ | ||
*/ | ||
abstract class GuidedToursHelper | ||
{ | ||
/** | ||
* Get a list of tours from a specific context | ||
* | ||
* @param \Joomla\Registry\Registry &$params object holding the module parameters | ||
* | ||
* @return mixed | ||
* | ||
* @since __DEPLOY_VERSION__ | ||
*/ | ||
public static function getList(&$params) | ||
{ | ||
$app = Factory::getApplication(); | ||
|
||
$factory = $app->bootComponent('com_guidedtours')->getMVCFactory(); | ||
|
||
// Get an instance of the guided tour model | ||
$tours = $factory->createModel('Tours', 'Administrator', ['ignore_request' => true]); | ||
|
||
//$tours->setState('list.extensions', $app->input->get('option')); | ||
$tours->setState('filter.published', 1); | ||
|
||
$items = $tours->getItems(); | ||
|
||
return $items; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage mod_guidedtours | ||
* | ||
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org> | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\HTML\HTMLHelper; | ||
use Joomla\CMS\Language\Text; | ||
|
||
// Load the Bootstrap Dropdown | ||
HTMLHelper::_('bootstrap.dropdown', '.dropdown-toggle'); | ||
?> | ||
<div class="header-item-content dropdown header-profile"> | ||
<button class="dropdown-toggle d-flex align-items-center ps-0 py-0" data-bs-toggle="dropdown" type="button" | ||
title="<?php echo Text::_('MOD_GUIDEDTOURS_MENU'); ?>"> | ||
<div class="header-item-icon"> | ||
<span class="icon-map-signs" aria-hidden="true"></span> | ||
</div> | ||
<div class="header-item-text"> | ||
<?php echo Text::_('MOD_GUIDEDTOURS_MENU'); ?> | ||
</div> | ||
<span class="icon-angle-down" aria-hidden="true"></span> | ||
</button> | ||
<div class="dropdown-menu dropdown-menu-end"> | ||
<?php foreach ($tours as $i => $tour) : ?> | ||
<a class="button-tour dropdown-item" onclick="tourWasSelected(this); return false" href="#" data-id="<?php echo $tour->id ?>"> | ||
<span class="icon-map-signs" aria-hidden="true"></span> | ||
<?php echo Text::_($tour->title); ?> | ||
</a> | ||
<?php endforeach; ?> | ||
</div> | ||
</div> |
Oops, something went wrong.