[pLog-svn] r4814 - in plugins/branches/lifetype-1.2: authimage sitemap validatetrackback
pwestbro at devel.lifetype.net
pwestbro at devel.lifetype.net
Thu Feb 22 04:57:17 EST 2007
Author: pwestbro
Date: 2007-02-22 04:57:17 -0500 (Thu, 22 Feb 2007)
New Revision: 4814
Modified:
plugins/branches/lifetype-1.2/authimage/pluginauthimage.class.php
plugins/branches/lifetype-1.2/sitemap/pluginsitemap.class.php
plugins/branches/lifetype-1.2/validatetrackback/pluginvalidatetrackback.class.php
Log:
Changed the authimage plugin to only initialize the admin code if source ==
"admin", and to pass the source to the base class
Added similar capability to the sitemap and validatetrackback plugins
Modified: plugins/branches/lifetype-1.2/authimage/pluginauthimage.class.php
===================================================================
--- plugins/branches/lifetype-1.2/authimage/pluginauthimage.class.php 2007-02-22 09:53:42 UTC (rev 4813)
+++ plugins/branches/lifetype-1.2/authimage/pluginauthimage.class.php 2007-02-22 09:57:17 UTC (rev 4814)
@@ -22,7 +22,7 @@
function PluginAuthImage( $source = "" )
{
- $this->PluginBase();
+ $this->PluginBase( $source );
$this->id = "authimage";
$this->author = "Mark Wu";
@@ -31,10 +31,10 @@
$this->locales = Array( "en_UK" , "zh_TW" , "zh_CN", "es_ES", "de_DE" );
- if( $source == "index" )
+ if( $source == "admin" )
+ $this->initAdmin();
+ else
$this->init();
- else
- $this->initAdmin();
}
function init()
Modified: plugins/branches/lifetype-1.2/sitemap/pluginsitemap.class.php
===================================================================
--- plugins/branches/lifetype-1.2/sitemap/pluginsitemap.class.php 2007-02-22 09:53:42 UTC (rev 4813)
+++ plugins/branches/lifetype-1.2/sitemap/pluginsitemap.class.php 2007-02-22 09:57:17 UTC (rev 4814)
@@ -14,28 +14,34 @@
var $cacheFolder;
- function PluginSiteMap()
+ function PluginSiteMap( $source = "" )
{
- $this->PluginBase();
+ $this->PluginBase( $source );
$this->id = "sitemap";
$this->desc = "Generates Google Sitemap for all permalinks.";
$this->author = "Paul Westbrook";
$this->locales = Array( "en_UK", "de_DE" );
- $this->init();
+ if( $source == "admin" )
+ $this->initAdmin();
+ else
+ $this->init();
}
- /**
- * registers all the filters and actions that we're going to use
- */
function init()
- {
+ {
// register the events we want
$this->registerNotification( EVENT_POST_POST_ADD );
$this->registerNotification( EVENT_POST_POST_UPDATE );
$this->registerNotification( EVENT_POST_POST_DELETE );
-
+
+ }
+
+ function initAdmin()
+ {
+ include_once( PLOG_CLASS_PATH."class/template/menu/menu.class.php" );
+
// register an action that will allow users to see which comments have not been
// accepted yet
$this->registerAdminAction( "sitemapPluginSettings", "AdminSiteMapPluginSettingsAction" );
Modified: plugins/branches/lifetype-1.2/validatetrackback/pluginvalidatetrackback.class.php
===================================================================
--- plugins/branches/lifetype-1.2/validatetrackback/pluginvalidatetrackback.class.php 2007-02-22 09:53:42 UTC (rev 4813)
+++ plugins/branches/lifetype-1.2/validatetrackback/pluginvalidatetrackback.class.php 2007-02-22 09:57:17 UTC (rev 4814)
@@ -29,22 +29,32 @@
{
var $pluginEnabled;
- function PluginValidateTrackback()
+ function PluginValidateTrackback( $source = "" )
{
- $this->PluginBase();
+ $this->PluginBase( $source );
$this->id = "validatetrackback";
$this->desc = "Provides validation of trackbacks.";
$this->author = "Paul Westbrook";
$this->locales = Array( "en_UK", "zh_TW", "es_ES" );
- $this->init();
+ if( $source == "admin" )
+ $this->initAdmin();
+ else
+ $this->init();
}
+ function init()
+ {
+ // register the filter
+ $this->registerFilter( "ValidateTrackbackFilter" );
+ }
+
+
/**
* registers all the filters and actions that we're going to use
*/
- function init()
+ function initAdmin()
{
$this->registerFilter( "ValidateTrackbackFilter" );
More information about the pLog-svn
mailing list