[pLog-svn] r5632 - in plugins/branches/lifetype-1.2/unported: adminnotifier adrotate advancedsearch apod articlereferers backup bestposts clickablecomments cocomment currentlyaddictedto delicious digestview dnsantispam dropcase emailencryption flickr google guestbook haiku helloworld jsdictionary jupload linkcounter linktracker logger lunar plogbirthdays ploghaiku plogpoll plogstaticrotator port rightschooser secret shoutbox stickyposts subscribe templatefilter textparser topcommentposts topcommentvisitors toptrackbackposts weather whoonline

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Sun Jul 8 09:02:40 EDT 2007


Author: jondaley
Date: 2007-07-08 09:02:40 -0400 (Sun, 08 Jul 2007)
New Revision: 5632

Modified:
   plugins/branches/lifetype-1.2/unported/adminnotifier/pluginadminnotifier.class.php
   plugins/branches/lifetype-1.2/unported/adrotate/pluginadrotate.class.php
   plugins/branches/lifetype-1.2/unported/advancedsearch/pluginadvancedsearch.class.php
   plugins/branches/lifetype-1.2/unported/apod/pluginapod.class.php
   plugins/branches/lifetype-1.2/unported/articlereferers/pluginarticlereferers.class.php
   plugins/branches/lifetype-1.2/unported/backup/pluginbackup.class.php
   plugins/branches/lifetype-1.2/unported/bestposts/pluginbestposts.class.php
   plugins/branches/lifetype-1.2/unported/clickablecomments/pluginclickablecomments.class.php
   plugins/branches/lifetype-1.2/unported/cocomment/plugincocomment.class.php
   plugins/branches/lifetype-1.2/unported/currentlyaddictedto/plugincurrentlyaddictedto.class.php
   plugins/branches/lifetype-1.2/unported/delicious/plugindelicious.class.php
   plugins/branches/lifetype-1.2/unported/digestview/plugindigestview.class.php
   plugins/branches/lifetype-1.2/unported/dnsantispam/plugindnsantispam.class.php
   plugins/branches/lifetype-1.2/unported/dropcase/plugindropcase.class.php
   plugins/branches/lifetype-1.2/unported/emailencryption/pluginemailencryption.class.php
   plugins/branches/lifetype-1.2/unported/flickr/pluginflickr.class.php
   plugins/branches/lifetype-1.2/unported/google/plugingoogle.class.php
   plugins/branches/lifetype-1.2/unported/guestbook/pluginguestbook.class.php
   plugins/branches/lifetype-1.2/unported/haiku/pluginhaiku.class.php
   plugins/branches/lifetype-1.2/unported/helloworld/pluginhelloworld.class.php
   plugins/branches/lifetype-1.2/unported/jsdictionary/pluginjsdictionary.class.php
   plugins/branches/lifetype-1.2/unported/jupload/pluginjupload.class.php
   plugins/branches/lifetype-1.2/unported/linkcounter/pluginlinkcounter.class.php
   plugins/branches/lifetype-1.2/unported/linktracker/pluginlinktracker.class.php
   plugins/branches/lifetype-1.2/unported/logger/pluginlogger.class.php
   plugins/branches/lifetype-1.2/unported/lunar/pluginlunar.class.php
   plugins/branches/lifetype-1.2/unported/plogbirthdays/pluginplogbirthdays.class.php
   plugins/branches/lifetype-1.2/unported/ploghaiku/pluginploghaiku.class.php
   plugins/branches/lifetype-1.2/unported/plogpoll/pluginplogpoll.class.php
   plugins/branches/lifetype-1.2/unported/plogstaticrotator/pluginplogstaticrotator.class.php
   plugins/branches/lifetype-1.2/unported/port/pluginport.class.php
   plugins/branches/lifetype-1.2/unported/rightschooser/pluginrightschooser.class.php
   plugins/branches/lifetype-1.2/unported/secret/pluginsecret.class.php
   plugins/branches/lifetype-1.2/unported/shoutbox/pluginshoutbox.class.php
   plugins/branches/lifetype-1.2/unported/stickyposts/pluginstickyposts.class.php
   plugins/branches/lifetype-1.2/unported/subscribe/pluginsubscribe.class.php
   plugins/branches/lifetype-1.2/unported/templatefilter/plugintemplatefilter.class.php
   plugins/branches/lifetype-1.2/unported/textparser/plugintextparser.class.php
   plugins/branches/lifetype-1.2/unported/topcommentposts/plugintopcommentposts.class.php
   plugins/branches/lifetype-1.2/unported/topcommentvisitors/plugintopcommentvisitors.class.php
   plugins/branches/lifetype-1.2/unported/toptrackbackposts/plugintoptrackbackposts.class.php
   plugins/branches/lifetype-1.2/unported/weather/pluginweather.class.php
   plugins/branches/lifetype-1.2/unported/whoonline/pluginwhoonline.class.php
Log:
Started the port of all currently unported plugins.
Added $this->version
Added $source, and init() and initAdmin() as appropriate
Removed pluginmanager include



