* @link https://www.eshiol.it * @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved * @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3 * J2XML is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License * or other free or open source software licenses. */ // no direct access defined('_JEXEC') or die(); JHTML::_('behavior.tooltip'); jimport('joomla.language.language'); $data = file_get_contents(JPATH_COMPONENT_ADMINISTRATOR . '/j2xml.xml'); $xml = simplexml_load_string($data); $title = JText::_('Welcome_to_j2xml'); jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); $exts = array(); $version = new \JVersion(); $libraries = '/libraries' . ($version->isCompatible('3.9') ? '/eshiol' : ''); $files = array(); if ($version->isCompatible('3.9')) { if (JFolder::exists(JPATH_MANIFESTS . '/libraries/eshiol')) { $libraries = JFolder::files(JPATH_MANIFESTS . '/libraries/eshiol'); foreach ($libraries as $library) { $files[] = JPATH_MANIFESTS . '/libraries/eshiol/' . $library; } } } else { $files[] = JPATH_MANIFESTS . '/libraries/eshiol.xml'; $files[] = JPATH_MANIFESTS . '/libraries/j2xml.xml'; $files[] = JPATH_MANIFESTS . '/libraries/j2xmlpro.xml'; $files[] = JPATH_MANIFESTS . '/libraries/phpxmlrpc.xml'; } $files[] = JPATH_SITE . '/plugins/system/j2xml/j2xml.xml'; $files[] = JPATH_SITE . '/plugins/content/setimages/setimages.xml'; $files[] = JPATH_SITE . '/plugins/content/j2xml/j2xml.xml'; $files[] = JPATH_SITE . '/plugins/content/j2xmlgi/j2xmlgi.xml'; $files[] = JPATH_SITE . '/plugins/content/j2xmlredirect/j2xmlredirect.xml'; if (JFolder::exists(JPATH_SITE . '/plugins/j2xml')) { $plugins = JFolder::folders(JPATH_SITE . '/plugins/j2xml'); foreach ($plugins as $plugin) { $files[] = JPATH_SITE . '/plugins/j2xml/' . $plugin . '/' . $plugin . '.xml'; } } $lang = JFactory::getLanguage(); foreach ($files as $file) { if (JFile::exists($file)) { $xml = JFactory::getXML($file); if ($xml) { if ($xml->getName() == 'extension') { $extension = pathinfo($file, PATHINFO_FILENAME); $attr = $xml->attributes(); if ($attr['type'] == 'plugin') { $lang->load('plg_' . $attr['group'] . '_' . $extension); } else if ($attr['type'] = 'library') { $lang->load('lib_' . $extension); } $exts = $exts + array( JText::_((string) $xml->name) . // .' '.ucfirst($attr['group']) ' ' . ucfirst($attr['type']) => (string) $xml->version ); } } } } ?>