File manager - Edit - /home/opticamezl/www/newok/mod_yootheme_link.tar
Back
mod_yootheme_link.php 0000604 00000001567 15172622531 0010773 0 ustar 00 <?php use Joomla\CMS\Factory; use Joomla\CMS\Helper\ModuleHelper; use Joomla\Registry\Registry; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Uri\Uri; defined('_JEXEC') or die(); if (!Factory::getUser()->authorise('core.edit', 'com_templates')) { return; } $query = "SELECT * FROM #__template_styles WHERE client_id=0 AND home='1'"; if (!($templ = Factory::getDbo()->setQuery($query)->loadObject())) { return; } $templ->params = new Registry($templ->params); if (!$templ->params->get('yootheme')) { return; } if (!PluginHelper::isEnabled('system', 'yootheme')) { return; } $app->getDocument()->addStyleSheet( Uri::root(true) . '/administrator/modules/mod_yootheme_link/assets/icon.css', ); require ModuleHelper::getLayoutPath( 'mod_yootheme_link', $params->get('layout', 'default') . (version_compare(JVERSION, '4.0', '<') ? '_legacy' : ''), ); mod_yootheme_link.xml 0000604 00000002566 15172622531 0011004 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="module" client="administrator" method="upgrade"> <name>MOD_YOOTHEME_LINK</name> <version>4.5.33</version> <description>MOD_YOOTHEME_LINK_XML_DESCRIPTION</description> <creationDate>December 2025</creationDate> <copyright>Copyright (C) YOOtheme GmbH</copyright> <license>GNU General Public License</license> <author>YOOtheme</author> <authorEmail>info@yootheme.com</authorEmail> <authorUrl>https://yootheme.com</authorUrl> <files> <filename module="mod_yootheme_link">mod_yootheme_link.php</filename> <filename>script.php</filename> <folder>assets</folder> <folder>tmpl</folder> <folder>presets</folder> </files> <languages folder="language"> <language tag="en-GB">mod_yootheme_link.ini</language> <language tag="en-GB">mod_yootheme_link.sys.ini</language> </languages> <scriptfile>script.php</scriptfile> <config> <fields name="params"> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" class="form-select" /> </fieldset> </fields> </config> </extension> script.php 0000604 00000001316 15172622531 0006562 0 ustar 00 <?php use Joomla\CMS\Factory; class mod_yootheme_linkInstallerScript { public function install() { $db = Factory::getDBO(); $module = (object) [ 'title' => 'YOOtheme Link', 'position' => 'menu', 'published' => 1, 'client_id' => 1, 'module' => 'mod_yootheme_link', 'access' => 1, 'params' => '', 'language' => '*', 'publish_up' => Factory::getDate()->toSql(), 'ordering' => 2, ]; $db->insertObject('#__modules', $module); $menu = (object) ['moduleid' => $db->insertid(), 'menuid' => 0]; $db->insertObject('#__modules_menu', $menu); } } presets/yootheme.xml 0000604 00000001161 15172622531 0010603 0 ustar 00 <?xml version="1.0" ?> <menu> <menuitem type="separator" hidden="true" sql_select="id" sql_from="#__template_styles" sql_where="client_id = 0 AND home = '1'" > <!-- Joomla 4 Menu uses `class` attribute, Joomla 3 uses `icon` attribute--> <menuitem type="url" target="" title="YOOtheme" class="class: yo-quicklink-menu" icon="class:yo-quicklink-menu-j3" hidden="false" link="index.php?option=com_ajax&templateStyle={sql:id}&p=customizer&format=html" /> </menuitem> </menu> assets/icon.css 0000604 00000001102 15172622531 0007502 0 ustar 00 [class*='yo-quicklink-'] { -webkit-mask: url(icon.svg) 50% 50% / 100% no-repeat; mask: url(icon.svg) 50% 50% / 100% no-repeat; background-color: currentColor; } /* * Joomla 4 */ .yo-quicklink-menu { aspect-ratio: 1 / 1; } .yo-quicklink-cpanel { width: 46px; height: 32px; } /* * Joomla 3 */ /* .yo-quicklink-menu-j3 { float: left; aspect-ratio: 1/1; width: 22px; margin-left: -10px; margin-right: 5px; } */ .no-dropdown:has(.yo-quicklink-menu-j3) { margin-left: -10px; } .yo-quicklink-cpanel-j3 { vertical-align: text-bottom; } assets/icon.svg 0000604 00000001740 15172622531 0007521 0 ustar 00 <svg width="22" height="13" viewBox="0 0 22 13" xmlns="http://www.w3.org/2000/svg"> <path d="m2.21.54v4.89c0,.93.34,1.48,1.29,1.48s1.29-.55,1.29-1.48V.54h2.21v5.34c.13,1.48-.88,2.82-2.34,3.1v3.48h-2.31v-3.48c-.71-.13-1.33-.52-1.76-1.1C.18,7.29-.02,6.59,0,5.88V.54h2.21Z" /> <path d="m15.16,4.73c.12,2.3-1.65,4.27-3.95,4.39-.1,0-.19,0-.29,0-2.31.04-4.21-1.8-4.24-4.11,0-.1,0-.19,0-.29-.12-2.3,1.65-4.27,3.95-4.39.1,0,.19,0,.29,0,2.31-.04,4.21,1.8,4.24,4.11,0,.1,0,.19,0,.29m-6.27,0c-.13,1.07.63,2.05,1.71,2.18.11.01.22.02.32.01,1.08.05,1.99-.78,2.04-1.86,0-.11,0-.22-.01-.32.13-1.07-.63-2.05-1.71-2.18-.11-.01-.22-.02-.32-.01-1.08-.05-1.99.78-2.04,1.86,0,.11,0,.22.01.32" /> <path d="m22,4.73c.09,2.34-1.74,4.31-4.08,4.4s-4.31-1.74-4.4-4.08c0-.1,0-.21,0-.31-.09-2.34,1.74-4.31,4.08-4.4,2.34-.09,4.31,1.74,4.4,4.08,0,.1,0,.21,0,.31m-6.27,0c-.08,1.12.76,2.1,1.88,2.19s2.1-.76,2.19-1.88c0-.1,0-.21,0-.31.08-1.12-.76-2.1-1.88-2.19-1.12-.08-2.1.76-2.19,1.88,0,.1,0,.21,0,.31" /> </svg> tmpl/default_legacy.php 0000604 00000001677 15172622531 0011214 0 ustar 00 <?php use Joomla\CMS\Helper\ModuleHelper; use Joomla\CMS\Language\Text; use Joomla\Registry\Registry; use Joomla\CMS\Menu\MenuHelper; defined('_JEXEC') or die(); if (in_array($module->position, ['icon', 'cpanel'])) { JLoader::register(ModQuickIconHelper::class, __DIR__ . '/helper.php'); $buttons = [ [ 'image' => ' yo-quicklink-cpanel-j3', 'text' => 'YOOtheme', 'link' => "index.php?option=com_ajax&templateStyle={$templ->id}&p=customizer&format=html", 'group' => Text::_('MOD_YOOTHEME_LINK_TEMPLATES'), 'access' => ['core.edit', 'com_templates'], ], ]; require ModuleHelper::getLayoutPath('mod_quickicon'); } if ($module->position === 'menu') { MenuHelper::addPreset('yootheme', 'YOOtheme', __DIR__ . '/../presets/yootheme.xml'); $params = new Registry(['preset' => 'yootheme']); include JPATH_ADMINISTRATOR . '/modules/mod_menu/mod_menu.php'; } tmpl/default.php 0000604 00000002144 15172622531 0007656 0 ustar 00 <?php use Joomla\CMS\Helper\ModuleHelper; use Joomla\CMS\Language\Text; use Joomla\Component\Menus\Administrator\Helper\MenusHelper; use Joomla\Module\Menu\Administrator\Menu\CssMenu; defined('_JEXEC') or die(); if (in_array($module->position, ['icon', 'cpanel'])) { $buttons = [ [ 'image' => 'yo-quicklink-cpanel', 'text' => 'YOOtheme', 'link' => "index.php?option=com_ajax&templateStyle={$templ->id}&p=customizer&format=html", 'group' => Text::_('MOD_YOOTHEME_LINK_TEMPLATES'), 'access' => ['core.edit', 'com_templates'], ], ]; require ModuleHelper::getLayoutPath('mod_quickicon'); } if ($module->position === 'menu') { MenusHelper::addPreset('yootheme', 'YOOtheme', __DIR__ . '/../presets/yootheme.xml'); $enabled = !$app->getInput()->getBool('hidemainmenu'); $menu = new CssMenu($app); (fn() => ($this->enabled = $enabled))->bindTo($menu, $menu)(); $root = MenusHelper::loadPreset('yootheme'); $root->level = 0; // Render the module layout include ModuleHelper::getLayoutPath('mod_menu'); }
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings