| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/Engineering/V2/plugins/content/ |
Upload File : |
<?php
/**
* GlossyAccordionMenu plugin
* This plugin allows you to insert the Glossy Accordion Menu
* with the tags {Glossy_Accordion_Menu} ... {/Glossy_Accordion_Menu}.
* Author: kksou
* Copyright (C) 2006-2008. kksou.com. All Rights Reserved
* Website: http://www.kksou.com/php-gtk2
* v1.5 October 3, 2008
* v1.52 October 7, 2008 You can now easily change the style of the menu (including font style, size, foreground color, background color, etc.) by editing the css file directly. The css file is located in the folder mambots/content/GlossyAccordionMenu for Joomla 1.0, and plugins/content/GlossyAccordionMenu for Joomla 1.5.
* v1.53 December 9, 2008
- Fixed the warning message "Undefined variable: module on line 43"
- Fixed the warning message "Undefined offset: 0 on line 55"
*/
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );
jimport( 'joomla.event.plugin' );
$lib = dirname(__FILE__).'/GlossyAccordionMenu/ddAccordionMenu.lib.php';
$lib2 = dirname(__FILE__).'/GlossyAccordionMenu/GlossyAccordionMenu.lib.php';
require_once($lib);
require_once($lib2);
class plgContentGlossyAccordionMenu extends JPlugin {
function plgContentGlossyAccordionMenu( &$subject, $params ) {
parent::__construct( $subject, $params );
}
function onPrepareContent( &$row, &$params, $limitstart=0 ) {
$plugin = new Plugin_GlossyAccordionMenu($row);
return true;
}
}
class Plugin_GlossyAccordionMenu extends GlossyAccordionMenu_base {
function Plugin_GlossyAccordionMenu( &$row ) {
$regex = '%\{Glossy_Accordion_Menu\s*(.*?)\s*\}(\n|\r\n|</p>|<p>| |<br\s/>)*(.*?)(\n|\r\n|</p>|<p>| |<br\s/>)*\{/Glossy_Accordion_Menu\}%is';
$module = 'GlossyAccordionMenu';
$this->get_param($module, '1.5');
$plugin =& JPluginHelper::getPlugin('content', $module);
$pluginParams = new JParameter( $plugin->params );
if ( !$pluginParams->get( 'enabled', 1 ) ) {
$row->text = preg_replace( $regex, '', $row->text );
return true;
}
$contents = $row->text;
if (preg_match_all( $regex, $contents, $matches_array, PREG_SET_ORDER )) {
$count = count( $matches_array[0] );
if ($count==0) return true;
foreach($matches_array as $matches) {
$this->process($row, $matches);
}
#$row->text = preg_replace( $regex, '', $row->text );
}
return true;
}
}
?>