<?php

lt_include(PLOG_CLASS_PATH.'class/plugin/pluginbase.class.php');

class PluginGoogleAdsense extends PluginBase
{
    var $pluginEnabled;
    var $client;
    var $contentEnabled;
    var $contentWidth;
    var $contentHeight;
    var $contentSlot;

    var $searchEnabled;

    function PluginGoogleAdsense($source = "")
    {
        $this->PluginBase($source);
        $this->id = 'googleadsense';
        $this->author = 'twu2 - andy collins';
        $this->desc = "This plugin offers features to support google adsense.";
        $this->version = '20080924';
        $this->locales = array('en_UK', '');
	if ($source == "admin")
            $this->initAdmin();
    }

    function initAdmin()
    {
        $this->registerAdminAction('googleadsense', 'PluginGoogleAdsenseConfigAction');
        $this->registerAdminAction('updategoogleadsense', 'PluginGoogleAdsenseUpdateConfigAction');
        $menu =& Menu::getMenu();
        $this->addMenuEntry('/menu/controlCenter/manageSettings', 'GoogleAdsense', '?op=googleadsense');
    }

    function register()
	{
        $blogSettings = $this->blogInfo->getSettings();
        $this->pluginEnabled = $blogSettings->getValue('plugin_googleadsense_enabled');

        $this->client = $blogSettings->getValue('plugin_googleadsense_client');
        $this->contentEnabled = $blogSettings->getValue('plugin_googleadsense_content_enabled');
        $this->contentWidth = $blogSettings->getValue('plugin_googleadsense_content_width');
        $this->contentHeight = $blogSettings->getValue('plugin_googleadsense_content_height');
        $this->contentSlot = $blogSettings->getValue('plugin_googleadsense_content_slot');
        




    }

    function isEnabled()
    {
        return $this->pluginEnabled;
    }

    // return Client ID
    function getClient()
    {
        return $this->client;
    }

    // content
    function isContentEnabled()
    {
        return $this->contentEnabled;
    }

    function getContentWidth()
    {
        return $this->contentWidth;
    }

    function getContentHeight()
    {
        return $this->contentHeight;
    }

    function getContentSlot()
    {
        return $this->contentSlot;
    }

    


}

?>
