Файловый менеджер - Редактировать - /home/opticamezl/www/newok/default.php.tar
Назад
home/opticamezl/www/newok/modules/mod_footer/tmpl/default.php 0000644 00000000703 15165440632 0020536 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_footer * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; ?> <div class="mod-footer"> <div class="footer1"><?php echo $lineone; ?></div> <div class="footer2"><?php echo Text::_('MOD_FOOTER_LINE2'); ?></div> </div> home/opticamezl/www/newok/modules/mod_finder/tmpl/default.php 0000644 00000005523 15172516241 0020512 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\Module\Finder\Site\Helper\FinderHelper; // Load the smart search component language file. $lang = $app->getLanguage(); $lang->load('com_finder', JPATH_SITE); $input = '<input type="text" name="q" id="mod-finder-searchword' . $module->id . '" class="js-finder-search-query form-control" value="' . htmlspecialchars($app->getInput()->get('q', '', 'string'), ENT_COMPAT, 'UTF-8') . '"' . ' placeholder="' . Text::_('MOD_FINDER_SEARCH_VALUE') . '">'; $showLabel = $params->get('show_label', 1); $labelClass = (!$showLabel ? 'visually-hidden ' : '') . 'finder'; $label = '<label for="mod-finder-searchword' . $module->id . '" class="' . $labelClass . '">' . $params->get('alt_label', Text::_('JSEARCH_FILTER_SUBMIT')) . '</label>'; $output = ''; if ($params->get('show_button', 0)) { $output .= $label; $output .= '<div class="mod-finder__search input-group">'; $output .= $input; $output .= '<button class="btn btn-primary" type="submit"><span class="icon-search icon-white" aria-hidden="true"></span> ' . Text::_('JSEARCH_FILTER_SUBMIT') . '</button>'; $output .= '</div>'; } else { $output .= $label; $output .= $input; } Text::script('MOD_FINDER_SEARCH_VALUE'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $wa->getRegistry()->addExtensionRegistryFile('com_finder'); /* * This segment of code sets up the autocompleter. */ if ($params->get('show_autosuggest', 1)) { $wa->usePreset('awesomplete'); $app->getDocument()->addScriptOptions('finder-search', ['url' => Route::_('index.php?option=com_finder&task=suggestions.suggest&format=json&tmpl=component', false)]); Text::script('JLIB_JS_AJAX_ERROR_OTHER'); Text::script('JLIB_JS_AJAX_ERROR_PARSE'); } $wa->useScript('com_finder.finder'); ?> <form class="mod-finder js-finder-searchform form-search" action="<?php echo Route::_($route); ?>" method="get" role="search"> <?php echo $output; ?> <?php $show_advanced = $params->get('show_advanced', 0); ?> <?php if ($show_advanced == 2) : ?> <br> <a href="<?php echo Route::_($route); ?>" class="mod-finder__advanced-link"><?php echo Text::_('COM_FINDER_ADVANCED_SEARCH'); ?></a> <?php elseif ($show_advanced == 1) : ?> <div class="mod-finder__advanced js-finder-advanced"> <?php echo HTMLHelper::_('filter.select', $query, $params); ?> </div> <?php endif; ?> <?php echo FinderHelper::getGetFields($route, (int) $params->get('set_itemid', 0)); ?> </form> home/opticamezl/www/newok/modules/mod_yootheme_builder/tmpl/default.php 0000604 00000000073 15172537210 0022570 0 ustar 00 <?php defined('_JEXEC') or die(); echo $module->content; home/opticamezl/www/newok/modules/mod_banners/tmpl/default.php 0000644 00000012564 15172551225 0020677 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_banners * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; use Joomla\Component\Banners\Site\Helper\BannerHelper; ?> <div class="mod-banners bannergroup"> <?php if ($headerText) : ?> <div class="bannerheader"> <?php echo $headerText; ?> </div> <?php endif; ?> <?php foreach ($list as $item) : ?> <div class="mod-banners__item banneritem"> <?php $link = Route::_('index.php?option=com_banners&task=click&id=' . $item->id); ?> <?php if ($item->type == 1) : ?> <?php // Text based banners ?> <?php echo str_replace(['{CLICKURL}', '{NAME}'], [$link, $item->name], $item->custombannercode); ?> <?php else : ?> <?php $imageurl = $item->params->get('imageurl'); ?> <?php $width = $item->params->get('width'); ?> <?php $height = $item->params->get('height'); ?> <?php if (BannerHelper::isImage($imageurl)) : ?> <?php // Image based banner ?> <?php $baseurl = strpos($imageurl, 'http') === 0 ? '' : Uri::base(); ?> <?php $alt = $item->params->get('alt'); ?> <?php $alt = $alt ?: $item->name; ?> <?php $alt = $alt ?: Text::_('MOD_BANNERS_BANNER'); ?> <?php if ($item->clickurl) : ?> <?php // Wrap the banner in a link ?> <?php $target = $params->get('target', 1); ?> <?php if ($target == 1) : ?> <?php // Open in a new window ?> <a href="<?php echo $link; ?>" target="_blank" rel="noopener noreferrer" title="<?php echo htmlspecialchars($item->name, ENT_QUOTES, 'UTF-8'); ?>"> <img src="<?php echo $baseurl . $imageurl; ?>" alt="<?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?>" <?php if (!empty($width)) { echo 'width="' . $width . '"'; } ?> <?php if (!empty($height)) { echo 'height="' . $height . '"'; } ?> > </a> <?php elseif ($target == 2) : ?> <?php // Open in a popup window ?> <a href="<?php echo $link; ?>" onclick="window.open(this.href, '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false" title="<?php echo htmlspecialchars($item->name, ENT_QUOTES, 'UTF-8'); ?>"> <img src="<?php echo $baseurl . $imageurl; ?>" alt="<?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?>" <?php if (!empty($width)) { echo 'width="' . $width . '"'; } ?> <?php if (!empty($height)) { echo 'height="' . $height . '"'; } ?> > </a> <?php else : ?> <?php // Open in parent window ?> <a href="<?php echo $link; ?>" title="<?php echo htmlspecialchars($item->name, ENT_QUOTES, 'UTF-8'); ?>"> <img src="<?php echo $baseurl . $imageurl; ?>" alt="<?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?>" <?php if (!empty($width)) { echo 'width="' . $width . '"'; } ?> <?php if (!empty($height)) { echo 'height="' . $height . '"'; } ?> > </a> <?php endif; ?> <?php else : ?> <?php // Just display the image if no link specified ?> <img src="<?php echo $baseurl . $imageurl; ?>" alt="<?php echo htmlspecialchars($alt, ENT_QUOTES, 'UTF-8'); ?>" <?php if (!empty($width)) { echo 'width="' . $width . '"'; } ?> <?php if (!empty($height)) { echo 'height="' . $height . '"'; } ?> > <?php endif; ?> <?php endif; ?> <?php endif; ?> </div> <?php endforeach; ?> <?php if ($footerText) : ?> <div class="mod-banners__footer bannerfooter"> <?php echo $footerText; ?> </div> <?php endif; ?> </div> home/opticamezl/www/newok/modules/mod_breadcrumbs/tmpl/default.php 0000644 00000010737 15172560131 0021534 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_breadcrumbs * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\CMS\WebAsset\WebAssetManager; ?> <nav class="mod-breadcrumbs__wrapper" aria-label="<?php echo htmlspecialchars($module->title, ENT_QUOTES, 'UTF-8'); ?>"> <ol class="mod-breadcrumbs breadcrumb px-3 py-2"> <?php if ($params->get('showHere', 1)) : ?> <li class="mod-breadcrumbs__here float-start"> <?php echo Text::_('MOD_BREADCRUMBS_HERE'); ?>  </li> <?php else : ?> <li class="mod-breadcrumbs__divider float-start"> <span class="divider icon-location icon-fw" aria-hidden="true"></span> </li> <?php endif; ?> <?php // Get rid of duplicated entries on trail including home page when using multilanguage for ($i = 0; $i < $count; $i++) { if ($i === 1 && !empty($list[$i]->link) && !empty($list[$i - 1]->link) && $list[$i]->link === $list[$i - 1]->link) { unset($list[$i]); } } // Find last and penultimate items in breadcrumbs list end($list); $last_item_key = key($list); prev($list); $penult_item_key = key($list); // Make a link if not the last item in the breadcrumbs $show_last = $params->get('showLast', 1); $class = null; // Generate the trail foreach ($list as $key => $item) : if ($key !== $last_item_key) : if (!empty($item->link)) : $breadcrumbItem = HTMLHelper::_('link', Route::_($item->link), '<span>' . $item->name . '</span>', ['class' => 'pathway']); else : $breadcrumbItem = '<span>' . $item->name . '</span>'; endif; echo '<li class="mod-breadcrumbs__item breadcrumb-item' . $class . '">' . $breadcrumbItem . '</li>'; elseif ($show_last) : // Render last item if required. $breadcrumbItem = '<span>' . $item->name . '</span>'; $class = ' active'; echo '<li class="mod-breadcrumbs__item breadcrumb-item' . $class . '">' . $breadcrumbItem . '</li>'; endif; endforeach; ?> </ol> <?php // Structured data as JSON $data = [ '@context' => 'https://schema.org', '@type' => 'BreadcrumbList', 'itemListElement' => [] ]; // Use an independent counter for positions. E.g. if Heading items in pathway. $itemsCounter = 0; // If showHome is disabled use the fallback $homeCrumb for startpage at first position. if (isset($homeCrumb)) { $data['itemListElement'][] = [ '@type' => 'ListItem', 'position' => ++$itemsCounter, 'item' => [ '@id' => Route::_($homeCrumb->link, true, Route::TLS_IGNORE, true), 'name' => $homeCrumb->name, ], ]; } foreach ($list as $key => $item) { // Only add item to JSON if it has a valid link, otherwise skip it. if (!empty($item->link)) { $data['itemListElement'][] = [ '@type' => 'ListItem', 'position' => ++$itemsCounter, 'item' => [ '@id' => Route::_($item->link, true, Route::TLS_IGNORE, true), 'name' => $item->name, ], ]; } elseif ($key === $last_item_key) { // Add the last item (current page) to JSON, but without a link. // Google accepts items without a URL only as the current page. $data['itemListElement'][] = [ '@type' => 'ListItem', 'position' => ++$itemsCounter, 'item' => [ 'name' => $item->name, ], ]; } } if ($itemsCounter) { /** @var WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $wa->addInline('script', json_encode($data, JSON_UNESCAPED_UNICODE), [], ['type' => 'application/ld+json']); } ?> </nav> home/opticamezl/www/newok/modules/mod_languages/tmpl/default.php 0000644 00000014676 15172563231 0021223 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_languages * * @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Uri\Uri; /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $wa->registerAndUseStyle('mod_languages', 'mod_languages/template.css'); ?> <div class="mod-languages"> <p class="visually-hidden" id="language_picker_des_<?php echo $module->id; ?>"><?php echo Text::_('MOD_LANGUAGES_DESC'); ?></p> <?php if ($headerText) : ?> <div class="mod-languages__pretext pretext"><p><?php echo $headerText; ?></p></div> <?php endif; ?> <?php if ($params->get('dropdown', 0)) : ?> <?php HTMLHelper::_('bootstrap.dropdown', '.dropdown-toggle'); ?> <div class="mod-languages__select btn-group"> <?php foreach ($list as $language) : ?> <?php if ($language->active) : ?> <button id="language_btn_<?php echo $module->id; ?>" type="button" data-bs-toggle="dropdown" class="btn btn-secondary dropdown-toggle" aria-haspopup="listbox" aria-labelledby="language_picker_des_<?php echo $module->id; ?> language_btn_<?php echo $module->id; ?>" aria-expanded="false"> <?php if ($params->get('dropdownimage', 1) && ($language->image)) : ?> <?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $params->get('full_name') ? '' : $language->title_native, null, true); ?> <?php endif; ?> <?php echo $params->get('full_name', 1) ? $language->title_native : strtoupper($language->sef); ?> </button> <?php endif; ?> <?php endforeach; ?> <ul aria-labelledby="language_picker_des_<?php echo $module->id; ?>" class="lang-block dropdown-menu"> <?php foreach ($list as $language) : ?> <?php $lbl = ''; if ($params->get('full_name') === 0) { $lbl = 'aria-label="' . $language->title_native . '"'; } ?> <?php if (!$language->active) : ?> <li> <a <?php echo $lbl; ?> href="<?php echo htmlspecialchars_decode(htmlspecialchars($language->link, ENT_QUOTES, 'UTF-8'), ENT_NOQUOTES); ?>"> <?php if ($params->get('dropdownimage', 1) && ($language->image)) : ?> <?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $params->get('full_name') ? '' : $language->title_native, null, true); ?> <?php endif; ?> <?php echo $params->get('full_name', 1) ? $language->title_native : strtoupper($language->sef); ?> </a> </li> <?php elseif ($params->get('show_active', 1)) : ?> <?php $base = Uri::getInstance(); ?> <li class="lang-active"> <a aria-current="true" <?php echo $lbl; ?> href="<?php echo htmlspecialchars_decode(htmlspecialchars($base, ENT_QUOTES, 'UTF-8'), ENT_NOQUOTES); ?>"> <?php if ($params->get('dropdownimage', 1) && ($language->image)) : ?> <?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $params->get('full_name') ? '' : $language->title_native, null, true); ?> <?php endif; ?> <?php echo $params->get('full_name', 1) ? $language->title_native : strtoupper($language->sef); ?> </a> </li> <?php endif; ?> <?php endforeach; ?> </ul> </div> <?php else : ?> <ul aria-labelledby="language_picker_des_<?php echo $module->id; ?>" class="mod-languages__list <?php echo $params->get('inline', 1) ? 'lang-inline' : 'lang-block'; ?>"> <?php foreach ($list as $language) : ?> <?php $lbl = ''; if ((($params->get('full_name') === 0) && ($params->get('image') === 0)) || (!$language->image)) { $lbl = 'aria-label="' . $language->title_native . '"'; } ?> <?php if (!$language->active) : ?> <li> <a <?php echo $lbl; ?> href="<?php echo htmlspecialchars_decode(htmlspecialchars($language->link, ENT_QUOTES, 'UTF-8'), ENT_NOQUOTES); ?>"> <?php if ($params->get('image', 1)) : ?> <?php if ($language->image) : ?> <?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, ['title' => $language->title_native], true); ?> <?php else : ?> <span class="label" title="<?php echo $language->title_native; ?>"><?php echo strtoupper($language->sef); ?></span> <?php endif; ?> <?php else : ?> <?php echo $params->get('full_name', 1) ? $language->title_native : strtoupper($language->sef); ?> <?php endif; ?> </a> </li> <?php elseif ($params->get('show_active', 1)) : ?> <?php $base = Uri::getInstance(); ?> <li class="lang-active"> <a aria-current="true" <?php echo $lbl; ?> href="<?php echo htmlspecialchars_decode(htmlspecialchars($base, ENT_QUOTES, 'UTF-8'), ENT_NOQUOTES); ?>"> <?php if ($params->get('image', 1)) : ?> <?php if ($language->image) : ?> <?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, ['title' => $language->title_native], true); ?> <?php else : ?> <span class="badge bg-secondary" title="<?php echo $language->title_native; ?>"><?php echo strtoupper($language->sef); ?></span> <?php endif; ?> <?php else : ?> <?php echo $params->get('full_name', 1) ? $language->title_native : strtoupper($language->sef); ?> <?php endif; ?> </a> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> <?php if ($footerText) : ?> <div class="mod-languages__posttext posttext"><p><?php echo $footerText; ?></p></div> <?php endif; ?> </div> home/opticamezl/www/newok/modules/mod_menu/tmpl/default.php 0000644 00000004777 15172571241 0020222 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_menu * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $wa->registerAndUseScript('mod_menu', 'mod_menu/menu.min.js', [], ['type' => 'module']); $wa->registerAndUseScript('mod_menu', 'mod_menu/menu-es5.min.js', [], ['nomodule' => true, 'defer' => true]); $id = ''; if ($tagId = $params->get('tag_id', '')) { $id = ' id="' . htmlspecialchars($tagId, ENT_QUOTES, 'UTF-8') . '"'; } // The menu class is deprecated. Use mod-menu instead ?> <ul<?php echo $id; ?> class="mod-menu mod-list nav <?php echo $class_sfx; ?>"> <?php foreach ($list as $i => &$item) { $itemParams = $item->getParams(); $class = 'nav-item item-' . $item->id; if ($item->id == $default_id) { $class .= ' default'; } if ($item->id == $active_id || ($item->type === 'alias' && $itemParams->get('aliasoptions') == $active_id)) { $class .= ' current'; } if (in_array($item->id, $path)) { $class .= ' active'; } elseif ($item->type === 'alias') { $aliasToId = $itemParams->get('aliasoptions'); if (count($path) > 0 && $aliasToId == $path[count($path) - 1]) { $class .= ' active'; } elseif (in_array($aliasToId, $path)) { $class .= ' alias-parent-active'; } } if ($item->type === 'separator') { $class .= ' divider'; } if ($item->deeper) { $class .= ' deeper'; } if ($item->parent) { $class .= ' parent'; } echo '<li class="' . $class . '">'; switch ($item->type) : case 'separator': case 'component': case 'heading': case 'url': require ModuleHelper::getLayoutPath('mod_menu', 'default_' . $item->type); break; default: require ModuleHelper::getLayoutPath('mod_menu', 'default_url'); break; endswitch; // The next item is deeper. if ($item->deeper) { echo '<ul class="mod-menu__sub list-unstyled small">'; } elseif ($item->shallower) { // The next item is shallower. echo '</li>'; echo str_repeat('</ul></li>', $item->level_diff); } else { // The next item is on the same level. echo '</li>'; } } ?></ul> home/opticamezl/www/newok/modules/mod_stats/tmpl/default.php 0000644 00000001023 15172601406 0020366 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_stats * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <ul class="mod-stats list-group"> <?php foreach ($list as $item) : ?> <li class="list-group-item"> <?php echo $item->title; ?> <span class="badge bg-secondary float-end rounded-pill"><?php echo $item->data; ?></span> </li> <?php endforeach; ?> </ul> home/opticamezl/www/newok/modules/mod_wrapper/tmpl/default.php 0000644 00000001555 15172601414 0020721 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_wrapper * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $app->getDocument()->getWebAssetManager(); $wa->registerAndUseScript('com_wrapper.iframe', 'com_wrapper/iframe-height.min.js', [], ['defer' => true]); ?> <iframe <?php echo $load; ?> id="blockrandom-<?php echo $id; ?>" name="<?php echo $target; ?>" src="<?php echo $url; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" loading="<?php echo $lazyloading; ?>" title="<?php echo $ititle; ?>" class="mod-wrapper wrapper"> <?php echo Text::_('MOD_WRAPPER_NO_IFRAMES'); ?> </iframe> home/opticamezl/www/newok/modules/mod_custom/tmpl/default.php 0000644 00000001517 15172601434 0020553 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_custom * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Uri\Uri; $modId = 'mod-custom' . $module->id; if ($params->get('backgroundimage')) { /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = Factory::getApplication()->getDocument()->getWebAssetManager(); $wa->addInlineStyle(' #' . $modId . '{background-image: url("' . Uri::root(true) . '/' . HTMLHelper::_('cleanImageURL', $params->get('backgroundimage'))->url . '");} ', ['name' => $modId]); } ?> <div id="<?php echo $modId; ?>" class="mod-custom custom"> <?php echo $module->content; ?> </div> home/opticamezl/www/newok/modules/mod_articles_popular/tmpl/default.php 0000644 00000001317 15172601534 0022610 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_popular * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if (!isset($list)) { if (isset($hitsDisabledMessage)) { echo $hitsDisabledMessage; } return; } ?> <ul class="mostread mod-list"> <?php foreach ($list as $item) : ?> <li itemscope itemtype="https://schema.org/Article"> <a href="<?php echo $item->link; ?>" itemprop="url"> <span itemprop="name"> <?php echo $item->title; ?> </span> </a> </li> <?php endforeach; ?> </ul> home/opticamezl/www/newok/modules/mod_articles_archive/tmpl/default.php 0000644 00000001037 15172601572 0022550 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_articles_archive * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if (!$list) { return; } ?> <ul class="mod-articlesarchive archive-module mod-list"> <?php foreach ($list as $item) : ?> <li> <a href="<?php echo $item->link; ?>"> <?php echo $item->text; ?> </a> </li> <?php endforeach; ?> </ul> home/opticamezl/www/newok/modules/mod_weblinks/tmpl/default.php 0000604 00000017472 15172623276 0021072 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage Weblinks * * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; ?> <?php if ($params->get('groupby', 0)) : ?> <?php $cats = [] ?> <?php $cols = $params->get('groupby_columns', 3); ?> <?php foreach ($list as $l) : ?> <?php $cats[] = array('catid' => $l->catid, 'title' => $l->category_title); ?> <?php endforeach; ?> <?php $cats = array_values(array_map('unserialize', array_unique(array_map('serialize', $cats)))); ?> <?php foreach ($cats as $k => $cat) : ?> <?php $items = []; ?> <?php foreach ($list as $item) : ?> <?php if ($item->catid == $cat['catid']) : ?> <?php $items[] = $item; ?> <?php endif; ?> <?php endforeach; ?> <?php if ($cols > 1) : ?> <?php if ($k % $cols == 0) : ?> <div class="row row-fluid"> <?php endif; ?> <div class="col-' . 12 / $cols . '"> <?php endif; ?> <?php if ($params->get('groupby_showtitle', 1)) : ?> <strong> <?php echo htmlspecialchars($cat['title'], ENT_COMPAT, 'UTF-8'); ?></strong> <?php endif; ?> <ul class="weblinks<?php echo $moduleclass_sfx; ?>"> <?php foreach ($items as $item) : ?> <li><div class="d-flex flex-wrap"> <div class="col flex-sm-grow-1"> <?php $link = $item->link; $width = (int) $item->params->get('width', 600); $height = (int) $item->params->get('height', 500); switch ($item->params->get('target')) { case 1: // Open in a new window echo '<a href="' . $link . '" target="_blank" rel="' . $params->get('follow', 'nofollow') . '">' . htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>'; break; case 2: // Open in a popup window $attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' . $width . ',height=' . $height; echo "<a href=\"$link\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\">" . htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>'; break; case 3: // Open in a modal window $modalId = 'weblink-item-modal-' . $item->id; $modalParams['title'] = htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8'); $modalParams['url'] = $link; $modalParams['height'] = '100%'; $modalParams['width'] = '100%'; $modalParams['bodyHeight'] = 70; $modalParams['modalWidth'] = 80; echo HTMLHelper::_('bootstrap.renderModal', $modalId, $modalParams); echo '<button type="button" class="btn btn-link" data-bs-toggle="modal" data-bs-target="#' . $modalId . '"> ' . $item->title . '</button>'; break; default: // Open in parent window echo '<a href="' . $link . '" rel="' . $params->get('follow', 'nofollow') . '">' . htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>'; break; } ?> </div> <?php echo $params->get('description', 0) ? '<div class="col flex-sm-grow-1">' . $item->description . '</div>' : ''; ?> <?php if ($params->get('hits', 0)) : ?> <div class="col flex-sm-grow-1"> <span class="badge bg-info float-md-end"> <?php echo $item->hits . ' ' . Text::_('MOD_WEBLINKS_HITS'); ?></span> </div> <?php endif; ?> </li> <?php endforeach; ?> </ul> <?php if ($cols > 1) : ?> </div> <?php if (($k + 1) % $cols == 0 || $k == count($cats) - 1) : ?> </div> <?php endif; ?> <?php endif; ?> <?php endforeach; ?> <?php else : ?> <ul class="weblinks<?php echo $moduleclass_sfx; ?>"> <?php foreach ($list as $item) : ?> <li><div class="d-flex flex-wrap"> <div class="col flex-sm-grow-1"> <?php $link = $item->link; $width = (int) $item->params->get('width', 600); $height = (int) $item->params->get('height', 500); switch ($item->params->get('target')) { case 1: // Open in a new window echo '<a href="' . $link . '" target="_blank" rel="' . $params->get('follow', 'nofollow') . '">' . htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>'; break; case 2: // Open in a popup window $attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' . $width . ',height=' . $height; echo "<a href=\"$link\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\">" . htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>'; break; case 3: // Open in a modal window $modalId = 'weblink-item-modal-' . $item->id; $modalParams['title'] = htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8'); $modalParams['url'] = $link; $modalParams['height'] = '100%'; $modalParams['width'] = '100%'; $modalParams['bodyHeight'] = 70; $modalParams['modalWidth'] = 80; echo HTMLHelper::_('bootstrap.renderModal', $modalId, $modalParams); echo '<button type="button" class="btn btn-link" data-bs-toggle="modal" data-bs-target="#' . $modalId . '"> ' . $item->title . ' </button>'; break; default: // Open in parent window echo '<a href="' . $link . '" rel="' . $params->get('follow', 'nofollow') . '">' . htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>'; break; } ?> </div> <?php echo $params->get('description', 0) ? '<div class="col flex-sm-grow-1">' . $item->description . '</div>' : ''; ?> <?php if ($params->get('hits', 0)) : ?> <div class="col flex-sm-grow-1"> <span class="badge bg-info float-md-end"><?php echo $item->hits . ' ' . Text::_('MOD_WEBLINKS_HITS'); ?></span> </div> <?php endif; ?> </div> </li> <?php endforeach; ?> </ul> <?php endif; ?> home/opticamezl/www/newok/modules/mod_syndicate/tmpl/default.php 0000644 00000001324 15172626203 0021221 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage mod_syndicate * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; $textClass = ($params->get('display_text', 1) ? '' : 'class="visually-hidden"'); $linkText = '<span class="icon-feed m-1" aria-hidden="true"></span>'; $linkText .= '<span ' . $textClass . '>' . (!empty($text) ? $text : Text::_('MOD_SYNDICATE_DEFAULT_FEED_ENTRIES')) . '</span>'; $attribs = [ 'class' => 'mod-syndicate syndicate-module' ]; echo HTMLHelper::_('link', $link, $linkText, $attribs); home/opticamezl/www/newok/modules/mod_gtranslate/tmpl/default.php 0000604 00000056017 15172637421 0021413 0 ustar 00 <?php /** * @version $Id$ * @package GTranslate * @copyright Copyright (C) 2008-2023 GTranslate Inc. All rights reserved. * @license GNU/GPL v3 http://www.gnu.org/licenses/gpl.html */ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Uri\Uri; use Joomla\CMS\Factory; $lang_array = array('en'=>'English','ar'=>'Arabic','bg'=>'Bulgarian','zh-CN'=>'Chinese (Simplified)','zh-TW'=>'Chinese (Traditional)','hr'=>'Croatian','cs'=>'Czech','da'=>'Danish','nl'=>'Dutch','fi'=>'Finnish','fr'=>'French','de'=>'German','el'=>'Greek','hi'=>'Hindi','it'=>'Italian','ja'=>'Japanese','ko'=>'Korean','no'=>'Norwegian','pl'=>'Polish','pt'=>'Portuguese','ro'=>'Romanian','ru'=>'Russian','es'=>'Spanish','sv'=>'Swedish','ca'=>'Catalan','tl'=>'Filipino','iw'=>'Hebrew','id'=>'Indonesian','lv'=>'Latvian','lt'=>'Lithuanian','sr'=>'Serbian','sk'=>'Slovak','sl'=>'Slovenian','uk'=>'Ukrainian','vi'=>'Vietnamese','sq'=>'Albanian','et'=>'Estonian','gl'=>'Galician','hu'=>'Hungarian','mt'=>'Maltese','th'=>'Thai','tr'=>'Turkish','fa'=>'Persian','af'=>'Afrikaans','ms'=>'Malay','sw'=>'Swahili','ga'=>'Irish','cy'=>'Welsh','be'=>'Belarusian','is'=>'Icelandic','mk'=>'Macedonian','yi'=>'Yiddish','hy'=>'Armenian','az'=>'Azerbaijani','eu'=>'Basque','ka'=>'Georgian','ht'=>'Haitian Creole','ur'=>'Urdu','bn' => 'Bengali','bs' => 'Bosnian','ceb' => 'Cebuano','eo' => 'Esperanto','gu' => 'Gujarati','ha' => 'Hausa','hmn' => 'Hmong','ig' => 'Igbo','jw' => 'Javanese','kn' => 'Kannada','km' => 'Khmer','lo' => 'Lao','la' => 'Latin','mi' => 'Maori','mr' => 'Marathi','mn' => 'Mongolian','ne' => 'Nepali','pa' => 'Punjabi','so' => 'Somali','ta' => 'Tamil','te' => 'Telugu','yo' => 'Yoruba','zu' => 'Zulu','my' => 'Myanmar (Burmese)','ny' => 'Chichewa','kk' => 'Kazakh','mg' => 'Malagasy','ml' => 'Malayalam','si' => 'Sinhala','st' => 'Sesotho','su' => 'Sudanese','tg' => 'Tajik','uz' => 'Uzbek','am' => 'Amharic','co' => 'Corsican','haw' => 'Hawaiian','ku' => 'Kurdish (Kurmanji)','ky' => 'Kyrgyz','lb' => 'Luxembourgish','ps' => 'Pashto','sm' => 'Samoan','gd' => 'Scottish Gaelic','sn' => 'Shona','sd' => 'Sindhi','fy' => 'Frisian','xh' => 'Xhosa'); $settings = $params->toArray(); // Move the default language to the first position $lang_array = array_merge(array($settings['language'] => $lang_array[$settings['language']]), $lang_array); $gt_settings = array( 'default_language' => $settings['language'], 'languages' => $settings['languages'], 'url_structure' => $settings['url_structure'], 'wrapper_selector' => $settings['wrapper_selector'], 'globe_size' => $settings['globe_size'], 'flag_size' => $settings['flag_size'], 'flag_style' => $settings['flag_style'], 'custom_domains' => $settings['custom_domains'] ? $settings['custom_domains_config'] : null, 'float_switcher_open_direction' => $settings['float_switcher_open_direction'], 'switcher_open_direction' => $settings['switcher_open_direction'], 'native_language_names' => $settings['native_language_names'], 'add_new_line' => $settings['add_new_line'], 'select_language_label' => $settings['select_language_label'], 'detect_browser_language' => $settings['detect_browser_language'], 'custom_css' => $settings['custom_css'], ); $alt_flags = array(); $raw_alt_flags = $settings['alt_flags']; // example raw_alt_flags: ['usa', 'mexico'] foreach($raw_alt_flags as $country) { if($country == 'usa' or $country == 'canada') $alt_flags['en'] = $country; elseif($country == 'brazil') $alt_flags['pt'] = $country; elseif($country == 'mexico' or $country == 'argentina' or $country == 'colombia') $alt_flags['es'] = $country; elseif($country == 'quebec') $alt_flags['fr'] = $country; } $gt_settings['alt_flags'] = $alt_flags; $float_position = $settings['float_position']; if($float_position == 'inline') $switcher_horizontal_position = $switcher_vertical_position = 'inline'; else list($switcher_vertical_position, $switcher_horizontal_position) = explode('-', $float_position); $gt_settings['switcher_horizontal_position'] = $switcher_horizontal_position; $gt_settings['switcher_vertical_position'] = $switcher_vertical_position; $position = $settings['position']; if($position == 'inline') $horizontal_position = $vertical_position = 'inline'; else list($vertical_position, $horizontal_position) = explode('-', $position); $gt_settings['horizontal_position'] = $horizontal_position; $gt_settings['vertical_position'] = $vertical_position; $color_scheme = $settings['color_scheme']; if($settings['look'] == 'dropdown_with_flags' and $color_scheme == 'dark') { $gt_settings['switcher_text_color'] = '#f7f7f7'; $gt_settings['switcher_arrow_color'] = '#f2f2f2'; $gt_settings['switcher_border_color'] = '#161616'; $gt_settings['switcher_background_color'] = '#303030'; $gt_settings['switcher_background_shadow_color'] = '#474747'; $gt_settings['switcher_background_hover_color'] = '#3a3a3a'; $gt_settings['dropdown_text_color'] = '#eaeaea'; $gt_settings['dropdown_hover_color'] = '#748393'; $gt_settings['dropdown_background_color'] = '#474747'; } switch($settings['look']) { case 'float': { $widget_code = ''; if($gt_settings['wrapper_selector'] == '.gtranslate_wrapper') { $gt_settings['wrapper_selector'] = '#gt-wrapper-' . $module->id; $widget_code .= '<div class="gtranslate_wrapper" id="gt-wrapper-' . $module->id . '"></div>'; } if(!empty($gt_settings['custom_domains'])) $gt_settings['custom_domains'] = json_decode($gt_settings['custom_domains']); $uri = Uri::getInstance(); $document = Factory::getDocument(); $orig_url = $uri->getPath(); $orig_domain = $uri->getHost(); if($settings['enable_cdn']) { $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript('https://cdn.gtranslate.net/widgets/latest/float.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } else { $base_path = JURI::root() . 'media/mod_gtranslate'; $gt_settings['flags_location'] = $base_path . '/flags/'; $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript($base_path.'/js/float.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } echo $widget_code; }; break; case 'dropdown_with_flags': { $widget_code = ''; if($gt_settings['wrapper_selector'] == '.gtranslate_wrapper') { $gt_settings['wrapper_selector'] = '#gt-wrapper-' . $module->id; $widget_code .= '<div class="gtranslate_wrapper" id="gt-wrapper-' . $module->id . '"></div>'; } if(!empty($gt_settings['custom_domains'])) $gt_settings['custom_domains'] = json_decode($gt_settings['custom_domains']); $uri = Uri::getInstance(); $document = Factory::getDocument(); $orig_url = $uri->getPath(); $orig_domain = $uri->getHost(); if($settings['enable_cdn']) { $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript('https://cdn.gtranslate.net/widgets/latest/dwf.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } else { $base_path = JURI::root() . 'media/mod_gtranslate'; $gt_settings['flags_location'] = $base_path . '/flags/'; $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript($base_path.'/js/dwf.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } echo $widget_code; }; break; case 'both': // same as flags_dropdown case 'flags_dropdown': { $widget_code = ''; if($gt_settings['wrapper_selector'] == '.gtranslate_wrapper') { $gt_settings['wrapper_selector'] = '#gt-wrapper-' . $module->id; $widget_code .= '<div class="gtranslate_wrapper" id="gt-wrapper-' . $module->id . '"></div>'; } if(!empty($gt_settings['custom_domains'])) $gt_settings['custom_domains'] = json_decode($gt_settings['custom_domains']); $uri = Uri::getInstance(); $document = Factory::getDocument(); $orig_url = $uri->getPath(); $orig_domain = $uri->getHost(); if($settings['enable_cdn']) { $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript('https://cdn.gtranslate.net/widgets/latest/fd.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } else { $base_path = JURI::root() . 'media/mod_gtranslate'; $gt_settings['flags_location'] = $base_path . '/flags/'; $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript($base_path.'/js/fd.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } echo $widget_code; }; break; case 'flags': { $widget_code = ''; if($gt_settings['wrapper_selector'] == '.gtranslate_wrapper') { $gt_settings['wrapper_selector'] = '#gt-wrapper-' . $module->id; $widget_code .= '<div class="gtranslate_wrapper" id="gt-wrapper-' . $module->id . '"></div>'; } if(!empty($gt_settings['custom_domains'])) $gt_settings['custom_domains'] = json_decode($gt_settings['custom_domains']); $uri = Uri::getInstance(); $document = Factory::getDocument(); $orig_url = $uri->getPath(); $orig_domain = $uri->getHost(); if($settings['enable_cdn']) { $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript('https://cdn.gtranslate.net/widgets/latest/flags.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } else { $base_path = JURI::root() . 'media/mod_gtranslate'; $gt_settings['flags_location'] = $base_path . '/flags/'; $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript($base_path.'/js/flags.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } echo $widget_code; }; break; case 'dropdown': { $widget_code = ''; if($gt_settings['wrapper_selector'] == '.gtranslate_wrapper') { $gt_settings['wrapper_selector'] = '#gt-wrapper-' . $module->id; $widget_code .= '<div class="gtranslate_wrapper" id="gt-wrapper-' . $module->id . '"></div>'; } if(!empty($gt_settings['custom_domains'])) $gt_settings['custom_domains'] = json_decode($gt_settings['custom_domains']); $uri = Uri::getInstance(); $document = Factory::getDocument(); $orig_url = $uri->getPath(); $orig_domain = $uri->getHost(); if($settings['enable_cdn']) { $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript('https://cdn.gtranslate.net/widgets/latest/dropdown.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } else { $base_path = JURI::root() . 'media/mod_gtranslate'; $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript($base_path.'/js/dropdown.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } echo $widget_code; }; break; case 'flags_name': { $widget_code = ''; if($gt_settings['wrapper_selector'] == '.gtranslate_wrapper') { $gt_settings['wrapper_selector'] = '#gt-wrapper-' . $module->id; $widget_code .= '<div class="gtranslate_wrapper" id="gt-wrapper-' . $module->id . '"></div>'; } if(!empty($gt_settings['custom_domains'])) $gt_settings['custom_domains'] = json_decode($gt_settings['custom_domains']); $uri = Uri::getInstance(); $document = Factory::getDocument(); $orig_url = $uri->getPath(); $orig_domain = $uri->getHost(); if($settings['enable_cdn']) { $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript('https://cdn.gtranslate.net/widgets/latest/fn.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } else { $base_path = JURI::root() . 'media/mod_gtranslate'; $gt_settings['flags_location'] = $base_path . '/flags/'; $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript($base_path.'/js/fn.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } echo $widget_code; }; break; case 'flags_code': { $widget_code = ''; if($gt_settings['wrapper_selector'] == '.gtranslate_wrapper') { $gt_settings['wrapper_selector'] = '#gt-wrapper-' . $module->id; $widget_code .= '<div class="gtranslate_wrapper" id="gt-wrapper-' . $module->id . '"></div>'; } if(!empty($gt_settings['custom_domains'])) $gt_settings['custom_domains'] = json_decode($gt_settings['custom_domains']); $uri = Uri::getInstance(); $document = Factory::getDocument(); $orig_url = $uri->getPath(); $orig_domain = $uri->getHost(); if($settings['enable_cdn']) { $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript('https://cdn.gtranslate.net/widgets/latest/fc.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } else { $base_path = JURI::root() . 'media/mod_gtranslate'; $gt_settings['flags_location'] = $base_path . '/flags/'; $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript($base_path.'/js/fc.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } echo $widget_code; }; break; case 'lang_names': { $widget_code = ''; if($gt_settings['wrapper_selector'] == '.gtranslate_wrapper') { $gt_settings['wrapper_selector'] = '#gt-wrapper-' . $module->id; $widget_code .= '<div class="gtranslate_wrapper" id="gt-wrapper-' . $module->id . '"></div>'; } if(!empty($gt_settings['custom_domains'])) $gt_settings['custom_domains'] = json_decode($gt_settings['custom_domains']); $uri = Uri::getInstance(); $document = Factory::getDocument(); $orig_url = $uri->getPath(); $orig_domain = $uri->getHost(); if($settings['enable_cdn']) { $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript('https://cdn.gtranslate.net/widgets/latest/ln.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } else { $base_path = JURI::root() . 'media/mod_gtranslate'; $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript($base_path.'/js/ln.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } echo $widget_code; }; break; case 'lang_codes': { $widget_code = ''; if($gt_settings['wrapper_selector'] == '.gtranslate_wrapper') { $gt_settings['wrapper_selector'] = '#gt-wrapper-' . $module->id; $widget_code .= '<div class="gtranslate_wrapper" id="gt-wrapper-' . $module->id . '"></div>'; } if(!empty($gt_settings['custom_domains'])) $gt_settings['custom_domains'] = json_decode($gt_settings['custom_domains']); $uri = Uri::getInstance(); $document = Factory::getDocument(); $orig_url = $uri->getPath(); $orig_domain = $uri->getHost(); if($settings['enable_cdn']) { $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript('https://cdn.gtranslate.net/widgets/latest/lc.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } else { $base_path = JURI::root() . 'media/mod_gtranslate'; $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript($base_path.'/js/lc.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } echo $widget_code; }; break; case 'globe': { $widget_code = ''; if($gt_settings['wrapper_selector'] == '.gtranslate_wrapper') { $gt_settings['wrapper_selector'] = '#gt-wrapper-' . $module->id; $widget_code .= '<div class="gtranslate_wrapper" id="gt-wrapper-' . $module->id . '"></div>'; } if(!empty($gt_settings['custom_domains'])) $gt_settings['custom_domains'] = json_decode($gt_settings['custom_domains']); $uri = Uri::getInstance(); $document = Factory::getDocument(); $orig_url = $uri->getPath(); $orig_domain = $uri->getHost(); if($settings['enable_cdn']) { $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript('https://cdn.gtranslate.net/widgets/latest/globe.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } else { $base_path = JURI::root() . 'media/mod_gtranslate'; $gt_settings['flags_location'] = $base_path . '/flags/svg/'; $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript($base_path.'/js/globe.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } echo $widget_code; }; break; case 'popup': { $widget_code = ''; if($gt_settings['wrapper_selector'] == '.gtranslate_wrapper') { $gt_settings['wrapper_selector'] = '#gt-wrapper-' . $module->id; $widget_code .= '<div class="gtranslate_wrapper" id="gt-wrapper-' . $module->id . '"></div>'; } if(!empty($gt_settings['custom_domains'])) $gt_settings['custom_domains'] = json_decode($gt_settings['custom_domains']); $uri = Uri::getInstance(); $document = Factory::getDocument(); $orig_url = $uri->getPath(); $orig_domain = $uri->getHost(); if($settings['enable_cdn']) { $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript('https://cdn.gtranslate.net/widgets/latest/popup.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } else { $base_path = JURI::root() . 'media/mod_gtranslate'; $gt_settings['flags_location'] = $base_path . '/flags/'; $document->addScriptDeclaration("window.gtranslateSettings = window.gtranslateSettings || {};window.gtranslateSettings['" . $module->id . "'] = " . json_encode($gt_settings) . ";"); $document->addScript($base_path.'/js/popup.js', array(), array('data-gt-orig-url' => $orig_url, 'data-gt-orig-domain' => $orig_domain, 'data-gt-widget-id' => $module->id, 'defer' => 'defer')); } echo $widget_code; }; break; default: echo 'unknown widget look'; break; }
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка