[pLog-svn] r6797 - in plugins/branches/lifetype-1.2/googleadsense: . class/action class/view locale templates

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Fri Feb 13 16:07:13 EST 2009


Author: jondaley
Date: 2009-02-13 16:07:12 -0500 (Fri, 13 Feb 2009)
New Revision: 6797

Modified:
   plugins/branches/lifetype-1.2/googleadsense/class/action/plugingoogleadsenseupdateconfigaction.class.php
   plugins/branches/lifetype-1.2/googleadsense/class/view/plugingoogleadsenseconfigview.class.php
   plugins/branches/lifetype-1.2/googleadsense/locale/locale_en_UK.php
   plugins/branches/lifetype-1.2/googleadsense/plugingoogleadsense.class.php
   plugins/branches/lifetype-1.2/googleadsense/readme.txt
   plugins/branches/lifetype-1.2/googleadsense/templates/googleadsense.template
Log:
googleadsense updated by andy.  thanks

Modified: plugins/branches/lifetype-1.2/googleadsense/class/action/plugingoogleadsenseupdateconfigaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/googleadsense/class/action/plugingoogleadsenseupdateconfigaction.class.php	2009-02-13 20:56:03 UTC (rev 6796)
+++ plugins/branches/lifetype-1.2/googleadsense/class/action/plugingoogleadsenseupdateconfigaction.class.php	2009-02-13 21:07:12 UTC (rev 6797)
@@ -12,15 +12,8 @@
     var $_contentEnabled;
     var $_contentWidth;
     var $_contentHeight;
-    var $_contentFormat;
-    var $_contentType;
-    var $_contentChannel;
-    var $_suggestionEnabled;
-    var $_suggestionWidth;
-    var $_suggestionHeight;
-    var $_suggestionFormat;
-    var $_suggestionChoice;
-    var $_suggestionChannel;
+    var $_contentSlot;
+
     var $_searchEnabled;
 
 	function PluginStickyPostsUpdateConfigAction($actionInfo, $request)
@@ -44,21 +37,11 @@
         $this->_contentEnabled = ($this->_contentEnabled != '');
 		$this->_contentWidth = $this->_request->getValue('contentWidth');
 		$this->_contentHeight = $this->_request->getValue('contentHeight');
-		$this->_contentFormat = $this->_request->getValue('contentFormat');
-		$this->_contentType = $this->_request->getValue('contentType');
-		$this->_contentChannel = $this->_request->getValue('contentChannel');
+		$this->_contentSlot = $this->_request->getValue('contentSlot');
 
-		$this->_suggestionEnabled = $this->_request->getValue('suggestionEnabled');
-        $this->_suggestionEnabled = ($this->_suggestionEnabled != '');
-		$this->_suggestionWidth = $this->_request->getValue('suggestionWidth');
-		$this->_suggestionHeight = $this->_request->getValue('suggestionHeight');
-		$this->_suggestionFormat = $this->_request->getValue('suggestionFormat');
-		$this->_suggestionChoice = $this->_request->getValue('suggestionChoice');
-		$this->_suggestionChannel = $this->_request->getValue('suggestionChannel');
 
-		$this->_searchEnabled = $this->_request->getValue('searchEnabled');
-        $this->_searchEnabled = ($this->_searchEnabled != '');
 
