| Server IP : 54.36.91.62 / Your IP : 216.73.217.117 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/vesoul/plugins/system/djclassifiedsyt/ |
Upload File : |
<?php
/**
* @package DJ-Extensions-DJClassifiedsYt-module
* @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
* @license http://www.gnu.org/licenses GNU/GPL
* @author url: http://dj-extensions.com
* @author email contact@m.herzberg
*/
defined('_JEXEC') or die;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Uri\Uri;
use YOOtheme\Application;
use YOOtheme\Path;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
if(ComponentHelper::isEnabled('com_djclassifieds') && file_exists(JPATH_ROOT.'/administrator/components/com_djclassifieds/loader.php')){
require_once(JPATH_ROOT.'/administrator/components/com_djclassifieds/loader.php');
}
class plgSystemDjclassifiedsyt extends CMSPlugin
{
protected $autoloadLanguage = true;
public function __construct(&$subject, $config = array())
{
if(!ComponentHelper::isEnabled('com_djclassifieds') || !file_exists(JPATH_ROOT.'/administrator/components/com_djclassifieds/loader.php')){
return false;
}
parent::__construct($subject, $config);
$this->loadLanguage();
DJClassifiedsTheme::loadLanguage();
DJClassifiedsTheme::loadAdminLanguage();
}
public function onAfterRoute()
{
if (class_exists(Application::class, false)) {
$app = Application::getInstance();
$doc = Factory::getDocument();
$root = __DIR__;
$rootUrl = Uri::root(true);
Path::setAlias('~djclassifiedsyt', $root);
Path::setAlias('~djclassifiedsyt_url', $rootUrl . '/plugins/system/djclassifiedsyt');
$doc->addScript(Uri::root() . 'plugins/system/djclassifiedsyt/assets/js/script.js');
$doc->addStylesheet(Uri::root() . 'plugins/system/djclassifiedsyt/assets/css/style.css');
// Detect YOOtheme version from templateDetails.xml manifest file
$isV5 = false;
$manifestFile = JPATH_ROOT . '/templates/yootheme/templateDetails.xml';
if (file_exists($manifestFile)) {
$xml = simplexml_load_file($manifestFile);
if ($xml && isset($xml->version)) {
$version = (string) $xml->version;
$isV5 = version_compare($version, '5.0', '>=');
}
}
define('DJCLASSIFIEDS_YOOTHEME_IS_V5', $isV5);
require_once __DIR__ . '/vendor/autoload.php';
$app->load('~djclassifiedsyt/modules/{builder-joomla-source,builder,form}/bootstrap.php');
}
}
}