| Server IP : 46.105.57.169 / Your IP : 216.73.216.144 Web Server : Apache System : Linux webd003.cluster120.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 : maitricfuz ( 93378) PHP Version : 8.4.10 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/maitricfuz/www/saint-martin-lg/plugins/maximenuck/adsmanager/ |
Upload File : |
<?php
/**
* @copyright Copyright (C) 2020 Cédric KEIFLIN alias ced1870
* https://www.template-creator.com
* https://www.joomlack.fr
* @license GNU/GPL
* */
defined('_JEXEC') or die('Restricted access');
jimport('joomla.event.plugin');
class plgMaximenuckAdsmanager extends \Joomla\CMS\Plugin\CMSPlugin {
private $type = 'adsmanager';
private $shallLoad = true;
function __construct(&$subject, $params) {
// does not load if the component is not installed
$this->shallLoad = file_exists(JPATH_SITE . '/administrator/components/com_adsmanager');
if (! $this->shallLoad)
return;
parent::__construct($subject, $params);
}
/*
* Initiate the lugin load
*
* Return mixed
*/
function registerListeners() {
if ($this->shallLoad === true) {
parent::registerListeners();
} else {
return false;
}
}
/*
* Send the infos in the source list to add the type in the plugin options
*
* Return string the source type
*/
public function onMaximenuckGetSourceName() {
$this->loadLanguage();
return $this->type;
}
/*
* Send the infos in the source list to add the type in the plugin options
*
* Return string the source type
*/
public function onMaximenuckGetTypeName() {
$this->loadLanguage();
return $this->type;
}
/*
* Display the html code for the item to be used into the frontend page
* @param string the item object from simple_html_dom
*
* Return String the html code
*/
public function onMaximenuckRenderItemAdsmanager($item) {
require_once(__DIR__ . '/helper/helper_' . $this->type . '.php');
$adsmanager = MaximenuckHelpersourceAdsmanager::getItems($item->params);
$html = '<ul class="maximenuck2">';
foreach ($adsmanager as $article) {
$article->level = $item->level;
$article->type = 'article';
$html .= Maximenuck\Helperfront::getHtmlItem($article);
}
$html .= '</ul>';
return $html;
}
}