[pLog-svn] r4975 - in plugins/branches/lifetype-1.2/tagcloud: . templates

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Sat Mar 3 20:34:52 EST 2007


Author: jondaley
Date: 2007-03-03 20:34:51 -0500 (Sat, 03 Mar 2007)
New Revision: 4975

Modified:
   plugins/branches/lifetype-1.2/tagcloud/plugintagcloud.class.php
   plugins/branches/lifetype-1.2/tagcloud/templates/tagcloud.template
Log:
updated for global overrides

Modified: plugins/branches/lifetype-1.2/tagcloud/plugintagcloud.class.php
===================================================================
--- plugins/branches/lifetype-1.2/tagcloud/plugintagcloud.class.php	2007-03-04 01:34:23 UTC (rev 4974)
+++ plugins/branches/lifetype-1.2/tagcloud/plugintagcloud.class.php	2007-03-04 01:34:51 UTC (rev 4975)
@@ -220,7 +220,7 @@
     	/*
 	* Return cloud of the latest articles
 	*/
-	function getTagCloud(){
+    function getTagCloud(){
 
         $saveFile = $this->cacheFolder."/tagcloud";  
 	    
@@ -237,5 +237,33 @@
 
         return $Cloud;
     }
+
+    function getPluginConfigurationKeys()
+    {
+        lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+        lt_include( PLOG_CLASS_PATH."class/data/validator/floatvalidator.class.php" );
+        lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+        
+        return( Array(
+                    Array( "name" => "plugin_tagcloud_enabled", "type" => "boolean" ),
+                    Array( "name" => "plugin_tagcloud_max_articles",
+                           "validator" => new IntegerValidator(), "type" => "integer" ),
+                    Array( "name" => "plugin_tagcloud_max_keywords",
+                           "validator" => new IntegerValidator(), "type" => "integer" ),
+                    Array( "name" => "plugin_tagcloud_min_size",
+                           "validator" => new FloatValidator(), "type" => "integer" ),
+                    Array( "name" => "plugin_tagcloud_max_size",
+                           "validator" => new FloatValidator(), "type" => "integer" ),
+                    Array( "name" => "plugin_tagcloud_min_weight",
+                           "validator" => new IntegerValidator(), "type" => "integer" ),
+                    Array( "name" => "plugin_tagcloud_max_weight",
+                           "validator" => new IntegerValidator(), "type" => "integer" ),
+                    Array( "name" => "plugin_tagcloud_min_word_length",
+                           "validator" => new IntegerValidator(), "type" => "integer" ),
+                    Array( "name" => "plugin_tagcloud_banned_keywords",
+                           "validator" => new StringValidator(), "type" => "string" ),
+                    ));
+    }
+
 }
 ?>
\ No newline at end of file

Modified: plugins/branches/lifetype-1.2/tagcloud/templates/tagcloud.template
===================================================================
--- plugins/branches/lifetype-1.2/tagcloud/templates/tagcloud.template	2007-03-04 01:34:23 UTC (rev 4974)
+++ plugins/branches/lifetype-1.2/tagcloud/templates/tagcloud.template	2007-03-04 01:34:51 UTC (rev 4975)
@@ -9,7 +9,12 @@
    <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("tagcloud_plugin_enabled")}
+    <input class="checkbox" type="checkbox" name="pluginEnabled"
+           id="pluginEnabled" {if $pluginEnabled} checked="checked" {/if}
+           {user_cannot_override
+               key=plugin_tagcloud_enabled}disabled="disabled"
+           {/user_cannot_override}
+           value="1" />{$locale->tr("tagcloud_plugin_enabled")} 
    </div>
   </div>
   
@@ -17,49 +22,77 @@
    <label for="width">{$locale->tr("max_articles")}</label>
    <span class="required">*</span>
    <div class="formHelp">{$locale->tr("tagcloud_articles")}</div>
-   <input class="text" type="text" name="articles" id="articles" value="{$articles}" width="10" />
+   <input class="text" type="text" name="articles" id="articles"
+          {user_cannot_override
+              key=plugin_tagcloud_max_articles}disabled="disabled"
+          {/user_cannot_override}
+          value="{$articles}" width="10" /> 
   </div>
 
   <div class="field">
    <label for="width">{$locale->tr("max_keywords")}</label>
    <span class="required">*</span>
    <div class="formHelp">{$locale->tr("tagcloud_keywords")}</div>
