diff --git a/deployed/EUCookieDirectiveLite/plugins/system/EUCookieDirectiveLite/EUCookieDirectiveLite.php b/deployed/EUCookieDirectiveLite/plugins/system/EUCookieDirectiveLite/EUCookieDirectiveLite.php new file mode 100644 index 00000000..0bb774a9 --- /dev/null +++ b/deployed/EUCookieDirectiveLite/plugins/system/EUCookieDirectiveLite/EUCookieDirectiveLite.php @@ -0,0 +1,166 @@ +EU Cookie Directive. +Version: 1.0.5 +Author: Channel Computing +Author URI: http://www.channelcomputing.co.uk + +Copyright (C) 2011-2012, Channel Computing +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +// no direct access +defined( '_JEXEC' ) or die( 'Restricted access' ); + +jimport( 'joomla.plugin.plugin' ); + +/** + * Joomla! EU Cookie Directive plugin + * + * @package Joomla + * @subpackage System + */ +class plgSystemEUCookieDirectiveLite extends JPlugin +{ + /** + * Constructor + * + * For php4 compatability we must not use the __constructor as a constructor for plugins + * because func_get_args ( void ) returns a copy of all passed arguments NOT references. + * This causes problems with cross-referencing necessary for the observer design pattern. + * + * @access protected + * @param object $subject The object to observe + * @param array $config An array that holds the plugin configuration + * @since 1.0 + */ + function plgSystemEUCookieDirectiveLite(& $subject, $config) + { + parent::__construct($subject, $config); + + } + + /** + * Start the output + * + */ + function onAfterRender() + { + + global $mainframe, $database; + + //get Params + $message = $this->params->get('warningMessage', ''); + $privacyLink = $this->params->get('detailsUrl', 'index.php'); + $width = $this->params->get('width', '0'); + + //deal with the width options + if ($width == "0") { + $width = "100%"; + } else { + $width = $width . "px"; + } + + $document = JFactory::getDocument(); + $doctype = $document->getType(); + $app = JFactory::getApplication(); + + $ICON_FOLDER = JURI::root() . 'plugins/system/EUCookieDirectiveLite/EUCookieDirectiveLite/images/'; + + if ( $app->getClientId() === 0 ) { + + $strOutputHTML = ""; + $style = ''; + + $hide = "\n".''."\n"; + + //Define paths for portability + //$SCRIPTS_FOLDER = JURI::root() . 'plugins/system/EUCookieDirective/'; + $SCRIPTS_FOLDER = JURI::root() . 'plugins/system/EUCookieDirectiveLite/EUCookieDirectiveLite/'; + $cookiescript = ''."\n"; + + $strOutputHTML = ""; + $strOutputHTML .= '