Modified: plugins/branches/lifetype-1.2/unported/adminnotifier/pluginadminnotifier.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/adminnotifier/pluginadminnotifier.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/adminnotifier/pluginadminnotifier.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -8,14 +8,18 @@
     class PluginAdminNotifier extends PluginBase
     {
     
-        function PluginAdminNotifier()
+        function PluginAdminNotifier($source = "")
         {
-            $this->PluginBase();
-            
+            $this->PluginBase($source);
+            $this->version = "20070708";
             $this->id = "adminnotifier";
             $this->desc = "Sends email notifications to administrations every time certain events occur";
             $this->author = "The LifeType Project";
-            
+			if( $source == "admin" )
+				$this->initAdmin();
+        }
+
+        function initAdmin(){
             // register our actions
             $this->registerAdminAction( "eventList", "AdminNotifierShowEventListAction" );
             $this->registerAdminAction( "updateEvents", "AdminNotifierUpdateEventsAction" );

Modified: plugins/branches/lifetype-1.2/unported/adrotate/pluginadrotate.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/adrotate/pluginadrotate.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/adrotate/pluginadrotate.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -17,16 +17,25 @@
 	
 	class PluginAdRotate extends PluginBase
 	{
-		function PluginAdRotate()
+		function PluginAdRotate($source = "")
 		{
-			$this->PluginBase();		
+			$this->PluginBase($source);
 		
       /*setup basic information */
 			$this->id = "adrotate";
 			$this->desc = "Allows site admins to display and maintain simple ad campaigns on their pLog site";
 			$this->author = "woodzy";
 			$this->locale = Array();				
-			
+			$this->version = "20070708";
+
+			if($source == "admin")
+				$this->initAdmin();
+			else
+				$this->init();
+
+        }
+
+        function initAdmin(){
 			/*register menu entries*/
 			$this->addMenuEntry( "/menu/Manage", "AdRotate", "", "" );	
 			$this->addMenuEntry( "/menu/Manage/AdRotate", "ViewAdList", "?op=adrotateViewStats" );
@@ -35,6 +44,9 @@
 			$this->registerAdminAction( "adrotateViewStats", "AdminAdRotateViewStats" );
 			$this->registerAdminAction( "adrotateAddAd", "AdminAdRotateAddAdAction" );			
 			$this->registerAdminAction( "adrotateRemoveAd", "AdminAdRotateRemoveAdAction" );
+		}
+
+        function init(){
             $this->registerBlogAction( "adrotateRedirect", "AdRotateRedirectAction" );
 		}
 		

Modified: plugins/branches/lifetype-1.2/unported/advancedsearch/pluginadvancedsearch.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/advancedsearch/pluginadvancedsearch.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/advancedsearch/pluginadvancedsearch.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -58,9 +58,9 @@
     class PluginAdvancedSearch extends PluginBase
     {
 	
-        function PluginAdvancedSearch()
+        function PluginAdvancedSearch($source = "")
         {
-            $this->PluginBase();
+            $this->PluginBase($source);
 			
 			// ---
 			// set some information
@@ -69,7 +69,14 @@
             $this->author = "The LifeType Project";
 			$this->id = "advancedsearch";
 			$this->locales = Array();
-			
+			$this->version "20070708";
+
+            if($source != "admin")
+                $this->init();
+
+        }
+
+        function init(){
 			// ---
 			// register two actions for this plugin to take care of...
 			// ---

Modified: plugins/branches/lifetype-1.2/unported/apod/pluginapod.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/apod/pluginapod.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/apod/pluginapod.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,7 +1,6 @@
 <?php
 
     lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
     lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
     lt_include( PLOG_CLASS_PATH."class/data/Date.class.php" );
     
@@ -16,20 +15,22 @@
         var $width, $height;			
 
 
-        function Pluginapod()
+        function Pluginapod($source = "")
         {
-			$this->PluginBase();
+			$this->PluginBase($source);
 			
             $this->id = "apod";
             $this->author = "Jase Chen";
-            $this->desc = "";
-  
+            $this->desc = "TODO: put a description here";
+            $this->version = "20070708";
+            
             $this->locales = Array( "en_UK" , "zh_TW" );
-            
-            $this->init();
+
+            if($source == "admin")
+                $this->initAdmin();
         }
 
-		function init()
+		function initAdmin()
 		{
 			$this->registerAdminAction( "apod", "PluginapodConfigAction" );
 			$this->registerAdminAction( "updateapod", "PluginapodUpdateConfigAction" );			

Modified: plugins/branches/lifetype-1.2/unported/articlereferers/pluginarticlereferers.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/articlereferers/pluginarticlereferers.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/articlereferers/pluginarticlereferers.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,97 +1,98 @@
-<?php
-
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/dao/referers.class.php" );
-    
-    /**
-     * Plugin that offers features to return a recent article referers from the current blog
-     */
-    class PluginArticleReferers extends PluginBase
-    {
-        var $prefix;
-        var $pluginEnabled;
-        var $sortByField;
-        var $maxReferers;
-           
-        function PluginArticleReferers()
-        {
-            $this->PluginBase();
-  
-            $this->id = "articlereferers";
-            $this->author = "Mark Wu";
+<?php
+
+    lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/referers.class.php" );
+    
+    /**
+     * Plugin that offers features to return a recent article referers from the current blog
+     */
+    class PluginArticleReferers extends PluginBase
+    {
+        var $prefix;
+        var $pluginEnabled;
+        var $sortByField;
+        var $maxReferers;
+           
+        function PluginArticleReferers($source = "")
+        {
+            $this->PluginBase($source);
+            $this->version = "20070708";
+            
+            $this->id = "articlereferers";
+            $this->author = "Mark Wu";
             $this->desc = "This plugin offers you to get the referers of the specific article.";
-                        
-            $this->locales = Array( "en_UK" , "zh_TW" , "zh_CN" );
-            
-            $this->init();            
-        }
-
-		function init()
-		{
-            $this->registerAdminAction( "articlereferers", "PluginArticleReferersConfigAction" );
-			$this->registerAdminAction( "updateArticleReferersConfig", "PluginArticleReferersUpdateConfigAction" );
-			
-			$menu =& Menu::getMenu();
-			if( !$menu->entryExists( "/menu/controlCenter/manageRecentPlugins" ))						
-				$this->addMenuEntry( "/menu/controlCenter", "manageRecentPlugins", "", "", true, false );			
-            $this->addMenuEntry( "/menu/controlCenter/manageRecentPlugins", "ArticleReferers", "?op=articlereferers", "" );            
-		}
-
-		function register()
-		{
-		    $blogSettings = $this->blogInfo->getSettings();
-		    $this->pluginEnabled = $blogSettings->getValue( "plugin_articlereferers_enabled" );
-		    $this->sortByField = $blogSettings->getValue( "plugin_articlereferers_sortbyfield" );
-	        $this->maxReferers = $blogSettings->getValue( "plugin_articlereferers_maxreferers" );
-	    }
-	    
-	    function isEnabled()
-	    {
-	        return $this->pluginEnabled;
-	    }
- 
-        /**
-         * Returns the referers object of specific article
-         */
-        function getArticleReferers( $articleId, $maxReferers = 0, $sortByField = 1)
-        {
-            $referers = new Referers();
-            $blogId = $this->blogInfo->getId();
+                        
+            $this->locales = Array( "en_UK" , "zh_TW" , "zh_CN" );
 
+            if($source == "admin")
+                $this->initAdmin();
+        }
+
+		function initAdmin()
+		{
+            $this->registerAdminAction( "articlereferers", "PluginArticleReferersConfigAction" );
+			$this->registerAdminAction( "updateArticleReferersConfig", "PluginArticleReferersUpdateConfigAction" );
+			
+			$menu =& Menu::getMenu();
+			if( !$menu->entryExists( "/menu/controlCenter/manageRecentPlugins" ))						
+				$this->addMenuEntry( "/menu/controlCenter", "manageRecentPlugins", "", "", true, false );			
+            $this->addMenuEntry( "/menu/controlCenter/manageRecentPlugins", "ArticleReferers", "?op=articlereferers", "" );            
+		}
+
+		function register()
+		{
+		    $blogSettings = $this->blogInfo->getSettings();
+		    $this->pluginEnabled = $blogSettings->getValue( "plugin_articlereferers_enabled" );
+		    $this->sortByField = $blogSettings->getValue( "plugin_articlereferers_sortbyfield" );
+	        $this->maxReferers = $blogSettings->getValue( "plugin_articlereferers_maxreferers" );
+	    }
+	    
+	    function isEnabled()
+	    {
+	        return $this->pluginEnabled;
+	    }
+ 
+        /**
+         * Returns the referers object of specific article
+         */
+        function getArticleReferers( $articleId, $maxReferers = 0, $sortByField = 1)
+        {
+            $referers = new Referers();
+            $blogId = $this->blogInfo->getId();
+
             lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );
-            $this->prefix = Db::getPrefix();
-         	$query = "SELECT * FROM ".$this->prefix."referers WHERE article_id = ".$articleId;
-         	
-         	if( $this->sortByField != "" && $this->sortByField != $sortByField )
-         	    $sortByField =  $this->sortByField;
-         	    
-            if ( $sortByField == 1 )
-            {
-                $query .= " ORDER BY hits DESC";
-            } elseif ( $sortByField == 2 ) {
-                $query .= " ORDER BY last_date DESC";
-            } else {
-                return false;
-            }
-
-            if( $maxReferers > 0 && $this->maxReferers > 0) 
-            {
-                $query .= " LIMIT ".$maxReferers.";"; 
-            } else {
-                $query .= " LIMIT ".$this->maxReferers.";";
-            }
-            
-            $result = $referers->Execute( $query );
-            if( !$result )
-            	return false;
-           
-            $articlereferers = Array();
-            while( $row = $result->FetchRow()) {
-            	array_push( $articlereferers, $referers->mapRow( $row ));
-            }
-
-            return $articlereferers;
-        }
-    }
+            $this->prefix = Db::getPrefix();
+         	$query = "SELECT * FROM ".$this->prefix."referers WHERE article_id = ".$articleId;
+         	
+         	if( $this->sortByField != "" && $this->sortByField != $sortByField )
+         	    $sortByField =  $this->sortByField;
+         	    
+            if ( $sortByField == 1 )
+            {
+                $query .= " ORDER BY hits DESC";
+            } elseif ( $sortByField == 2 ) {
+                $query .= " ORDER BY last_date DESC";
+            } else {
+                return false;
+            }
+
+            if( $maxReferers > 0 && $this->maxReferers > 0) 
+            {
+                $query .= " LIMIT ".$maxReferers.";"; 
+            } else {
+                $query .= " LIMIT ".$this->maxReferers.";";
+            }
+            
+            $result = $referers->Execute( $query );
+            if( !$result )
+            	return false;
+           
+            $articlereferers = Array();
+            while( $row = $result->FetchRow()) {
+            	array_push( $articlereferers, $referers->mapRow( $row ));
+            }
+
+            return $articlereferers;
+        }
+    }
 ?>
\ No newline at end of file

Modified: plugins/branches/lifetype-1.2/unported/backup/pluginbackup.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/backup/pluginbackup.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/backup/pluginbackup.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,7 +1,6 @@
 <?php
 
 		lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-		lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
 		lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
 		lt_include( PLOG_CLASS_PATH."class/dao/model.class.php" );
 		lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
@@ -17,17 +16,19 @@
         var $_destination;
         var $_pluginOp;
 
-        function PluginBackup()
+        function PluginBackup($source = "")
         {
-          $this->connectDb();
-	    $this->author = "Bradley Liang";
-	    $this->desc   = "The plugin backs up all of LifeType's databases (including any created by plugins), but does not backup other tables.  If you are looking to restore database structure, it will be easier to purge your database and run the wizard over with a fresh installation.<br /><br />  ".
-	    			    "Usage: Unfortunately, I've not much idea on how to implement plugin versatility from within LifeType's Administrative interface.  Instead, place the following command in a temporary template..<br />".
-	    			    "&nbsp;&nbsp;&nbsp;&nbsp;{\$dbbackup->Backup()}<br />".
-				    "A file entitled 'backup.sql' will be created in your main pLog directory.  To restore simply run the commands from the file from SQL.<br /><br />".
-	    			    "TODO:<br />&nbsp;&nbsp;&nbsp;&nbsp;-Use of the admin configuration panel to back data up.<br />&nbsp;&nbsp;&nbsp;&nbsp;-Option to restore entries to DB<br />";
-	    $this->pluginBase();
-	  }
+            
+            $this->pluginBase();
+            $this->connectDb();
+            $this->version = "20070708";
+            $this->author = "Bradley Liang";
+            $this->desc   = "The plugin backs up all of LifeType's databases (including any created by plugins), but does not backup other tables.  If you are looking to restore database structure, it will be easier to purge your database and run the wizard over with a fresh installation.<br /><br />  ".
+                "Usage: Unfortunately, I've not much idea on how to implement plugin versatility from within LifeType's Administrative interface.  Instead, place the following command in a temporary template..<br />".
+                "&nbsp;&nbsp;&nbsp;&nbsp;{\$dbbackup->Backup()}<br />".
+                "A file entitled 'backup.sql' will be created in your main pLog directory.  To restore simply run the commands from the file from SQL.<br /><br />".
+                "TODO:<br />&nbsp;&nbsp;&nbsp;&nbsp;-Use of the admin configuration panel to back data up.<br />&nbsp;&nbsp;&nbsp;&nbsp;-Option to restore entries to DB<br />";
+        }
 	  
 	  //
 	  // generates a very nice configuration message
@@ -243,5 +244,4 @@
 	 }
 	}
 	
-	PluginManager::registerPlugin( "dbbackup", "PluginBackup" );
 ?>

Modified: plugins/branches/lifetype-1.2/unported/bestposts/pluginbestposts.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/bestposts/pluginbestposts.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/bestposts/pluginbestposts.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,7 +1,6 @@
 <?php
      
     lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
      
     /**
     * Plugin that generates a form that is used to give a posting a rating
@@ -22,8 +21,8 @@
     */
     class PluginBestPosts extends PluginBase {
          
-        function PluginBestPosts() {
-            $this->PluginBase();
+        function PluginBestPosts($source = "") {
+            $this->PluginBase($source);
              
             $this->desc = "Generates a form that is used to give a posting a rating
                 or score as a way of identifying a blog's &quot;best posts.&quot;
@@ -38,7 +37,8 @@
                 Rating: {\$bestposts->displayForm(\$articleId,\$categoryId)}<br/>
                 {/if}";
             $this->author = "Daniel Kehoe <kehoe at fortuity.com>";
-             
+            $this->version = "20070708";
+            
             $this->connectDb();
             if ($this->_databaseExists() == true ) {
                 $this->_setDefaultConfigMessage();
@@ -234,6 +234,4 @@
         }
          
     }
-     
-    PluginManager::registerPlugin("bestposts", "PluginBestPosts" );
 ?>

Modified: plugins/branches/lifetype-1.2/unported/clickablecomments/pluginclickablecomments.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/clickablecomments/pluginclickablecomments.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/clickablecomments/pluginclickablecomments.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -5,14 +5,20 @@
     class PluginClickableComments extends PluginBase
     {
     
-        function PluginClickableComments()
+        function PluginClickableComments($source = "")
         {
-            $this->PluginBase();
+            $this->PluginBase($source);
             
             $this->id = "clickablecomments";
             $this->desc = "Converts URLs in comments left by visitors into clickable links";
             $this->author = "The LifeType Project";            
-            
+            $this->version = "20070708";
+
+            if($source != "admin")
+				$this->init();
+        }
+
+        function init(){
             // that's the only event we care for!
             $this->registerNotification( EVENT_PRE_COMMENT_ADD );            
         }

Modified: plugins/branches/lifetype-1.2/unported/cocomment/plugincocomment.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/cocomment/plugincocomment.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/cocomment/plugincocomment.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,27 +1,27 @@
 <?php
 	lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-	lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
 
 	class PlugincoComment extends PluginBase
 	{
 		var $pluginEnabled;
 		
-		function PlugincoComment()
+		function PlugincoComment($source = "")
 		{
-			$this->PluginBase();
+			$this->PluginBase($source);
 
 			$this->id      = "cocomment";
 			$this->author  = "James Huang";
 			$this->desc    = "Integrate cocomment into LifeType commentform template.";
-
+            $this->version = "20070708";
 			$this->locales = Array( "en_UK" , "zh_TW" );
-
-			$this->init();
+            
+            if($source == "admin")
+				$this->initAdmin();
+			else
+				$this->init();
 		}
 
-		function init()
-		{
-            $this->registerBlogAction( "coComment", "ShowcoCommentAction" );
+		function initAdmin(){
             $this->registerAdminAction( "coCommentConfig", "PlugincoCommentConfigAction" );
 			$this->registerAdminAction( "updatecoCommentConfig", "PlugincoCommentUpdateConfigAction" );
 			
@@ -31,6 +31,10 @@
             $this->addMenuEntry( "/menu/controlCenter/manageAppearancePlugins", "coComment", "?op=coCommentConfig", "" );
 		}
 
+		function init(){
+            $this->registerBlogAction( "coComment", "ShowcoCommentAction" );
+		}
+
 		function register()
 		{
 		    $blogSettings = $this->blogInfo->getSettings();

Modified: plugins/branches/lifetype-1.2/unported/currentlyaddictedto/plugincurrentlyaddictedto.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/currentlyaddictedto/plugincurrentlyaddictedto.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/currentlyaddictedto/plugincurrentlyaddictedto.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -21,16 +21,22 @@
 class PluginCurrentlyaddictedto extends PluginBase  {
     var $s;
 
-    function PluginCurrentlyaddictedto()
+    function PluginCurrentlyaddictedto($source = "")
     {
         
-        $this->PluginBase();
+        $this->PluginBase($source);
 
         $this->desc    = "Currentlyaddictedto plugin: tell me more about you";
         $this->author  = "Palantir (radar at netpalantir.it)";
         $this->id      = "Currentlyaddictedto";
         $this->locales = Array();
+        $this->version = "20070708";
 
+        if($source == "admin")
+            $this->initAdmin();
+    }
+
+    function initAdmin(){
         $this->registerAdminAction("Currentlyaddictedto", "PluginCurrentlyaddictedtoAction" );
         $this->registerAdminAction("CurrentlyaddictedtoSelect", "PluginCurrentlyaddictedtoSelectAction" );
         //$this->registerAdminAction("modifyCATItem", "PluginCurrentlyaddictedtoAction" );

Modified: plugins/branches/lifetype-1.2/unported/delicious/plugindelicious.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/delicious/plugindelicious.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/delicious/plugindelicious.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -23,21 +23,24 @@
             	6=>'Unable to parse the XML returned from del.icio.us'
             );
 
-        function PluginDelicious()
+        function PluginDelicious($source = "")
         {
-            $this->PluginBase();
+            $this->PluginBase($source);
             
             $this->id = "delicious";
             $this->author = "Mark Wu";
             $this->desc = 'This plugin let you integrate your Del.icio.us with pLog.';
 
             $this->locales = Array( "en_UK" , "zh_TW" , "zh_CN" );
-            
-            $this->init();   
+            $this->version = "20070708";
+
+            if($source == "admin")
+                $this->initAdmin();
+            else
+                $this->init();
         }
 
-		function init()
-		{
+		function initAdmin(){
             $this->registerAdminAction( "delicious", "PluginDeliciousConfigAction" );
 			$this->registerAdminAction( "updateDeliciousConfig", "PluginDeliciousUpdateConfigAction" );
 			$this->registerBlogAction( "DeliciousShow", "PluginDeliciousShowAction" );
@@ -48,6 +51,10 @@
             $this->addMenuEntry( "/menu/controlCenter/manageIntegrationPlugins", "Delicious", "?op=delicious", "" );            
 		}
 
+		function init(){
+			$this->registerBlogAction( "DeliciousShow", "PluginDeliciousShowAction" );
+		}
+
 		function register()
 		{
 		    $blogSettings = $this->blogInfo->getSettings();

Modified: plugins/branches/lifetype-1.2/unported/digestview/plugindigestview.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/digestview/plugindigestview.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/digestview/plugindigestview.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -17,15 +17,16 @@
 {
   var $_resMax = -1;
   var $_userId = 0;
-  function PluginDigestView()
+  function PluginDigestView($source = "")
   {
-    $this->PluginBase();
+    $this->PluginBase($source);
 
     $this->id = "digestview";
     $this->desc = "Allows a template designer to access quick post summaries".
             " of categories and specific users whenever he/she wants";
     $this->author = "woodzy";
     $this->locale = Array();
+    $this->version = "20070708";
   } 
   function setResultMax($maxReturn)
   {

Modified: plugins/branches/lifetype-1.2/unported/dnsantispam/plugindnsantispam.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/dnsantispam/plugindnsantispam.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/dnsantispam/plugindnsantispam.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -5,24 +5,23 @@
 	{
 		var $pluginEnabled;
 		
-		function PluginDNSAntiSpam()
+		function PluginDNSAntiSpam($source = "")
 		{
-			$this->PluginBase();
+			$this->PluginBase($source);
 
 			$this->id      = "dnsantispam";
 			$this->author  = 'Original build by <a href="http://weblog.sinteur.com/">John Sinteur</a> for WordPress, Ported to pLog by Mark Wu';
 			$this->desc    = "Check if a comment poster is on an open proxy list, and check if the content contains known spammer domains.";
-
+            $this->version = "20070708";
 			$this->locales = Array( "en_UK" , "zh_TW" );
 
-			$this->init();
+			if($source == "admin")
+				$this->initAdmin();
+			else
+				$this->init();
 		}
 
-		function init()
-		{
-            lt_include( PLOG_CLASS_PATH."plugins/dnsantispam/class/security/dnsantispamfilter.class.php" );
-            $this->registerFilter( "DNSAntiSpamFilter" );
-
+		function initAdmin(){
             $this->registerAdminAction( "dnsantispam", "PluginDNSAntiSpamConfigAction" );
 			$this->registerAdminAction( "updateDNSAntiSpamConfig", "PluginDNSAntiSpamUpdateConfigAction" );
 			
@@ -32,6 +31,11 @@
             $this->addMenuEntry( "/menu/controlCenter/manageAntiSpamPlugins", "DNSAntiSpam", "?op=dnsantispam", "" );            
 		}
 
+		function init(){
+            lt_include( PLOG_CLASS_PATH."plugins/dnsantispam/class/security/dnsantispamfilter.class.php" );
+            $this->registerFilter( "DNSAntiSpamFilter" );
+		}
+
 		function register()
 		{
 		    $blogSettings = $this->blogInfo->getSettings();

Modified: plugins/branches/lifetype-1.2/unported/dropcase/plugindropcase.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/dropcase/plugindropcase.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/dropcase/plugindropcase.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,7 +1,6 @@
 <?php
 
     lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
     
     /**
      * Plugin that offers features to make the first character of article as lower case
@@ -10,20 +9,22 @@
     {
         var $pluginEnabled;
     
-        function PluginDropCase()
+        function PluginDropCase($source = "")
         {
-			$this->PluginBase();
+			$this->PluginBase($source);
 
 			$this->id = "dropcase";
             $this->author = "Mark Wu";
             $this->desc = "Drop case letter (a huge letter) for the first letter of every post.";
-
+            $this->version = "20070708";
 			$this->locales = Array( "en_UK" , "zh_TW" , "zh_CN" );
 
-			$this->init();            
+            if($source == "admin")
+                $this->initAdmin();
+            $this->init()
         }
 
-		function init()
+		function initAdmin()
 		{
             $this->registerAdminAction( "dropcase", "PluginDropCaseConfigAction" );
 			$this->registerAdminAction( "updateDropCaseConfig", "PluginDropCaseUpdateConfigAction" );
@@ -36,6 +37,11 @@
 			$this->registerNotification( EVENT_POST_LOADED );
 			$this->registerNotification( EVENT_POSTS_LOADED );
 		}
+
+		function init(){
+			$this->registerNotification( EVENT_POST_LOADED );
+			$this->registerNotification( EVENT_POSTS_LOADED );
+		}
 		
 		function register()
 		{

Modified: plugins/branches/lifetype-1.2/unported/emailencryption/pluginemailencryption.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/emailencryption/pluginemailencryption.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/emailencryption/pluginemailencryption.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,24 +1,24 @@
 <?php
 	lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-	lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
 
 	class PluginEmailEncryption extends PluginBase
 	{
 		var $_pluginEnabled;
 
-		function PluginEmailEncryption()
+		function PluginEmailEncryption($source = "")
 		{
-			$this->PluginBase();
+			$this->PluginBase($source);
 
 			$this->id = "emailencryption";
 			$this->desc = "Encryption Email for LifeType";
 			$this->author = "Minstrel Chiu";
 			$this->locales = Array("en_UK" , "zh_TW");
-
-			$this->init();
+            $this->version = "20070708";
+            if($source == "admin")
+                $this->initAdmin();
 		}
 
-		function init()
+		function initAdmin()
 		{
 			$this->registerAdminAction("emailEncryption", "AdminEmailEncryptionAction");
 			$this->registerAdminAction("updateEmailEncryption", "AdminUpdateEmailEncryptionAction");

Modified: plugins/branches/lifetype-1.2/unported/flickr/pluginflickr.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/flickr/pluginflickr.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/flickr/pluginflickr.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,7 +1,6 @@
 <?php
 
     lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
     lt_include( PLOG_CLASS_PATH."class/net/rawrequestgenerator.class.php" );
     lt_include( PLOG_CLASS_PATH."plugins/flickr/class/xml/XMLParser.class.php" );
 
@@ -37,30 +36,35 @@
         var $expiredTime;           //Duration for cache expired 
         var $userRoot;              //Root for links in the output
 
-        function PluginFlickr()
+        function PluginFlickr($source = "")
         {
-            $this->PluginBase();
+            $this->PluginBase($source);
             
             $this->id = "flickr";
             $this->author = "Mark Wu";
             $this->desc = 'This plugin let you integrate your Flickr with pLog. It is inspired by <a href="http://www.worrad.com/archives/2004/11/23/flickr-gallery-wp-plugin/">Wordpress Flickr Gallery Plugin</a> written by Ray.';
 
             $this->locales = Array( "en_UK" , "zh_TW" , "zh_CN", "de_DE" );
-            
-            $this->init();                     
+            $this->version = "20070708";
+            if($source == "admin")
+                $this->initAdmin();
+            else
+                $this->init();
         }
 
-		function init()
-		{
+		function initAdmin(){
             $this->registerAdminAction( "flickr", "PluginFlickrConfigAction" );
 			$this->registerAdminAction( "updateFlickrConfig", "PluginFlickrUpdateConfigAction" );
-			$this->registerBlogAction( "FlickrShow", "PluginFlickrShowAction" );
 			
 			$menu =& Menu::getMenu();
 			if( !$menu->entryExists( "/menu/controlCenter/manageIntegrationPlugins" ))						
 				$this->addMenuEntry( "/menu/controlCenter", "manageIntegrationPlugins", "", "", true, false );			
             $this->addMenuEntry( "/menu/controlCenter/manageIntegrationPlugins", "Flickr", "?op=flickr", "" );            
 		}
+
+		function init(){
+			$this->registerBlogAction( "FlickrShow", "PluginFlickrShowAction" );
+		}
  
 		function register()
 		{

Modified: plugins/branches/lifetype-1.2/unported/google/plugingoogle.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/google/plugingoogle.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/google/plugingoogle.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,8 +1,7 @@
 <?php
 
     lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
-lt_include( PLOG_CLASS_PATH."class/net/url.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/net/url.class.php" );
 
 /**
     * Implementation to highlight the search terms if the user is coming from google.
@@ -22,9 +21,9 @@
                              "chocolate",
                              "violet" );
 
-    	function PluginGoogle()
+    	function PluginGoogle($source = "")
         {
-	    $this->PluginBase();
+	    $this->PluginBase($source);
 	    $this->id = "google";
             $this->desc = <<<EOD
 This plugin will highlight the search terms entered by a Google user when arriving to
@@ -51,7 +50,7 @@
 EOD;
 
             $this->author = "The LifeType team";
-
+            $this->version = "20070708";
             $this->totalReplacements = 0;
             $this->highlightedTerms  = "";
 }

Modified: plugins/branches/lifetype-1.2/unported/guestbook/pluginguestbook.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/guestbook/pluginguestbook.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/guestbook/pluginguestbook.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,32 +1,40 @@
 <?php
 	lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-	lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
 
 	class PluginGuestbook extends PluginBase
 	{
 		var $_pluginEnabled;
 		var $_postPerPage;
 
-		function PluginGuestbook()
+		function PluginGuestbook($source = "")
 		{
-			$this->PluginBase();
+			$this->PluginBase($source);
 
 			$this->id = "guestbook";
 			$this->desc = "Provide guestbook for LifeType.";
 			$this->author = "Minstrel Chiu";
 			$this->locales = Array( "en_UK" , "zh_TW", "zh_CN" );
+            $this->version = "20070708";
 
-			$this->init();
+			if($source == "admin")
+                $this->initAdmin();
+			else
+                $this->init();
 		}
 
-		function init()
-		{
-			$this->registerBlogAction("Guestbook", "GuestbookAction");
-			$this->registerBlogAction("DeleteGuestbookPost", "GuestbookAction");
-			$this->registerBlogAction("AddGuestbookPost", "GuestbookAction");
-			$this->registerBlogAction("ReplyGuestbookPost", "GuestbookAction");
-			$this->registerBlogAction("GuestbookForm", "UpdateGuestbookAction");
+		function init(){
+			$this->registerAdminAction("guestbook", "AdminGuestbookAction");
+			$this->registerAdminAction("updateGuestbook", "AdminUpdateGuestbookAction");
 
+			$menu =& Menu::getMenu();
+
+			if(!$menu->entryExists( "/menu/controlCenter/manageGuestbook"))
+				$this->addMenuEntry("/menu/controlCenter", "manageGuestbook", "", "", true, false);
+
+			$this->addMenuEntry("/menu/controlCenter/manageGuestbook", "Guestbook", "?op=guestbook", "");
+		}
+        
+		function initAdmin(){
 			$this->registerAdminAction("guestbook", "AdminGuestbookAction");
 			$this->registerAdminAction("updateGuestbook", "AdminUpdateGuestbookAction");
 

Modified: plugins/branches/lifetype-1.2/unported/haiku/pluginhaiku.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/haiku/pluginhaiku.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/haiku/pluginhaiku.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,6 +1,5 @@
 <?php
     lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
 
     define( "DEFAULT_HAIKUS_FILENAME", "./haiku/haiku.sql" );
 
@@ -9,9 +8,9 @@
      */
     class PluginHaiku extends PluginBase {
 
-        function PluginHaiku()
+        function PluginHaiku($source = "")
         {
-        $this->PluginBase();
+            $this->PluginBase($source);
 
             $this->desc = "
             This plugin will generate a random Haiku<br/>
@@ -25,18 +24,18 @@
             &nbsp;&nbsp;{\$haiku->getHaikuStats()}<br/>
         ";
             $this->author = "Darren Greer";
+            $this->version = "20070708";
 
-        // connect to the database
-        $this->connectDb();
-
-        if( $this->checkHaikuDatabase($params) == true ) {
-          $this->setDefaultConfigMessage();
-        } else {
-          $this->setCreateConfigMessage();
+                // connect to the database
+            $this->connectDb();
+            
+            if( $this->checkHaikuDatabase($params) == true ) {
+                $this->setDefaultConfigMessage();
+            } else {
+                $this->setCreateConfigMessage();
+            }
         }
 
-        }
-
         function getHaiku()
         {
       // we need to take into account that plog has definable
@@ -550,5 +549,4 @@
 
     }
 
-    PluginManager::registerPlugin( "haiku", "PluginHaiku" );
 ?>

Modified: plugins/branches/lifetype-1.2/unported/helloworld/pluginhelloworld.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/helloworld/pluginhelloworld.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/helloworld/pluginhelloworld.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -88,27 +88,41 @@
     class PluginHelloWorld extends PluginBase 
     {
 
-    	function PluginHelloWorld()
+    	function PluginHelloWorld($source = "")
         {
-        	$this->PluginBase();
+        	$this->PluginBase($source);
 
             $this->desc    = "This is a very simple plugin to show how to develop custom plugins";
             $this->author  = "The LifeType team";
             $this->id      = "helloworld";
 			$this->locales = Array();
-            
-            // register a sample action for the public side        
-            $this->registerBlogAction( "test", "PluginHelloWorldAction" );
+            $this->version = "20070708";
+
+            if($source == "admin")
+                $this->initAdmin();
+            else
+                $this->init();
+        }
+        
+        function initAdmin(){
             // register a simple action for the admin side and add a link to it
             $this->registerAdminAction( "testAdmin", "PluginHelloWorldAdminAction" );
             $this->addMenuEntry( "/menu/Manage/manageLinks", "testAction", "admin.php?op=testAdmin", "PluginHelloWorld Sample Action" );
+			
+			// register an event
+			$this->registerNotification( EVENT_POST_LOADED, "MyTestEventPlugin" );
+        }
+
+        function init(){
+            // register a sample action for the public side        
+            $this->registerBlogAction( "test", "PluginHelloWorldAction" );
             // and register a sample pipeline filter
             $this->registerFilter( "PluginHelloWorldTestFilter" );
 			
 			// register an event
 			$this->registerNotification( EVENT_POST_LOADED, "MyTestEventPlugin" );
         }
-		
+
 		function process( $eventType, $params )
 		{			
 			// return the content as it came, as the caller class probably expected us to do

Modified: plugins/branches/lifetype-1.2/unported/jsdictionary/pluginjsdictionary.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/jsdictionary/pluginjsdictionary.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/jsdictionary/pluginjsdictionary.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,7 +1,6 @@
 <?php
 
 	lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
 
     /**
      * Implementation of a very simple plugin file.
@@ -129,9 +128,9 @@
         );
 
 
-    	function PluginJsDictionary()
+        function PluginJsDictionary($source = "")
         {
-        	$this->PluginBase();
+            $this->PluginBase($source);
 
             $this->desc   = "Allows readers to get a instant definition of any word from the blog by
                              <b>double clicking</b> any of them. Also, readers can select any arbitrary section
@@ -147,6 +146,7 @@
                              Please remember that this plugin needs a Javascript 1.2-compatible browser in order to
                              work properly.";
             $this->author = "The LifeType team";
+            $this->version = "20070708";
         }
 
         /**
@@ -237,5 +237,4 @@
         }
     }
 
-    PluginManager::registerPlugin( "jsdictionary", "PluginJsDictionary" );
 ?>

Modified: plugins/branches/lifetype-1.2/unported/jupload/pluginjupload.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/jupload/pluginjupload.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/jupload/pluginjupload.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,7 +1,6 @@
 <?php
 
     lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
     
     /**
      * Plugin offers you to integrate JUpload with pLog.
@@ -20,7 +19,7 @@
             $this->id = "jupload";
             $this->author = "Mark Wu";
             $this->desc = "This plugin offers you to integrate JUpload with LifeType.";
-            $this->version = "20070706";
+            $this->version = "20070708";
             
             $config =& Config::getConfig();
             $this->resourceCenterEnabled = $config->getValue( "resources_enabled" );

Modified: plugins/branches/lifetype-1.2/unported/linkcounter/pluginlinkcounter.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/linkcounter/pluginlinkcounter.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/linkcounter/pluginlinkcounter.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -26,20 +26,22 @@
 
 		var $pluginEnabled;
 		
-		function PluginLinkcounter()
+		function PluginLinkcounter($source = "")
 		{
-			$this->PluginBase();
+			$this->PluginBase($source);
 
 			$this->id      = "linkcounter";
 			$this->author  = "Paul Westbrook";
 			$this->desc    = "This plugin enables extended Technorati Link Counter Widget.";
-
+            $this->version = "20070708";
+            
 			$this->locales = Array( "en_UK");
 
-			$this->init();
+            if($source == "admin")
+                $this->initAdmin();
 		}
 
-		function init()
+		function initAdmin()
 		{
             $this->registerAdminAction( "linkcounterConfig", "PluginLinkcounterConfigAction" );
 			$this->registerAdminAction( "updateLinkcounterConfig", "PluginLinkcounterUpdateConfigAction" );

Modified: plugins/branches/lifetype-1.2/unported/linktracker/pluginlinktracker.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/linktracker/pluginlinktracker.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/linktracker/pluginlinktracker.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -10,9 +10,9 @@
 	class PluginLinkTracker extends PluginBase
 	{
 	
-		function PluginLinkTracker()
+		function PluginLinkTracker($source = "")
 		{
-			$this->PluginBase();
+			$this->PluginBase($source);
 			
 			// this plugin's own id
 			$this->id = "linktracker";
@@ -20,7 +20,13 @@
 			$this->author = "The LifeType Project";
 			$this->locales = Array( "en_UK", "es_ES", "ca_ES", "de_DE", "et_EE", "fi_FI", "fr_FR",
 									"hu_HU", "it_IT", "nl_BE" );
-			
+			$this->version = "20070708";
+
+            if($source != "admin")
+                this->init();
+        }
+
+        function init(){
 			// register our own action
 			$this->registerBlogAction( "LinkTracker", "LinkTrackerAction" );
 		}

Modified: plugins/branches/lifetype-1.2/unported/logger/pluginlogger.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/logger/pluginlogger.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/logger/pluginlogger.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -12,16 +12,21 @@
 	class PluginLogger extends PluginBase
 	{
 	
-		function PluginLogger()
+		function PluginLogger($source = "")
 		{
-			$this->PluginBase();
+			$this->PluginBase($source);
 			
 			// set the plugin information
 			$this->id = "logger";
 			$this->desc = "A logging plugin";
 			$this->author = "The LifeType Project";
 			$this->locales = Array();
-			
+			$this->version = "20070708";
+
+            $this->init();
+        }
+
+        function init(){
 			// register all the events available, but we can use the PluginManager
 			// to give us the whole list of events that can be registered...
 			$pm =& PluginManager::getPluginManager();

Modified: plugins/branches/lifetype-1.2/unported/lunar/pluginlunar.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/lunar/pluginlunar.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/lunar/pluginlunar.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,25 +1,26 @@
 <?php
 	lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-	lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
 
 	class PluginLunar extends PluginBase
 	{
 		var $pluginEnabled;
 		
-		function PluginLunar()
+		function PluginLunar($source = "")
 		{
-			$this->PluginBase();
+			$this->PluginBase($source);
 
 			$this->id      = "lunar";
 			$this->author  = "Mark Wu";
 			$this->desc    = "Show Chinese Lunar Calendar date information in template.";
-
+            $this->version = "20070708";
 			$this->locales = Array( "en_UK" , "zh_TW" );
-
-			$this->init();
+            if( $source == "admin" )
+                $this->initAdmin();
+            else
+                $this->init();
 		}
 
-		function init()
+		function initAdmin()
 		{
             $this->registerBlogAction( "lunarCalendar", "ShowLunarCalendarAction" );
             $this->registerAdminAction( "lunar", "PluginLunarConfigAction" );
@@ -31,6 +32,11 @@
             $this->addMenuEntry( "/menu/controlCenter/manageAppearancePlugins", "Lunar", "?op=lunar", "" );
 		}
 
+		function init()
+        {
+            $this->registerBlogAction( "lunarCalendar", "ShowLunarCalendarAction" );
+		}
+
 		function register()
 		{
 		    $blogSettings = $this->blogInfo->getSettings();

Modified: plugins/branches/lifetype-1.2/unported/plogbirthdays/pluginplogbirthdays.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/plogbirthdays/pluginplogbirthdays.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/plogbirthdays/pluginplogbirthdays.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -15,35 +15,41 @@
 
 class PluginPlogBirthdays extends PluginBase
 {
-  function PluginPlogBirthdays()
+  function PluginPlogBirthdays($source = "")
   {
-    $this->PluginBase();
+    $this->PluginBase($source);
 
     $this->id = "PlogBirthdays";
     $this->desc = "Allows plog users to display users birthdays in a cute display";
     $this->author = "woodzy";
     $this->locale = Array();
+    $this->version = "20070708";
 
-    $this->addMenuEntry("/menu/Manage","PlogBirthdays","");
-    $this->addMenuEntry("/menu/Manage/PlogBirthdays","ViewBirthdayList",
-        "?op=plogbirthdaysView");
-    $this->addMenuEntry("/menu/Manage/PlogBirthdays","NewBirthdayEntry",
-        "?op=plogbirthdaysNewEntryView");
+    if( $source == "admin" )
+        $this->initAdmin();
+  }
 
-    $this->registerAdminAction("plogbirthdaysView",
-        "AdminPlogBirthdaysViewAction");
-    $this->registerAdminAction("plogbirthdaysSearch",
-        "AdminPlogBirthdaysSearchAction");
-    $this->registerAdminAction('plogbirthdaysNewEntryView',
-        "AdminPlogBirthdaysNewEntryViewAction");
-    $this->registerAdminAction("plogbirthdaysNewEntry",
-        "AdminPlogBirthdaysNewEntryAction");
-    $this->registerAdminAction("plogbirthdaysDeleteEntry",
-        "AdminPlogBirthdaysDeleteEntryAction");
+    function initAdmin(){
+        $this->addMenuEntry("/menu/Manage","PlogBirthdays","");
+        $this->addMenuEntry("/menu/Manage/PlogBirthdays","ViewBirthdayList",
+                            "?op=plogbirthdaysView");
+        $this->addMenuEntry("/menu/Manage/PlogBirthdays","NewBirthdayEntry",
+                            "?op=plogbirthdaysNewEntryView");
+        
+        $this->registerAdminAction("plogbirthdaysView",
+                                   "AdminPlogBirthdaysViewAction");
+        $this->registerAdminAction("plogbirthdaysSearch",
+                                   "AdminPlogBirthdaysSearchAction");
+        $this->registerAdminAction('plogbirthdaysNewEntryView',
+                                   "AdminPlogBirthdaysNewEntryViewAction");
+        $this->registerAdminAction("plogbirthdaysNewEntry",
+                                   "AdminPlogBirthdaysNewEntryAction");
+        $this->registerAdminAction("plogbirthdaysDeleteEntry",
+                                   "AdminPlogBirthdaysDeleteEntryAction");
+        
+        $this->_verifyTableStructure();
+    }
 
-    $this->_verifyTableStructure();
-  }
-
   function _verifyTableStructure()
   {
     /* L = smallint in adodb dd speak */

Modified: plugins/branches/lifetype-1.2/unported/ploghaiku/pluginploghaiku.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/ploghaiku/pluginploghaiku.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/ploghaiku/pluginploghaiku.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -11,7 +11,6 @@
 */
 
     lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
     lt_include(PLOG_CLASS_PATH."plugins/ploghaiku/class/dao/ploghaikudao.class.php");
     lt_include(PLOG_CLASS_PATH."class/config/config.class.php");
 
@@ -22,13 +21,14 @@
 
 	var $_pluginEnabled = 1;
 
-        function PluginPlogHaiku()
+        function PluginPlogHaiku($source = "")
         {
-            $this->PluginBase();
+            $this->PluginBase($source);
 
             $this->id = "ploghaiku";
             $this->author = "Darren Greer";
             $this->locale = Array();
+            $this->version = "20070708";
             $this->desc = "
             This plugin will generate a random Haiku<br/>
         <br/>
@@ -41,10 +41,11 @@
             &nbsp;&nbsp;{\$PlogHaiku->getHaikuStats()}<br/>
         ";
 
-	    $this->init();
+            if($source == "admin")
+                $this->initAdmin();
         }
 
-	function init()
+	function initAdmin()
 	{
 	    /* Add Haiku Template Page */
 	    $this->registerAdminAction("manageHaikuView", "ManageHaikuViewAction");

Modified: plugins/branches/lifetype-1.2/unported/plogpoll/pluginplogpoll.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/plogpoll/pluginplogpoll.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/plogpoll/pluginplogpoll.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -18,44 +18,50 @@
 
 class PluginPlogPoll extends PluginBase
 {
-  function PluginPlogPoll()
+  function PluginPlogPoll($source = "")
   {
-    $this->PluginBase();
+    $this->PluginBase($source);
 
     /* setup info */
     $this->id = "plogpoll";
     $this->desc = "Allows plog admins to include polls in their pLog";
     $this->author = "woodzy";
     $this->locale = Array();
-    
-    /* register the actions needed */
-    $this->registerAdminAction(
-        "plogpollViewList","AdminPlogPollListViewAction");
-    $this->registerAdminAction(
-        "plogpollAddPoll","AdminPlogPollAddPollAction");
-    $this->registerAdminAction(
-        "plogpollDeletePoll","AdminPlogPollDeletePollAction");
-    $this->registerAdminAction(
-        "plogpollNewPoll","AdminPlogPollNewPollViewAction");
+    $this->version = "20070708";
+    if( $source == "admin" )
+        $this->initAdmin();
+    else
+        $this->init();
+  }
 
-    $this->registerBlogAction(
-        "plogpollRegisterVote","PlogPollRegisterVoteAction");
+    function initAdmin(){
+            /* register the actions needed */
+        $this->registerAdminAction(
+            "plogpollViewList","AdminPlogPollListViewAction");
+        $this->registerAdminAction(
+            "plogpollAddPoll","AdminPlogPollAddPollAction");
+        $this->registerAdminAction(
+            "plogpollDeletePoll","AdminPlogPollDeletePollAction");
+        $this->registerAdminAction(
+            "plogpollNewPoll","AdminPlogPollNewPollViewAction");
 
-    /* setup the admin interface information */
-    $menu =& Menu::getMenu();
-    if( !$menu->entryExists( "/menu/Manage/PlogPoll" ))
-    	$this->addMenuEntry("/menu/Manage","PlogPoll","", "", true, false);
-    $this->addMenuEntry(
-        "/menu/Manage/PlogPoll","ViewPollList","?op=plogpollViewList");
-    $this->addMenuEntry(
-        "/menu/Manage/PlogPoll","NewPoll","?op=plogpollNewPoll");
+            /* setup the admin interface information */
+        $menu =& Menu::getMenu();
+        if( !$menu->entryExists( "/menu/Manage/PlogPoll" ))
+            $this->addMenuEntry("/menu/Manage","PlogPoll","", "", true, false);
+        $this->addMenuEntry(
+            "/menu/Manage/PlogPoll","ViewPollList","?op=plogpollViewList");
+        $this->addMenuEntry(
+            "/menu/Manage/PlogPoll","NewPoll","?op=plogpollNewPoll");
     
 
-    /* seems to be a good idea... 
-     * !!lifted from other plugins!! 
-     */
-    $this->_verifyTable();
-  }
+        $this->_verifyTable();
+    }
+
+    function init(){
+        $this->registerBlogAction(
+            "plogpollRegisterVote","PlogPollRegisterVoteAction");
+    }
   
   /*@private*/
   function _verifyTable()

Modified: plugins/branches/lifetype-1.2/unported/plogstaticrotator/pluginplogstaticrotator.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/plogstaticrotator/pluginplogstaticrotator.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/plogstaticrotator/pluginplogstaticrotator.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -16,39 +16,42 @@
 
 class PluginPlogStaticRotator extends PluginBase
 {
-  function PluginPlogStaticRotator()
+  function PluginPlogStaticRotator($source = "")
   {
-    $this->PluginBase();
+    $this->PluginBase($source);
 
     $this->id = "PlogStaticRotator";
     $this->desc = "Allows administrators to place a static block in their templates while also being able to rotate the content displayed in it";
     $this->author = "woodzy";
     $this->locale = Array();
+    $this->version = "20070708";
+    if( $source == "admin" )
+        $this->initAdmin();
+  }
 
-    $this->addMenuEntry("/menu/Manage","PlogStaticRotator","");
-    $this->addMenuEntry("/menu/Manage/PlogStaticRotator","ViewStaticContent",
-        "?op=plogViewRotatorContent");
-    $this->addMenuEntry("/menu/Manage/PlogStaticRotator","NewRotatorContent",
-        "?op=plogNewViewRotatorContent");
-    $this->addMenuEntry("/menu/Manage/PlogStaticRotator","EditContent",
-        "?op=plogEditViewRotatorContent");
+    function initAdmin(){
+        $this->addMenuEntry("/menu/Manage","PlogStaticRotator","");
+        $this->addMenuEntry("/menu/Manage/PlogStaticRotator","ViewStaticContent",
+                            "?op=plogViewRotatorContent");
+        $this->addMenuEntry("/menu/Manage/PlogStaticRotator","NewRotatorContent",
+                            "?op=plogNewViewRotatorContent");
+        $this->addMenuEntry("/menu/Manage/PlogStaticRotator","EditContent",
+                            "?op=plogEditViewRotatorContent");
 
-    $this->registerAdminAction("plogViewRotatorContent",
-        "AdminPlogStaticRotatorViewAction");
-    $this->registerAdminAction("plogNewRotatorContent",
-        "AdminPlogStaticRotatorNewAction");
-    $this->registerAdminAction("plogNewViewRotatorContent",
-        "AdminPlogStaticRotatorNewViewAction");
-    $this->registerAdminAction('plogEditViewRotatorContent',
-        "AdminPlogStaticRotatorEditViewAction");
-    $this->registerAdminAction('plogEditRotatorContent',
-        "AdminPlogStaticRotatorEditAction");
-    $this->registerAdminAction('plogDeleteRotatorContent',
-        "AdminPlogStaticRotatorDeleteAction");
+        $this->registerAdminAction("plogViewRotatorContent",
+                                   "AdminPlogStaticRotatorViewAction");
+        $this->registerAdminAction("plogNewRotatorContent",
+                                   "AdminPlogStaticRotatorNewAction");
+        $this->registerAdminAction("plogNewViewRotatorContent",
+                                   "AdminPlogStaticRotatorNewViewAction");
+        $this->registerAdminAction('plogEditViewRotatorContent',
+                                   "AdminPlogStaticRotatorEditViewAction");
+        $this->registerAdminAction('plogEditRotatorContent',
+                                   "AdminPlogStaticRotatorEditAction");
+        $this->registerAdminAction('plogDeleteRotatorContent',
+                                   "AdminPlogStaticRotatorDeleteAction");
+    }
 
-    $this->install;
-  }
-
   function install()
   {
     $fields = "

Modified: plugins/branches/lifetype-1.2/unported/port/pluginport.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/port/pluginport.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/port/pluginport.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -52,16 +52,18 @@
 	class PluginPort extends PluginBase
 	{
 
-		function PluginPort()
+		function PluginPort($source = "")
 		{
-			$this->PluginBase();
+			$this->PluginBase($source);
 			
 			$this->id = "port";
 			$this->desc = "Use the Port plugin to import your entries from other softwares (that use MySQL DB).";
 			$this->author = "Bradley Liang";
 			$this->locales = Array();
-			
-			$this->init();
+			$this->version = "20070708";
+            
+            if($source == "admin")
+                $this->initAdmin();
 		}
 
 		function init()

Modified: plugins/branches/lifetype-1.2/unported/rightschooser/pluginrightschooser.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/rightschooser/pluginrightschooser.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/rightschooser/pluginrightschooser.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -11,22 +11,24 @@
         var $prefix;
         var $pluginEnabled;       
     
-        function PluginRightsChooser()
+        function PluginRightsChooser($source = "")
         {
-            $this->PluginBase();
+            $this->PluginBase($source);
   
             $this->id = "rightschooser";
             $this->author = "Bill Yuan-yao Shih";
             $this->desc = "This plugin allows you to select and apply a license to your individual blogs. Displays the button and metadata automatically.";
-  
+            $this->version = "20070708";
+            
             $this->prefix = Db::getPrefix();
             
             $this->locales = Array( "en_UK" , "zh_TW" , "zh_CN" );
-            
-            $this->init();            
+
+            if($source == "admin")
+                $this->initAdmin();
         }
 
-		function init()
+		function initAdmin()
 		{
             $this->registerAdminAction( "rightschooser", "PluginRightsChooserConfigAction" );
 			$this->registerAdminAction( "updateRightsChooserConfig", "PluginRightsChooserUpdateConfigAction" );

Modified: plugins/branches/lifetype-1.2/unported/secret/pluginsecret.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/secret/pluginsecret.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/secret/pluginsecret.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -9,27 +9,26 @@
     {
         var $pluginEnabled;
         
-        function PluginSecret()
+        function PluginSecret($source = "")
         {
-            $this->PluginBase();
+            $this->PluginBase($source);
             
             $this->id = "secret";
             $this->desc = "This plugin offers the password protect to specific articles, unless user provide the right password or they can not see the articles.";
             $this->locales = Array( "en_UK" , "zh_TW" , "zh_CN" );
             $this->author = "The LifeType Project";
-            
-            $this->init();
+            $this->version = "20070708";
+            if( $source == "admin" )
+                $this->initAdmin();
+            else
+                $this->init();
+
         }
                 
         /**
          * registers all the filters and actions that we're going to use
          */
-        function init()
-        {
-            lt_include( PLOG_CLASS_PATH."plugins/secret/class/security/secretitemfilter.class.php" );
-            // we only need to register a filter
-            $this->registerFilter( "SecretItemFilter" );
-
+        function initAdmin(){
 			// register our action and menu entry
 			$this->registerAdminAction( "pluginSecretSettings", "AdminSecretPluginSettingsAction" );
 			$this->registerAdminAction( "pluginSecretUpdateSettings", "AdminSecretPluginUpdateSettingsAction" );			  
@@ -38,9 +37,16 @@
             $menu =& Menu::getMenu();
             if( !$menu->entryExists( "/menu/controlCenter/manageSecurityPlugins" ))                     
                 $this->addMenuEntry( "/menu/controlCenter", "manageSecurityPlugins", "", "", true, false );
-            $this->addMenuEntry( "/menu/controlCenter/manageSecurityPlugins", "pluginSecretSettings", "admin.php?op=pluginSecretSettings", "", true, false );
+            $this->addMenuEntry( "/menu/controlCenter/manageSecurityPlugins", "pluginSecretSettings",
+                                 "?op=pluginSecretSettings", "", true, false );
         }
 
+        function init(){
+            lt_include( PLOG_CLASS_PATH."plugins/secret/class/security/secretitemfilter.class.php" );
+            // we only need to register a filter
+            $this->registerFilter( "SecretItemFilter" );
+        }
+
 		function register()
 		{
 		    $blogSettings = $this->blogInfo->getSettings();

Modified: plugins/branches/lifetype-1.2/unported/shoutbox/pluginshoutbox.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/shoutbox/pluginshoutbox.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/shoutbox/pluginshoutbox.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -18,25 +18,35 @@
 class PluginShoutbox extends PluginBase  {
     var $s;
 
-    function PluginShoutbox()
+    function PluginShoutbox($source = "")
     {
-        $this->PluginBase();
+        $this->PluginBase($source);
 
         $this->desc    = "Shoutbox plugin: unleash your visitors";
         $this->author  = "Palantir (radar at netpalantir.it)";
         $this->id      = "shoutbox";
         $this->locales = Array( "en_UK", "it_IT");
+        $this->version = "20070708";
+        if( $source == "admin" )
+            $this->initAdmin();
+        else
+            $this->init();
+    }
 
+    function initAdmin(){
         $this->registerAdminAction("shoutbox", "PluginShoutboxAction" );
         $this->registerAdminAction("shoutboxConfig", "PluginShoutboxConfigAction" );
         $this->registerAdminAction("updateShoutboxConfig", "PluginShoutboxUpdateConfigAction" );
         $this->registerAdminAction("deleteShouts", "PluginShoutboxDeleteShoutsAction" );
         
+        $this->addMenuEntry("/menu/controlCenter/manageSettings", "Shoutbox", "?op=shoutbox", "" );
+            // TODO: do we need to call init() here?
+    }
+
+    function init(){
         $this->registerBlogAction("shoutboxHistory", "PluginShoutboxHistoryAction" );
         $this->registerBlogAction("shoutboxQuickDelete", "PluginShoutboxQuickDeleteAction" );
         $this->registerBlogAction("shoutboxNewShout", "PluginShoutboxNewShoutAction" );
-        
-        $this->addMenuEntry("/menu/controlCenter/manageSettings", "Shoutbox", "?op=shoutbox", "" );
     }
 
     function process( $eventType, $params )

Modified: plugins/branches/lifetype-1.2/unported/stickyposts/pluginstickyposts.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/stickyposts/pluginstickyposts.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/stickyposts/pluginstickyposts.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,7 +1,6 @@
 <?php
 
     lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
     lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
     
     /**
@@ -16,20 +15,21 @@
 		var $maxStickys;
 		var $maxAnnounces;
         
-        function PluginStickyPosts()
+        function PluginStickyPosts($source = "")
         {
-			$this->PluginBase();
+			$this->PluginBase($source);
 			
             $this->id = "stickyposts";
             $this->author = "lss(1.0)/EagleKing(porting to 1.1)";
             $this->desc = "This plugin offers features to get all articles from specific article cateogries as announcements and sticky articles.";
-  
+            $this->version = "20070708";
             $this->locales = Array( "en_UK" , "zh_TW" , "zh_CN", "es_ES" );
-            
-            $this->init();
+
+            if($source == "admin")
+                $this->initAdmin();
         }
 
-		function init()
+		function initAdmin()
 		{
 			$this->registerAdminAction( "stickyposts", "PluginStickyPostsConfigAction" );
 			$this->registerAdminAction( "updatestickyposts", "PluginStickyPostsUpdateConfigAction" );

Modified: plugins/branches/lifetype-1.2/unported/subscribe/pluginsubscribe.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/subscribe/pluginsubscribe.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/subscribe/pluginsubscribe.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -11,29 +11,27 @@
     {
         var $_pluginEnabled;
         
-        function PluginSubscribe(){
-            $this->PluginBase();
+        function PluginSubscribe($source = ""){
+            $this->PluginBase($source);
             
             $this->id = "subscribe";
             $this->desc = "Sends email notifications to visitors if they ".
                 "sign up for them.";
             $this->author = "Jon Daley";
             $this->locales = Array("en_UK");
-            
+            $this->version = "20070708";
+			if( $source == "admin" )
+				$this->initAdmin();
+			else
+				$this->init();
+        }
+
+        function initAdmin(){
                 // register our actions
             $this->registerAdminAction("subscribe",
                                        "PluginSubscribeShowConfigAction");
             $this->registerAdminAction("subscribeUpdate",
                                        "PluginSubscribeUpdateConfigAction");
-			$this->registerBlogAction("subscribe",
-                                      "PluginSubscribeShowAction");
-			$this->registerBlogAction("subscribeRegister",
-                                      "PluginSubscribeRegisterAction");
-			$this->registerBlogAction("subscribeConfirm",
-                                      "PluginSubscribeConfirmAction");
-			$this->registerBlogAction("subscribeRemove",
-                                      "PluginSubscribeRemoveAction");
-            
                 // register our menu options
 			$menu =& Menu::getMenu();
 			if(!$menu->entryExists("/menu/controlCenter/manageRecentPlugins"))
@@ -43,13 +41,24 @@
             $this->addMenuEntry("/menu/controlCenter/manageRecentPlugins",
                                 "subscribe_subscriptions",
                                 "?op=subscribe", "");
-
+            this->init(); // TODO: only needed for the POST_ADD, maybe just do that here instead of calling init()?
+        }
+        
+        function init(){
+			$this->registerBlogAction("subscribe",
+                                      "PluginSubscribeShowAction");
+			$this->registerBlogAction("subscribeRegister",
+                                      "PluginSubscribeRegisterAction");
+			$this->registerBlogAction("subscribeConfirm",
+                                      "PluginSubscribeConfirmAction");
+			$this->registerBlogAction("subscribeRemove",
+                                      "PluginSubscribeRemoveAction");
                 // we care about when posts and comments are posted
             $this->registerNotification(EVENT_POST_POST_ADD);
             $this->registerNotification(EVENT_POST_COMMENT_ADD);
                 // We need a filter because the email address is required
                 // if the subscribe checkbox is checked.
-			$this->registerFilter("SubscribeFilter");
+            $this->registerFilter("SubscribeFilter");
         }
 
 	    function isEnabled(){

Modified: plugins/branches/lifetype-1.2/unported/templatefilter/plugintemplatefilter.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/templatefilter/plugintemplatefilter.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/templatefilter/plugintemplatefilter.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -20,17 +20,17 @@
 	class PluginTemplateFilter extends PluginBase
 	{
 	
-		function PluginTemplateFilter()
+		function PluginTemplateFilter($source = "")
 		{
 			
 		    global $arrayPluginTemplateFilterSmartyPostFilter;
 		    global $arrayPluginTemplateFilterSmartyPreFilter;
 		    
-			$this->PluginBase();
+			$this->PluginBase($source);
 			
 			$this->id = "templatefilter";
 			$this->author = "EagleKing";
-            
+            $this->version = "20070708";
       		//no menu now ...      		
       		
       		if (!isset($arrayPluginTemplateFilterSmartyPostFilter))
@@ -41,7 +41,7 @@
       		//test only , for test  the plugin is work or not 
       		$arrayPluginTemplateFilterSmartyPostFilter[] = Array(
       		  "pattern" => "'</head>'",
-      		  "replace" => "</head>PluginTemplateFilterSmartyPostFilter Apllyed here",
+      		  "replace" => "</head>PluginTemplateFilterSmartyPostFilter applied here",
       		  "templatename" => "all",
       		  "group" => 0 ,
       		  "onlymatch" => false,
@@ -65,44 +65,6 @@
       		
       		if (!isset($arrayPluginTemplateFilterSmartyPreFilter))
       			$arrayPluginTemplateFilterSmartyPreFilter = array();
-      	
-      	    //this is before complie
-      	    
-      	    //replace <!-- \[authImage plugin\] --> to AuthImage
-      		$arrayPluginTemplateFilterSmartyPreFilter[] = Array(
-      		  "pattern" => "'<!-- \[authImage plugin\] -->'",
-      		  "replace" => "{if \$authimage->isEnabled()}
-<div><label for=\"authImage\">authImage</label><input type=\"text\" name=\"authImage\" id=\"authImage\" value=\"\" />&nbsp;{\$authimage->show()}</div>
-{/if}",
-      		  "templatename" => "commentform.template",
-      		  "group" => 5 ,
-      		  "onlymatch" => false,
-      		  "disabled" => false
-      		);   
-      		
-      		//has install authImage in template ?
-      		$arrayPluginTemplateFilterSmartyPreFilter[] = Array(
-      		  "pattern" => "/authImage/i",
-      		  "replace" => "",
-      		  "templatename" => "commentform.template",
-      		  "group" => 5,
-      		  "onlymatch" => true,
-      		  "disabled" => false
-      		); 
-      		
-      		//try to find a correct postion to put AuthImage anyway
-      		$arrayPluginTemplateFilterSmartyPreFilter[] = Array(
-      		  "pattern" => "/<\/form>/i",
-      		  "replace" => "{if \$authimage->isEnabled()}
-<div><label for=\"authImage\">authImage</label><input type=\"text\" name=\"authImage\" id=\"authImage\" value=\"\" />&nbsp;{\$authimage->show()}</div>
-{/if} 
-</form>",
-      		  "templatename" => "commentform.template",
-      		  "group" => 5 ,
-      		  "onlymatch" => false,
-      		  "disabled" => false
-      		);
-      		          
 		}		
 	}
 	

Modified: plugins/branches/lifetype-1.2/unported/textparser/plugintextparser.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/textparser/plugintextparser.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/textparser/plugintextparser.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -14,24 +14,34 @@
 	class PluginTextParser extends PluginBase 
 	{
 	
-		function PluginTextParser()
+		function PluginTextParser($source = "")
 		{
-			$this->PluginBase();
+			$this->PluginBase($source);
 			
 			$this->desc = "A plugin that allows users to use wiki markup in their posts.";
 			$this->author = "The LifeType Project";
 			$this->id = "textparser";
 			$this->locales = Array( "en_UK", "zh_TW" );
-			
-			// register the event we are going to need
+			$this->version = "20070708";
+
+			if( $source == "admin" )
+				$this->initAdmin();
+			else
+				$this->init();
+        }
+
+        function init(){
+                // register the event we are going to need
 			$this->registerNotification( EVENT_TEXT_FILTER );
-			
+        }
+
+        function initAdmin(){
 			// the two actions that will take care of updating the plugin settings
 			$this->registerAdminAction( "pluginTextParserSettings", "AdminPluginTextParserSettingsAction" );
-			$this->registerAdminAction( "updatePluginTextParserSettings", "AdminPluginTextParserUpdateSettingsAction" );			
+			$this->registerAdminAction( "updatePluginTextParserSettings", "AdminPluginTextParserUpdateSettingsAction" );
 			
 			// and finally add an entry to the menu
-			$this->addMenuEntry( "/menu/Manage/managePosts", "TextParser", "admin.php?op=pluginTextParserSettings", "" );
+			$this->addMenuEntry( "/menu/Manage/managePosts", "TextParser", "?op=pluginTextParserSettings", "" );
 		}
 		
 		/**
@@ -51,7 +61,7 @@
 		
 			// some little check to prevent misunderstandings from happening...
 			if( $eventType != EVENT_TEXT_FILTER ) {
-				throw( new Exception( "WTF? The TextParser plugin should only receive EVENT_TEXT_RENDER events!" ));
+				throw( new Exception( "The TextParser plugin should only receive EVENT_TEXT_RENDER events!" ));
 				die();
 			}
 			

Modified: plugins/branches/lifetype-1.2/unported/topcommentposts/plugintopcommentposts.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/topcommentposts/plugintopcommentposts.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/topcommentposts/plugintopcommentposts.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -13,22 +13,24 @@
         var $pluginEnabled;
         var $maxPosts;        
     
-        function PluginTopCommentPosts()
+        function PluginTopCommentPosts($source = "")
         {
-            $this->PluginBase();
+            $this->PluginBase($source);
   
             $this->id = "topcommentposts";
             $this->author = "Mark Wu";
             $this->desc = "This plugin offers the rank list of articles by number of comments.";
-  
+            $this->version = "20070708";
+            
             $this->prefix = Db::getPrefix();
             
            $this->locales = Array( "en_UK" , "zh_TW" , "zh_CN" );
             
-            $this->init();            
+           if($source == "admin")
+               $this->initAdmin();
         }
 
-		function init()
+		function initAdmin()
 		{
             $this->registerAdminAction( "topcommentposts", "PluginTopCommentPostsConfigAction" );
 			$this->registerAdminAction( "updateTopCommentPostsConfig", "PluginTopCommentPostsUpdateConfigAction" );

Modified: plugins/branches/lifetype-1.2/unported/topcommentvisitors/plugintopcommentvisitors.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/topcommentvisitors/plugintopcommentvisitors.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/topcommentvisitors/plugintopcommentvisitors.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -10,20 +10,22 @@
         var $pluginEnabled;
         var $maxVisitors;        
 
-        function PluginTopCommentVisitors()
+        function PluginTopCommentVisitors($source = "")
         {
-            $this->PluginBase();
+            $this->PluginBase($source);
   
             $this->id = "topcommentvisitors";
             $this->author = "Mark Wu";
             $this->desc = "This plugin offers the rank list of visitors by number of comments.";
-  
+            $this->version = "20070708";
+            
             $this->locales = Array( "en_UK" , "zh_TW" , "zh_CN" );
             
-            $this->init();            
+            if($source == "admin")
+                $this->initAdmin();
         }
 
-		function init()
+		function initAdmin()
 		{
             $this->registerAdminAction( "topcommentvisitors", "PluginTopCommentVisitorsConfigAction" );
 			$this->registerAdminAction( "updateTopCommentVisitorsConfig", "PluginTopCommentVisitorsUpdateConfigAction" );

Modified: plugins/branches/lifetype-1.2/unported/toptrackbackposts/plugintoptrackbackposts.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/toptrackbackposts/plugintoptrackbackposts.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/toptrackbackposts/plugintoptrackbackposts.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -13,22 +13,24 @@
         var $pluginEnabled;
         var $maxPosts;        
     
-        function PluginTopTrackbackPosts()
+        function PluginTopTrackbackPosts($source = "")
         {
-            $this->PluginBase();
+            $this->PluginBase($source);
   
             $this->id = "toptrackbackposts";
             $this->author = "Mark Wu";
             $this->desc = "This plugin offers the rank list of articles by number of trackbacks.";
-  
+            $this->version = "20070708";
+            
             $this->prefix = Db::getPrefix();
             
             $this->locales = Array( "en_UK" , "zh_TW" , "zh_CN" );
             
-            $this->init();            
+            if($source == "admin")
+                $this->initAdmin();
         }
 
-		function init()
+		function initAdmin()
 		{
             $this->registerAdminAction( "toptrackbackposts", "PluginTopTrackbackPostsConfigAction" );
 			$this->registerAdminAction( "updateTopTrackbackPostsConfig", "PluginTopTrackbackPostsUpdateConfigAction" );

Modified: plugins/branches/lifetype-1.2/unported/weather/pluginweather.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/weather/pluginweather.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/weather/pluginweather.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,7 +1,6 @@
 <?php
 
     lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-    lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
     lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
     lt_include( PLOG_CLASS_PATH."class/data/Date.class.php" );
     
@@ -16,20 +15,22 @@
         var $area, $width, $height;			
 
 
-        function PluginWeather()
+        function PluginWeather($source = "")
         {
-			$this->PluginBase();
+			$this->PluginBase($source);
 			
             $this->id = "weather";
             $this->author = "Jase Chen";
             $this->desc = "";
-  
+            $this->version = "20070708";
+            
             $this->locales = Array( "en_UK" , "zh_TW" );
-            
-            $this->init();
+
+            if($source == "admin")
+                $this->initAdmin();
         }
 
-		function init()
+		function initAdmin()
 		{
 			$this->registerAdminAction( "weather", "PluginWeatherConfigAction" );
 			$this->registerAdminAction( "updateweather", "PluginWeatherUpdateConfigAction" );

Modified: plugins/branches/lifetype-1.2/unported/whoonline/pluginwhoonline.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/whoonline/pluginwhoonline.class.php	2007-07-07 13:14:52 UTC (rev 5631)
+++ plugins/branches/lifetype-1.2/unported/whoonline/pluginwhoonline.class.php	2007-07-08 13:02:40 UTC (rev 5632)
@@ -1,7 +1,6 @@
 <?php
 // This class file is a compact version of the 2 main classes we use.
-lt_include( "class/plugin/pluginbase.class.php" );
-lt_include( "class/plugin/pluginmanager.class.php" );
+lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
 lt_include( PLOG_CLASS_PATH."class/dao/model.class.php" );
 lt_include( PLOG_CLASS_PATH."class/net/client.class.php" );
 lt_include( PLOG_CLASS_PATH."debug.php" );
@@ -12,8 +11,9 @@
 class PluginWhoOnline extends PluginBase {
 	var $clientip;
 	var $tstamp;
-    	function PluginWhoOnline() { // Declare some about info
-		$this->PluginBase();
+    function PluginWhoOnline($source = "") { // Declare some about info
+        $this->PluginBase($source);
+        $this->version = "20070708";
 		$this->desc = "
 <p>This plugin will allow your visitors to view how many other visitors are online at the same time. Well it actual does a bit more than that. It can also serve as a simple hit counter and record the most number of online users.<br>
 It is pretty easy to use. For now if you want to configure the capture time just edit the top of the plugin. It is
@@ -218,5 +218,5 @@
 		return $count;
 	}
 }
-PluginManager::registerPlugin( "whoonline", "PluginWhoOnline" );
+
 ?>



More information about the pLog-svn mailing list