-   <input class="text" type="text" name="keyword" id="keyword" value="{$keyword}" width="10" />
+   <input class="text" type="text" name="keyword" id="keyword"
+           {user_cannot_override
+               key=plugin_tagcloud_max_keywords}disabled="disabled"
+           {/user_cannot_override}
+          value="{$keyword}" width="10" /> 
   </div>
 
   <div class="field">
    <label for="width">{$locale->tr("min_font_size")}</label>
    <span class="required">*</span>
    <div class="formHelp">{$locale->tr("tagcloud_min_font")}</div>
-   <input class="text" type="text" name="minFont" id="minFont" value="{$minFont}" width="10" />
+   <input class="text" type="text" name="minFont" id="minFont"
+           {user_cannot_override
+               key=plugin_tagcloud_min_size}disabled="disabled"
+           {/user_cannot_override}
+           value="{$minFont}" width="10" /> 
   </div>
 
  <div class="field">
    <label for="width">{$locale->tr("max_font_size")}</label>
    <span class="required">*</span>
    <div class="formHelp">{$locale->tr("tagcloud_max_font")}</div>
-   <input class="text" type="text" name="maxFont" id="maxFont" value="{$maxFont}" width="10" />
+   <input class="text" type="text" name="maxFont" id="maxFont"
+           {user_cannot_override
+               key=plugin_tagcloud_max_size}disabled="disabled"
+           {/user_cannot_override}
+          value="{$maxFont}" width="10" /> 
   </div>
 
   <div class="field">
    <label for="width">{$locale->tr("min_font_weight")}</label>
    <span class="required">*</span>
    <div class="formHelp">{$locale->tr("tagcloud_min_weight")}</div>
-   <input class="text" type="text" name="minWeight" id="minWeight" value="{$minWeight}" width="10" />
+   <input class="text" type="text" name="minWeight" id="minWeight"
+           {user_cannot_override
+               key=plugin_tagcloud_min_weight}disabled="disabled"
+           {/user_cannot_override}
+          value="{$minWeight}" width="10" /> 
   </div>
 
  <div class="field">
    <label for="width">{$locale->tr("max_font_weight")}</label>
    <span class="required">*</span>
    <div class="formHelp">{$locale->tr("tagcloud_max_weight")}</div>
-   <input class="text" type="text" name="maxWeight" id="maxWeight" value="{$maxWeight}" width="10" />
+   <input class="text" type="text" name="maxWeight" id="maxWeight"
+           {user_cannot_override
+               key=plugin_tagcloud_max_weight}disabled="disabled"
+           {/user_cannot_override}
+          value="{$maxWeight}" width="10" /> 
   </div>
 
  <div class="field">
    <label for="width">{$locale->tr("min_word_length")}</label>
    <span class="required">*</span>
    <div class="formHelp">{$locale->tr("tagcloud_min_word_length")}</div>
-   <input class="text" type="text" name="minWordLength" id="minWordLength" value="{$minWordLength}" width="3" />
+   <input class="text" type="text" name="minWordLength"
+           {user_cannot_override
+               key=plugin_tagcloud_min_word_length}disabled="disabled"
+           {/user_cannot_override}
+          id="minWordLength" value="{$minWordLength}" width="3" /> 
   </div>
 
  
@@ -67,7 +100,11 @@
    <label for="width">{$locale->tr("banned_keywords")}</label>
    <span class="required">*</span>
    <div class="formHelp">{$locale->tr("tagcloud_banned_keywords")}</div>
-   <input class="text" type="text" name="bannedKeywords" id="bannedKeywords" value="{$bannedKeywords}" width="10" />
+   <input class="text" type="text" name="bannedKeywords"
+           {user_cannot_override
+               key=plugin_tagcloud_banned_keywords}disabled="disabled"
+           {/user_cannot_override}
+          id="bannedKeywords" value="{$bannedKeywords}" width="10" /> 
   </div>
 
  



More information about the pLog-svn mailing list