* @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ if (!defined('_CAN_LOAD_FILES_')) exit; class GAdsense extends Module { function __construct() { $this->name = 'gadsense'; $this->tab = 'advertising_marketing'; $this->version = '1.1'; $this->author = 'PrestaShop'; $this->displayName = $this->l('Google Adsense'); parent::__construct(); if ($this->id AND !Configuration::get('GADSENSE_ID')) $this->warning = $this->l('You have not yet set your Google Adsense code'); $this->description = $this->l('Integrate Google Adsense script into your shop'); $this->confirmUninstall = $this->l('Are you sure you want to delete your details ?'); } function install() { if (!parent::install() OR !$this->registerHook('home')) return false; return true; } function uninstall() { if (!Configuration::deleteByName('GADSENSE_ID') OR !parent::uninstall()) return false; return true; } public function getContent() { $output = '