+
 		if (count($errorMessages) > 0) {
             $this->_view = new PluginGoogleAdsenseConfigView($this->_blogInfo);
 			$allerror='';
@@ -82,18 +65,10 @@
         $blogSettings->setValue('plugin_googleadsense_content_enabled', $this->_contentEnabled);
         $blogSettings->setValue('plugin_googleadsense_content_width', $this->_contentWidth);
         $blogSettings->setValue('plugin_googleadsense_content_height', $this->_contentHeight);
-        $blogSettings->setValue('plugin_googleadsense_content_format', $this->_contentFormat);
-        $blogSettings->setValue('plugin_googleadsense_content_type', $this->_contentType);
-        $blogSettings->setValue('plugin_googleadsense_content_channel', $this->_contentChannel);
-        $blogSettings->setValue('plugin_googleadsense_suggestion_enabled', $this->_suggestionEnabled);
-        $blogSettings->setValue('plugin_googleadsense_suggestion_width', $this->_suggestionWidth);
-        $blogSettings->setValue('plugin_googleadsense_suggestion_height', $this->_suggestionHeight);
-        $blogSettings->setValue('plugin_googleadsense_suggestion_format', $this->_suggestionFormat);
-        $blogSettings->setValue('plugin_googleadsense_suggestion_choice', $this->_suggestionChoice);
-        $blogSettings->setValue('plugin_googleadsense_suggestion_channel', $this->_suggestionChannel);
-        $blogSettings->setValue('plugin_googleadsense_search_enabled', $this->_searchEnabled);
-        $this->_blogInfo->setSettings($blogSettings);
+        $blogSettings->setValue('plugin_googleadsense_content_slot', $this->_contentSlot);
 
+ 
+
         // save the blogs settings
 		$blogs = new Blogs();
         if (!$blogs->updateBlog($this->_blogInfo)) {

Modified: plugins/branches/lifetype-1.2/googleadsense/class/view/plugingoogleadsenseconfigview.class.php
===================================================================
--- plugins/branches/lifetype-1.2/googleadsense/class/view/plugingoogleadsenseconfigview.class.php	2009-02-13 20:56:03 UTC (rev 6796)
+++ plugins/branches/lifetype-1.2/googleadsense/class/view/plugingoogleadsenseconfigview.class.php	2009-02-13 21:07:12 UTC (rev 6797)
@@ -19,34 +19,19 @@
 		$contentEnabled = $blogSettings->getValue('plugin_googleadsense_content_enabled');
 		$contentWidth = $blogSettings->getValue('plugin_googleadsense_content_width');
 		$contentHeight = $blogSettings->getValue('plugin_googleadsense_content_height');
-		$contentFormat = $blogSettings->getValue('plugin_googleadsense_content_format');
-		$contentType = $blogSettings->getValue('plugin_googleadsense_content_type');
-		$contentChannel = $blogSettings->getValue('plugin_googleadsense_content_channel');
-		$suggestionEnabled = $blogSettings->getValue('plugin_googleadsense_suggestion_enabled');
-		$suggestionWidth = $blogSettings->getValue('plugin_googleadsense_suggestion_width');
-		$suggestionHeight = $blogSettings->getValue('plugin_googleadsense_suggestion_height');
-		$suggestionFormat = $blogSettings->getValue('plugin_googleadsense_suggestion_format');
-		$suggestionChoice = $blogSettings->getValue('plugin_googleadsense_suggestion_choice');
-		$suggestionChannel = $blogSettings->getValue('plugin_googleadsense_suggestion_channel');
-		$searchEnabled = $blogSettings->getValue('plugin_googleadsense_search_enabled');
+		$contentSlot = $blogSettings->getValue('plugin_googleadsense_content_slot');
 
+
 		// create a view and export the settings to the template
 		$this->setValue('pluginEnabled', $pluginEnabled);
 		$this->setValue('client', $client);
 		$this->setValue('contentEnabled', $contentEnabled);
 		$this->setValue('contentWidth', $contentWidth);
 		$this->setValue('contentHeight', $contentHeight);
-		$this->setValue('contentFormat', $contentFormat);
-		$this->setValue('contentType', $contentType);
-		$this->setValue('contentChannel', $contentChannel);
-		$this->setValue('suggestionEnabled', $suggestionEnabled);
-		$this->setValue('suggestionWidth', $suggestionWidth);
-		$this->setValue('suggestionHeight', $suggestionHeight);
-		$this->setValue('suggestionFormat', $suggestionFormat);
-		$this->setValue('suggestionChoice', $suggestionChoice);
-		$this->setValue('suggestionChannel', $suggestionChannel);
-		$this->setValue('searchEnabled', $searchEnabled);
+		$this->setValue('contentSlot', $contentSlot);
 
+
+
 		parent::render();
 	}
 }

Modified: plugins/branches/lifetype-1.2/googleadsense/locale/locale_en_UK.php
===================================================================
--- plugins/branches/lifetype-1.2/googleadsense/locale/locale_en_UK.php	2009-02-13 20:56:03 UTC (rev 6796)
+++ plugins/branches/lifetype-1.2/googleadsense/locale/locale_en_UK.php	2009-02-13 21:07:12 UTC (rev 6797)
@@ -16,29 +16,12 @@
 $messages['googleadsense_content_width'] = 'Google AdSense Content Width (google_ad_width).';
 $messages['label_content_height'] = 'Content Height (google_ad_height)';
 $messages['googleadsense_content_height'] = 'Google AdSense Content Height (google_ad_height).';
