PATH:
home
/
centosnipponia
/
public_html
/
nipponiacom2
/
libraries
/
regularlabs
/
fields
<?php /** * @package Regular Labs Library * @version 19.2.10100 * * @author Peter van Westen <info@regularlabs.com> * @link http://www.regularlabs.com * @copyright Copyright © 2019 Regular Labs All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; use Joomla\CMS\Factory as JFactory; use Joomla\CMS\Language\Text as JText; use RegularLabs\Library\RegEx as RL_RegEx; jimport('joomla.form.formfield'); if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')) { return; } require_once JPATH_LIBRARIES . '/regularlabs/autoload.php'; class JFormFieldRL_Dependency extends \RegularLabs\Library\Field { public $type = 'Dependency'; protected function getLabel() { return ''; } protected function getInput() { if ($file = $this->get('file')) { $label = $this->get('label', 'the main extension'); RLFieldDependency::setMessage($file, $label); return ''; } $path = ($this->get('path') == 'site') ? '' : '/administrator'; $label = $this->get('label'); $file = $this->get('alias', $label); $file = RL_RegEx::replace('[^a-z-]', '', strtolower($file)); $extension = $this->get('extension'); switch ($extension) { case 'com'; $file = $path . '/components/com_' . $file . '/com_' . $file . '.xml'; break; case 'mod'; $file = $path . '/modules/mod_' . $file . '/mod_' . $file . '.xml'; break; default: $file = '/plugins/' . str_replace('plg_', '', $extension) . '/' . $file . '.xml'; break; } $label = JText::_($label) . ' (' . JText::_('RL_' . strtoupper($extension)) . ')'; RLFieldDependency::setMessage($file, $label); return ''; } } class RLFieldDependency { static function setMessage($file, $name) { jimport('joomla.filesystem.file'); $file = str_replace('\\', '/', $file); if (strpos($file, '/administrator') === 0) { $file = str_replace('/administrator', JPATH_ADMINISTRATOR, $file); } else { $file = JPATH_SITE . '/' . $file; } $file = str_replace('//', '/', $file); $file_alt = RL_RegEx::replace('(com|mod)_([a-z-_]+\.)', '\2', $file); if ( ! JFile::exists($file) && ! JFile::exists($file_alt)) { $msg = JText::sprintf('RL_THIS_EXTENSION_NEEDS_THE_MAIN_EXTENSION_TO_FUNCTION', JText::_($name)); $message_set = 0; $messageQueue = JFactory::getApplication()->getMessageQueue(); foreach ($messageQueue as $queue_message) { if ($queue_message['type'] == 'error' && $queue_message['message'] == $msg) { $message_set = 1; break; } } if ( ! $message_set) { JFactory::getApplication()->enqueueMessage($msg, 'error'); } } } }
[+]
..
[-] accesslevel.php
[edit]
[-] agents.php
[edit]
[-] ajax.php
[edit]
[-] akeebasubs.php
[edit]
[-] assignmentselection.php
[edit]
[-] block.php
[edit]
[-] checkbox.php
[edit]
[-] codeeditor.php
[edit]
[-] color.php
[edit]
[-] colorpicker.php
[edit]
[-] components.php
[edit]
[-] conditionselection.php
[edit]
[-] content.php
[edit]
[-] customfieldkey.php
[edit]
[-] customfieldvalue.php
[edit]
[-] datetime.php
[edit]
[-] dependency.php
[edit]
[-] easyblog.php
[edit]
[-] editor.php
[edit]
[-] filelist.php
[edit]
[-] flexicontent.php
[edit]
[-] form2content.php
[edit]
[-] geo.php
[edit]
[-] grouplevel.php
[edit]
[-] header.php
[edit]
[-] header_library.php
[edit]
[-] hikashop.php
[edit]
[-] hr.php
[edit]
[-] icons.php
[edit]
[-] isinstalled.php
[edit]
[-] k2.php
[edit]
[-] key.php
[edit]
[-] languages.php
[edit]
[-] license.php
[edit]
[-] list.php
[edit]
[-] loadlanguage.php
[edit]
[-] menuitems.php
[edit]
[-] mijoshop.php
[edit]
[-] modules.php
[edit]
[-] multiselect.php
[edit]
[-] note.php
[edit]
[-] onlypro.php
[edit]
[-] password.php
[edit]
[-] plaintext.php
[edit]
[-] radioimages.php
[edit]
[-] redshop.php
[edit]
[-] regions.txt
[edit]
[-] showon.php
[edit]
[-] simplecategories.php
[edit]
[-] slide.php
[edit]
[-] tags.php
[edit]
[-] templates.php
[edit]
[-] text.php
[edit]
[-] textareaplus.php
[edit]
[-] toggler.php
[edit]
[-] users.php
[edit]
[-] version.php
[edit]
[-] virtuemart.php
[edit]
[-] zoo.php
[edit]
[-] .htaccess.disabled
[edit]