PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/jairosvt/public_html/afmediosc/plugins/system/
Server: Linux server2.noticiasdecolima.com 4.18.0-553.30.1.el8_10.x86_64 #1 SMP Tue Nov 26 02:30:26 EST 2024 x86_64
IP: 107.161.180.42
Choose File :

Url:
Dir : /home/jairosvt/public_html/afmediosc/plugins/system/plg_japopup.php

<?php
/*
# ------------------------------------------------------------------------
# JA Popup plugin for Joomla 1.5
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

defined( '_JEXEC' ) or die();
jimport( 'joomla.plugin.plugin' );
jimport('joomla.application.module.helper');
// Import library dependencies
jimport( 'joomla.event.plugin' );

/**
 * JAPopup Content Plugin
 *
 * @package		Joomla
 * @subpackage	Content
 * @since 		1.5
 */
class plgSystemPlg_JAPopup extends JPlugin
{

	/** @var object $_modalObject  */
	var $_modalObject;
	var $_params;
	
	function plgSystemPlg_JAPopup( &$subject ){
		parent::__construct( $subject );

		// load plugin parameters
		$this->_plugin = JPluginHelper::getPlugin( 'system', 'plg_japopup' );
		$this->_params = new JParameter( $this->_plugin->params );
		// Get modal window type
		$modalWindowType = $this->_params->get("group1", "fancybox");
		
		// Require library for each Popup type
		require_once(dirname( __FILE__ ).'/plg_japopup/popupHelper.php');
		if (!file_exists(dirname( __FILE__ ).'/plg_japopup/'.$modalWindowType.'/'.$modalWindowType.'.php')) return;
		require_once( dirname( __FILE__ ).'/plg_japopup/'.$modalWindowType.'/'.$modalWindowType.'.php');
		$modalWindowType		= $modalWindowType."Class";
		$modalWindowTypeObject 	= new $modalWindowType($this->_params);
		
		// Assign modal type object
		$this->_modalObject = $modalWindowTypeObject;
	}
	
	/**
	 * Popup prepare content method
	 *
	 * @param 	string		The body string content.
	 */
	function replaceContent( $bodyContent )
	{
		global $mainframe;
		// Get plugin identifier in article content
		if (JString::strpos( $bodyContent, '{japopup' ) === false){
			$HSmethodDIRECT = false;
		}else{
			$HSmethodDIRECT = true;
		}
		
		if($HSmethodDIRECT){
			require_once(dirname( __FILE__ ).'/plg_japopup/helper.php');
			$parser = new ReplaceCallbackParsers('japopup', $this->_params);
			$bodyContent = $parser->parse($bodyContent, array($this->_modalObject, 'getContent', 'getHeaderLibrary'));
		}
		return $bodyContent;
	}
	
	function onAfterRender()
	{
		// Return if page is not html
		global $mainframe;
		
		if ( $mainframe->isAdmin() ) { return; }
		
		if (!isset($this->_plugin)) return;
		
		$_body = JResponse::getBody();
		
		// Replace {japopup} tag by appropriate content to show popup
		$_body = $this->replaceContent($_body);
		
		if ( $_body ) {
			JResponse::setBody( $_body );
		}
		return true;
	}
}
?>