-$messages['label_content_format'] = 'Content Format (google_ad_format)';
-$messages['googleadsense_content_format'] = 'Google AdSense Content Format (google_ad_format).';
-$messages['label_content_type'] = 'Content Type (google_ad_type)';
-$messages['googleadsense_content_type'] = 'Google AdSense Content Type (google_ad_type).';
-$messages['label_content_channel'] = 'Content Channel (google_ad_channel)';
-$messages['googleadsense_content_channel'] = 'Google AdSense Content Channel (google_ad_channel).';
+$messages['label_content_slot'] = 'Content Slot (google_ad_slot)';
+$messages['googleadsense_content_slot'] = 'Google AdSense Content Slot (google_ad_slot).';
 
-$messages['label_suggestion_enable'] = 'Enable Suggestion';
-$messages['googleadsense_plugin_suggestion_enabled'] = 'Enable Google AdSense Suggestion.';
-$messages['label_suggestion_width'] = 'Suggestion Width (google_ad_width)';
-$messages['googleadsense_suggestion_width'] = 'Google AdSense Suggestion Width (google_ad_width).';
-$messages['label_suggestion_height'] = 'Suggestion Height (google_ad_height)';
-$messages['googleadsense_suggestion_height'] = 'Google AdSense Suggestion Height (google_ad_height).';
-$messages['label_suggestion_format'] = 'Suggestion Format (google_ad_format)';
-$messages['googleadsense_suggestion_format'] = 'Google AdSense Suggestion Format (google_ad_format).';
-$messages['label_suggestion_choice'] = 'Suggestion Choice (google_cpa_choice)';
-$messages['googleadsense_suggestion_choice'] = 'Google AdSense Suggestion Choice (google_cpa_choice).';
-$messages['label_suggestion_channel'] = 'Suggestion Channel (google_ad_channel)';
-$messages['googleadsense_suggestion_channel'] = 'Google AdSense Suggestion Channel (google_ad_channel).';
 
-$messages['label_search_enable'] = 'Enable Search';
-$messages['googleadsense_plugin_search_enabled'] = 'Enable Google AdSense Search.';
 
+
 $messages['googleadsense_settings_saved_ok'] = 'Google AdSense configuration update successed!';
 
 ?>

Modified: plugins/branches/lifetype-1.2/googleadsense/plugingoogleadsense.class.php
===================================================================
--- plugins/branches/lifetype-1.2/googleadsense/plugingoogleadsense.class.php	2009-02-13 20:56:03 UTC (rev 6796)
+++ plugins/branches/lifetype-1.2/googleadsense/plugingoogleadsense.class.php	2009-02-13 21:07:12 UTC (rev 6797)
@@ -9,25 +9,18 @@
     var $contentEnabled;
     var $contentWidth;
     var $contentHeight;
-    var $contentFormat;
-    var $contentType;
-    var $contentChannel;
-    var $suggestionEnabled;
-    var $suggestionWidth;
-    var $suggestionHeight;
-    var $suggestionFormat;
-    var $suggestionChoice;
-    var $suggestionChannel;
+    var $contentSlot;
+
     var $searchEnabled;
 
     function PluginGoogleAdsense($source = "")
     {
         $this->PluginBase($source);
         $this->id = 'googleadsense';
-        $this->author = 'twu2';
+        $this->author = 'twu2 - andy collins';
         $this->desc = "This plugin offers features to support google adsense.";
-        $this->version = '20070321';
-        $this->locales = array('en_UK', 'zh_TW');
+        $this->version = '20080924';
+        $this->locales = array('en_UK', '');
 	if ($source == "admin")
             $this->initAdmin();
     }
@@ -46,22 +39,15 @@
         $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->contentFormat = $blogSettings->getValue('plugin_googleadsense_content_format');
-        $this->contentType = $blogSettings->getValue('plugin_googleadsense_content_type');
-        $this->contentChannel = $blogSettings->getValue('plugin_googleadsense_content_channel');
+        $this->contentSlot = $blogSettings->getValue('plugin_googleadsense_content_slot');
+        
 
