[pLog-svn] r4219 - in plugins/trunk: authimage authimage/class/security authimage/templates contentfilter contentfilter/templates

oscar at devel.lifetype.net oscar at devel.lifetype.net
Tue Oct 31 18:11:13 GMT 2006


Author: oscar
Date: 2006-10-31 18:11:13 +0000 (Tue, 31 Oct 2006)
New Revision: 4219

Modified:
   plugins/trunk/authimage/class/security/authimagefilter.class.php
   plugins/trunk/authimage/pluginauthimage.class.php
   plugins/trunk/authimage/templates/authimage.template
   plugins/trunk/contentfilter/plugincontentfilter.class.php
   plugins/trunk/contentfilter/templates/filteredcontentsettings.template
Log:
'contentfilter' and 'authimage' plugins adapted to the new global plugin settings framework


Modified: plugins/trunk/authimage/class/security/authimagefilter.class.php
===================================================================
--- plugins/trunk/authimage/class/security/authimagefilter.class.php	2006-10-31 17:38:50 UTC (rev 4218)
+++ plugins/trunk/authimage/class/security/authimagefilter.class.php	2006-10-31 18:11:13 UTC (rev 4219)
@@ -31,7 +31,8 @@
 
         	// check if this section has been enabled or disabled
             $blogSettings = $blogInfo->getSettings();
-		    $pluginEnabled = $blogSettings->getValue( "plugin_authimage_enabled" );
+		    //$pluginEnabled = $blogSettings->getValue( "plugin_authimage_enabled" );
+			$pluginEnabled = $blogSettings->getValue( "plugin_authimage_enabled" );		
             if( !$pluginEnabled) {
             	$result = new PipelineResult();
                 return $result;

Modified: plugins/trunk/authimage/pluginauthimage.class.php
===================================================================
--- plugins/trunk/authimage/pluginauthimage.class.php	2006-10-31 17:38:50 UTC (rev 4218)
+++ plugins/trunk/authimage/pluginauthimage.class.php	2006-10-31 18:11:13 UTC (rev 4219)
@@ -167,7 +167,19 @@
                 }
                 closedir($handle); 
             }
-        }           
+        }
+
+		function getPluginConfigurationKeys()
+		{
+			lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+			
+			return( Array(
+				Array( "name" => "plugin_authimage_enabled", "type" => "boolean" ),
+				Array( "name" => "plugin_authimage_length", "validator" => new IntegerValidator(), "type" => "integer" ),
+				Array( "name" => "plugin_authimage_key", "validator" => new StringValidator(), "type" => "string" )
+			));
+		}
     }
         
 ?>

Modified: plugins/trunk/authimage/templates/authimage.template
===================================================================
--- plugins/trunk/authimage/templates/authimage.template	2006-10-31 17:38:50 UTC (rev 4218)
+++ plugins/trunk/authimage/templates/authimage.template	2006-10-31 18:11:13 UTC (rev 4219)
@@ -9,7 +9,7 @@
    <label for="pluginEnabled">{$locale->tr("label_enable")}</label>
    <span class="required"></span>
    <div class="formHelp">
-     <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled} checked="checked" {/if} value="1" />{$locale->tr("authimage_plugin_enabled")}
+     <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled}checked="checked"{/if} value="1" {user_cannot_override key=plugin_authimage_enabled}disabled="disabled"{/user_cannot_override} />{$locale->tr("authimage_plugin_enabled")}
    </div>
   </div> 
 
@@ -17,14 +17,14 @@
    <label for="length">{$locale->tr("label_length")}</label>
    <span class="required">*</span>
    <div class="formHelp">{$locale->tr("authimage_length")}</div>
-   <input class="text" type="text" name="length" id="length" value="{$length}" width="10" />
+   <input class="text" type="text" name="length" id="length" value="{$length}" width="10" {user_cannot_override key=plugin_authimage_length}disabled="disabled"{/user_cannot_override} />
   </div>
   
   <div class="field">
    <label for="key">{$locale->tr("label_key")}</label>
    <span class="required">*</span>
    <div class="formHelp">{$locale->tr("authimage_key")}</div>
-   <input class="text" type="text" name="key" id="key" value="{$key}" width="10" />
+   <input class="text" type="text" name="key" id="key" value="{$key}" width="10" {user_cannot_override key=plugin_authimage_key}disabled="disabled"{/user_cannot_override} />
   </div>
 
   <div class="field">

Modified: plugins/trunk/contentfilter/plugincontentfilter.class.php
===================================================================
--- plugins/trunk/contentfilter/plugincontentfilter.class.php	2006-10-31 17:38:50 UTC (rev 4218)
+++ plugins/trunk/contentfilter/plugincontentfilter.class.php	2006-10-31 18:11:13 UTC (rev 4219)
@@ -90,6 +90,13 @@
 	    function isEnabled()
 	    {
 	        return $this->pluginEnabled;
-	    }		
+	    }
+	
+		function getPluginConfigurationKeys()
+		{
+			return( Array(
+				Array( "name" => "plugin_contentfilter_enabled", "type" => "boolean" )
+			));
+		}
 	}  
 ?>
\ No newline at end of file

Modified: plugins/trunk/contentfilter/templates/filteredcontentsettings.template
===================================================================
--- plugins/trunk/contentfilter/templates/filteredcontentsettings.template	2006-10-31 17:38:50 UTC (rev 4218)
+++ plugins/trunk/contentfilter/templates/filteredcontentsettings.template	2006-10-31 18:11:13 UTC (rev 4219)
@@ -8,7 +8,7 @@
   <div class="field">
    <label for="pluginEnabled">{$locale->tr("label_enable")}</label>
    <div class="formHelp">   
-    <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled} checked="checked" {/if} value="1" />{$locale->tr("contentfilter_plugin_enabled")}
+    <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled} checked="checked" {/if} value="1"  {user_cannot_override key=plugin_contentfilter_enabled}disabled="disabled"{/user_cannot_override} />{$locale->tr("contentfilter_plugin_enabled")}
    </div>
   </div>
   



More information about the pLog-svn mailing list