[pLog-svn] r4848 - in plugins/branches/lifetype-1.2: . plogeshi unported

pwestbro at devel.lifetype.net pwestbro at devel.lifetype.net
Thu Feb 22 20:20:20 EST 2007


Author: pwestbro
Date: 2007-02-22 20:20:20 -0500 (Thu, 22 Feb 2007)
New Revision: 4848

Added:
   plugins/branches/lifetype-1.2/plogeshi/
Removed:
   plugins/branches/lifetype-1.2/unported/plogeshi/
Modified:
   plugins/branches/lifetype-1.2/plogeshi/pluginplogeshi.class.php
Log:
Ported the plogeshi plugin


Copied: plugins/branches/lifetype-1.2/plogeshi (from rev 4843, plugins/branches/lifetype-1.2/unported/plogeshi)

Modified: plugins/branches/lifetype-1.2/plogeshi/pluginplogeshi.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/plogeshi/pluginplogeshi.class.php	2007-02-22 22:44:30 UTC (rev 4843)
+++ plugins/branches/lifetype-1.2/plogeshi/pluginplogeshi.class.php	2007-02-23 01:20:20 UTC (rev 4848)
@@ -12,8 +12,10 @@
         var $_pluginEnabled;
         var $_ploGeshi;
 
-        function PluginPloGeSHi()
+        function PluginPloGeSHi( $source = "" )
         {
+			$this->PluginBase($source);
+
             // ---
             // set some information
             // ---
@@ -39,12 +41,22 @@
             $this->_ploGeshi = new PloGeSHi();
             
     
-            $this->init();  
+			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()
+        {
+            // ---
             // register actions for this plugin plus an option in the menu
             // ---
             $this->registerAdminAction( "PloGeSHiConfig", "PluginPloGeSHiConfigAction" );
@@ -56,9 +68,6 @@
             $menu =& Menu::getMenu();
             $this->addMenuEntry( "/menu/Manage/managePosts", "PloGeSHi", "admin.php?op=PloGeSHiConfig", "" );
             
-            // ---
-            // register the event we are going to need
-            $this->registerNotification( EVENT_TEXT_FILTER );
         }
 
         function register()
@@ -130,5 +139,16 @@
                 $params[ "text" ] = $css . $this->_colorText( $params[ "text" ] );
             }
         }
+
+
+   	    function getPluginConfigurationKeys()
+		{
+			lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+			
+			return( Array(
+				Array( "name" => "plugin_plogeshi_enabled", "type" => "boolean" ),
+			));
+		}
+
     }
 ?>
\ No newline at end of file



More information about the pLog-svn mailing list