-        $this->suggestionEnabled = $blogSettings->getValue('plugin_googleadsense_suggestion_enabled');
-        $this->suggestionWidth = $blogSettings->getValue('plugin_googleadsense_suggestion_width');
-        $this->suggestionHeight = $blogSettings->getValue('plugin_googleadsense_suggestion_height');
-        $this->suggestionFormat = $blogSettings->getValue('plugin_googleadsense_suggestion_format');
-        $this->suggestionChoice = $blogSettings->getValue('plugin_googleadsense_suggestion_choice');
-        $this->suggestionChannel = $blogSettings->getValue('plugin_googleadsense_suggestion_channel');
 
-        $this->searchEnabled = $blogSettings->getValue('plugin_googleadsense_search_enabled');
+
+
     }
 
     function isEnabled()
@@ -91,57 +77,14 @@
         return $this->contentHeight;
     }
 
-    function getContentFormat()
+    function getContentSlot()
     {
-        return $this->contentFormat;
+        return $this->contentSlot;
     }
 
-    function getContentType()
-    {
-        return $this->contentType;
-    }
+    
 
-    function getContentChannel()
-    {
-        return $this->contentChannel;
-    }
 
-    // suggestion
-    function isSuggestionEnabled()
-    {
-        return $this->suggestionEnabled;
-    }
-
-    function getSuggestionWidth()
-    {
-        return $this->suggestionWidth;
-    }
-
-    function getSuggestionHeight()
-    {
-        return $this->suggestionHeight;
-    }
-
-    function getSuggestionFormat()
-    {
-        return $this->suggestionFormat;
-    }
-
-    function getSuggestionChoice()
-    {
-        return $this->suggestionChoice;
-    }
-
-    function getSuggestionChannel()
-    {
-        return $this->suggestionChannel;
-    }
-
-    // search
-    function isSearchEnabled()
-    {
-        return $this->searchEnabled;
-    }
 }
 
 ?>

Modified: plugins/branches/lifetype-1.2/googleadsense/readme.txt
===================================================================
--- plugins/branches/lifetype-1.2/googleadsense/readme.txt	2009-02-13 20:56:03 UTC (rev 6796)
+++ plugins/branches/lifetype-1.2/googleadsense/readme.txt	2009-02-13 21:07:12 UTC (rev 6797)
@@ -1,4 +1,4 @@
-Google AdSense Plugin v0.2
+Google AdSense Plugin v0.3
 
 Description
 Offer setting for Google AdSense in LifeType.
@@ -11,7 +11,7 @@
 1.Enter admin page, goto control center -> Google Adsense.
 2.Enable this plugin and fill in you client code, and detial setting for content, suggestion and search of Google AdSense.
 
-Tempalte
+place the following in your Template - such as the navigation bar
 1. Content
 
 {if $googleadsense && $googleadsense->isContentEnabled()}
@@ -19,36 +19,14 @@
 google_ad_client = "{$googleadsense->getClient()}";
 google_ad_width = {$googleadsense->getContentWidth()};
 google_ad_height = {$googleadsense->getContentHeight()};
-google_ad_format = "{$googleadsense->getContentFormat()}";
-google_ad_type = "{$googleadsense->getContentType()}";
-google_ad_channel = "{$googleadsense->getContentChannel()}";
+google_ad_slot = "{$googleadsense->getContentSlot()}";
 //--></script>
 <script type="text/javascript"
   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
 </script>
 {/if}
 
-2. Suggestion
 
-{if $googleadsense && $googleadsense->isSuggestionEnabled()}
-<script type="text/javascript"><!--
-google_ad_client = "{$googleadsense->getClient()}";
-google_ad_width = {$googleadsense->getSuggestionWidth()};
-google_ad_height = {$googleadsense->getSuggestionHeight()};
-google_ad_format = "{$googleadsense->getSuggestionFormat()}";
-google_cpa_choice = "{$googleadsense->getSuggestionChoice()}";
-google_ad_channel = "{$googleadsense->getSuggestionChannel()}";
-//--></script>
-<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
-</script>
-{/if}
 
-3. Search
-{if $googleadsense && $googleadsense->isSearchEnabled()}
-<!--
-copy and paste search code here, just change the client value like
-<input type="hidden" name="client" value="{$googleadsense->getClient()}"></input>
--->
-{/if}
 
-Of course, you must get a google adsense account first. :P
+Of course, you must get a google adsense account first. :)

Modified: plugins/branches/lifetype-1.2/googleadsense/templates/googleadsense.template
===================================================================
--- plugins/branches/lifetype-1.2/googleadsense/templates/googleadsense.template	2009-02-13 20:56:03 UTC (rev 6796)
+++ plugins/branches/lifetype-1.2/googleadsense/templates/googleadsense.template	2009-02-13 21:07:12 UTC (rev 6797)
@@ -43,70 +43,16 @@
   </div>
 
   <div class="field">
-   <label for="contentFormat">{$locale->tr("label_content_format")}</label>
-   <div class="formHelp">{$locale->tr("googleadsense_content_format")}</div>
-   <input class="text" type="text" name="contentFormat" id="contentFormat" value="{$contentFormat}" width="30" />
+   <label for="contentSlot">{$locale->tr("label_content_slot")}</label>
+   <div class="formHelp">{$locale->tr("googleadsense_content_slot")}</div>
+   <input class="text" type="text" name="contentSlot" id="contentSlot" value="{$contentSlot}" width="30" />
   </div>
 
-  <div class="field">
-   <label for="contentType">{$locale->tr("label_content_type")}</label>
-   <div class="formHelp">{$locale->tr("googleadsense_content_type")}</div>
-   <input class="text" type="text" name="contentType" id="contentType" value="{$contentType}" width="30" />
-  </div>
 
-  <div class="field">
-   <label for="contentChannel">{$locale->tr("label_content_channel")}</label>
-   <div class="formHelp">{$locale->tr("googleadsense_content_channel")}</div>
-   <input class="text" type="text" name="contentChannel" id="contentChannel" value="{$contentChannel}" width="30" />
-  </div>
 
-  <!-- suggestion -->
-  <div class="field">
-   <label for="suggestionEnabled">{$locale->tr("label_suggestion_enable")}</label>
-   <span class="required"></span>
-   <div class="formHelp">
-    <input class="checkbox" type="checkbox" name="suggestionEnabled" id="suggestionEnabled" {if $suggestionEnabled} checked="checked" {/if} value="1" />{$locale->tr("googleadsense_plugin_suggestion_enabled")}
-   </div>
-  </div>
 
-  <div class="field">
-   <label for="suggestionWidth">{$locale->tr("label_suggestion_width")}</label>
-   <div class="formHelp">{$locale->tr("googleadsense_suggestion_width")}</div>
-   <input class="text" type="text" name="suggestionWidth" id="suggestionWidth" value="{$suggestionWidth}" width="5" />
+  
   </div>
-
-  <div class="field">
-   <label for="suggestionHeight">{$locale->tr("label_suggestion_height")}</label>
-   <div class="formHelp">{$locale->tr("googleadsense_suggestion_height")}</div>
-   <input class="text" type="text" name="suggestionHeight" id="suggestionHeight" value="{$suggestionHeight}" width="5" />
-  </div>
-
-  <div class="field">
-   <label for="suggestionFormat">{$locale->tr("label_suggestion_format")}</label>
-   <div class="formHelp">{$locale->tr("googleadsense_suggestion_format")}</div>
-   <input class="text" type="text" name="suggestionFormat" id="suggestionFormat" value="{$suggestionFormat}" width="30" />
-  </div>
-
-  <div class="field">
-   <label for="suggestionChoice">{$locale->tr("label_suggestion_choice")}</label>
-   <div class="formHelp">{$locale->tr("googleadsense_suggestion_choice")}</div>
-   <input class="text" type="text" name="suggestionChoice" id="suggestionChoice" value="{$suggestionChoice}" width="30" />
-  </div>
-
-  <div class="field">
-   <label for="suggestionChannel">{$locale->tr("label_suggestion_channel")}</label>
-   <div class="formHelp">{$locale->tr("googleadsense_suggestion_channel")}</div>
-   <input class="text" type="text" name="suggestionChannel" id="suggestionChannel" value="{$suggestionChannel}" width="30" />
-  </div>
-
-  <!-- search -->
-  <div class="field">
-   <label for="searchEnabled">{$locale->tr("label_search_enable")}</label>
-   <span class="required"></span>
-   <div class="formHelp">
-    <input class="checkbox" type="checkbox" name="searchEnabled" id="searchEnabled" {if $searchEnabled} checked="checked" {/if} value="1" />{$locale->tr("googleadsense_plugin_search_enabled")}
-   </div>
-  </div>
  </div>
 
  <div class="buttons">



More information about the pLog-svn mailing list