[pLog-svn] r1163 - in plugins/trunk/contentfilter: . class/action class/view templates

mark at devel.plogworld.net mark at devel.plogworld.net
Wed Feb 23 08:30:31 GMT 2005


Author: mark
Date: 2005-02-23 08:30:30 +0000 (Wed, 23 Feb 2005)
New Revision: 1163

Added:
   plugins/trunk/contentfilter/class/action/adminfilteredcontentsettingsaction.class.php
   plugins/trunk/contentfilter/class/action/adminupdatefilteredcontentsettingsaction.class.php
   plugins/trunk/contentfilter/class/view/adminfilteredcontentsettingsview.class.php
   plugins/trunk/contentfilter/templates/filteredcontentsettings.template
Removed:
   plugins/trunk/contentfilter/class/action/adminupdateblogcontentfilterconfigaction.class.php
   plugins/trunk/contentfilter/class/action/adminupdatecontentfilterconfigaction.class.php
Modified:
   plugins/trunk/contentfilter/class/view/adminblogfilteredcontentview.class.php
   plugins/trunk/contentfilter/class/view/admineditblogfilteredcontentview.class.php
   plugins/trunk/contentfilter/class/view/admineditfilteredcontentview.class.php
   plugins/trunk/contentfilter/class/view/adminfilteredcontentview.class.php
   plugins/trunk/contentfilter/class/view/adminnewblogfilteredcontentview.class.php
   plugins/trunk/contentfilter/class/view/adminnewfilteredcontentview.class.php
   plugins/trunk/contentfilter/plugincontentfilter.class.php
   plugins/trunk/contentfilter/templates/addblogfilteredcontent.template
   plugins/trunk/contentfilter/templates/addfilteredcontent.template
   plugins/trunk/contentfilter/templates/blogfilteredcontent.template
   plugins/trunk/contentfilter/templates/editblogfilteredcontent.template
   plugins/trunk/contentfilter/templates/editfilteredcontent.template
   plugins/trunk/contentfilter/templates/filteredcontent.template
Log:
Modify contentfilter plugin. Now, I seperate the enable option to another page. I think that make more sense. messages need to refine.

Added: plugins/trunk/contentfilter/class/action/adminfilteredcontentsettingsaction.class.php
===================================================================
--- plugins/trunk/contentfilter/class/action/adminfilteredcontentsettingsaction.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/class/action/adminfilteredcontentsettingsaction.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -0,0 +1,27 @@
+<?php
+
+	include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+	include_once( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
+	include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/adminfilteredcontentsettingsview.class.php" );
+
+	/**
+	 * shows a form with the current configuration
+	 */
+	class AdminFilteredContentSettingsAction extends AdminAction
+	{
+		
+		function AdminFilteredContentSettingsAction( $actionInfo, $request )
+		{
+			$this->AdminAction( $actionInfo, $request );
+		}
+		
+		function perform()
+		{
+            $this->_view = new AdminFilteredContentSettingsView( $this->_blogInfo );
+			
+			$this->setCommonData();
+			
+			return true;
+		}
+	}
+?>
\ No newline at end of file

Deleted: plugins/trunk/contentfilter/class/action/adminupdateblogcontentfilterconfigaction.class.php
===================================================================
--- plugins/trunk/contentfilter/class/action/adminupdateblogcontentfilterconfigaction.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/class/action/adminupdateblogcontentfilterconfigaction.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -1,58 +0,0 @@
-<?php
-
-	include_once( PLOG_CLASS_PATH."class/action/admin/blogowneradminaction.class.php" );
-	include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/adminblogfilteredcontentview.class.php" );
-		
-	/**
-	 * updates the plugin configuration
-	 */
-	class AdminUpdateBlogContentFilterConfigAction extends BlogOwnerAdminAction
-	{
-		var $_pluginEnabled;
-		
-		function AdminUpdateBlogContentFilterConfigAction( $actionInfo, $request )
-		{
-			$this->AdminAction( $actionInfo, $request );
-		}
-		
-		function validate()
-		{
-            $this->_pluginEnabled = $this->_request->getValue( "pluginEnabled" );
-            $this->_pluginEnabled = ($this->_pluginEnabled != "" );			
-			
-			return true;
-		}
-		        
-		function perform()
-		{
-            // update the plugin configurations to blog setting
-			$blogSettings = $this->_blogInfo->getSettings();
-            $blogSettings->setValue( "plugin_contentfilter_enabled", $this->_pluginEnabled );
-            $this->_blogInfo->setSettings( $blogSettings ); 
-		
-			// save the blogs settings
-			$blogs = new Blogs();
-            if( !$blogs->updateBlog( $this->_blogInfo->getId(), $this->_blogInfo )) {
-                $this->_view = new AdminBlogFilteredContentView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_blocked_content"));
-                $this->setCommonData();
-
-                return false;                
-            }
-			
-			// if everything went ok...
-            $this->_blogInfo->setSettings( $blogSettings );
-            $this->_session->setValue( "blogInfo", $this->_blogInfo );
-            $this->saveSession();
-			
-			$this->_view = new AdminBlogFilteredContentView( $this->_blogInfo );
-			$this->_view->setSuccessMessage( $this->_locale->tr("blocked_content_updated_ok"));			
-			$this->setCommonData();
-			
-			// clear the cache
-			CacheControl::resetBlogCache( $this->_blogInfo->getId());			
-            
-            return true;		
-		}
-	}
-?>
\ No newline at end of file

Deleted: plugins/trunk/contentfilter/class/action/adminupdatecontentfilterconfigaction.class.php
===================================================================
--- plugins/trunk/contentfilter/class/action/adminupdatecontentfilterconfigaction.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/class/action/adminupdatecontentfilterconfigaction.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -1,58 +0,0 @@
-<?php
-
-	include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
-	include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/adminfilteredcontentview.class.php" );
-		
-	/**
-	 * updates the plugin configuration
-	 */
-	class AdminUpdateContentFilterConfigAction extends AdminAction
-	{
-		var $_pluginEnabled;
-		
-		function AdminUpdateContentFilterConfigAction( $actionInfo, $request )
-		{
-			$this->AdminAction( $actionInfo, $request );
-		}
-		
-		function validate()
-		{
-            $this->_pluginEnabled = $this->_request->getValue( "pluginEnabled" );
-            $this->_pluginEnabled = ($this->_pluginEnabled != "" );			
-			
-			return true;
-		}
-		        
-		function perform()
-		{
-            // update the plugin configurations to blog setting
-			$blogSettings = $this->_blogInfo->getSettings();
-            $blogSettings->setValue( "plugin_contentfilter_enabled", $this->_pluginEnabled );
-            $this->_blogInfo->setSettings( $blogSettings ); 
-		
-			// save the blogs settings
-			$blogs = new Blogs();
-            if( !$blogs->updateBlog( $this->_blogInfo->getId(), $this->_blogInfo )) {
-                $this->_view = new AdminFilteredContentView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_content_block_settings"));
-                $this->setCommonData();
-
-                return false;                
-            }
-			
-			// if everything went ok...
-            $this->_blogInfo->setSettings( $blogSettings );
-            $this->_session->setValue( "blogInfo", $this->_blogInfo );
-            $this->saveSession();
-			
-			$this->_view = new AdminFilteredContentView( $this->_blogInfo );
-			$this->_view->setSuccessMessage( $this->_locale->tr("content_block_settings_updated_ok"));			
-			$this->setCommonData();
-			
-			// clear the cache
-			CacheControl::resetBlogCache( $this->_blogInfo->getId());			
-            
-            return true;		
-		}
-	}
-?>
\ No newline at end of file

Added: plugins/trunk/contentfilter/class/action/adminupdatefilteredcontentsettingsaction.class.php
===================================================================
--- plugins/trunk/contentfilter/class/action/adminupdatefilteredcontentsettingsaction.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/class/action/adminupdatefilteredcontentsettingsaction.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -0,0 +1,59 @@
+<?php
+
+	include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+	include_once( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
+	include_once( PLOG_CLASS_PATH."plugins/contentfilter/class/view/adminfilteredcontentsettingsview.class.php" );
+		
+	/**
+	 * updates the plugin configuration
+	 */
+	class AdminUpdateFilteredContentSettingsAction extends AdminAction
+	{
+		var $_pluginEnabled;
+		
+		function AdminUpdateFilteredContentSettingsAction( $actionInfo, $request )
+		{
+			$this->AdminAction( $actionInfo, $request );
+		}
+		
+		function validate()
+		{
+            $this->_pluginEnabled = $this->_request->getValue( "pluginEnabled" );
+            $this->_pluginEnabled = ($this->_pluginEnabled != "" );			
+			
+			return true;
+		}
+		        
+		function perform()
+		{
+            // // update the plugin configurations to blog setting
+			$blogSettings = $this->_blogInfo->getSettings();
+            $blogSettings->setValue( "plugin_contentfilter_enabled", $this->_pluginEnabled );
+            $this->_blogInfo->setSettings( $blogSettings ); 
+		
+			// save the blogs settings
+			$blogs = new Blogs();
+            if( !$blogs->updateBlog( $this->_blogInfo->getId(), $this->_blogInfo )) {
+                $this->_view = new AdminFilteredContentSettingsView( $this->_blogInfo );
+                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
+                $this->setCommonData();
+
+                return false;                       
+            }
+			
+			// if everything went ok...
+            $this->_blogInfo->setSettings( $blogSettings );
+            $this->_session->setValue( "blogInfo", $this->_blogInfo );
+            $this->saveSession();
+			
+			$this->_view = new AdminFilteredContentSettingsView( $this->_blogInfo );
+			$this->_view->setSuccessMessage( $this->_locale->tr("contentfilter_settings_saved_ok"));			
+			$this->setCommonData();
+			
+			// clear the cache
+			CacheControl::resetBlogCache( $this->_blogInfo->getId());					
+            
+            return true;		
+		}
+	}
+?>
\ No newline at end of file

Modified: plugins/trunk/contentfilter/class/view/adminblogfilteredcontentview.class.php
===================================================================
--- plugins/trunk/contentfilter/class/view/adminblogfilteredcontentview.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/class/view/adminblogfilteredcontentview.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -25,6 +25,12 @@
 
             $this->setValue( "pluginEnabled", $pluginEnabled );
             $this->setValue( "filteredcontent", $blogFilteredContents );
+
+            if (!$pluginEnabled) {
+                $locale = $this->_blogInfo->getLocale();
+                $text = $locale->tr("error_contentfilter_not_enabled");
+                $this->setErrorMessage( $text );
+            }            
 			
 			parent::render();
 		}

Modified: plugins/trunk/contentfilter/class/view/admineditblogfilteredcontentview.class.php
===================================================================
--- plugins/trunk/contentfilter/class/view/admineditblogfilteredcontentview.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/class/view/admineditblogfilteredcontentview.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -19,10 +19,20 @@
 		
 		function render()
 		{
+			$blogSettings = $this->_blogInfo->getSettings();
+			$pluginEnabled = $blogSettings->getValue( "plugin_contentfilter_enabled" );
+			
             $contents = new FilteredContents();
             $filteredContent = $contents->getBlogFilteredContent( $this->_contentId, $this->_blogInfo->getId());
             
+            $this->setValue( "pluginEnabled", $pluginEnabled );
             $this->setValue( "filteredcontent", $filteredContent ); 
+            
+            if (!$pluginEnabled) {
+                $locale = $this->_blogInfo->getLocale();
+                $text = $locale->tr("error_contentfilter_not_enabled");
+                $this->setErrorMessage( $text );
+            }            
 			
 			parent::render();
 		}

Modified: plugins/trunk/contentfilter/class/view/admineditfilteredcontentview.class.php
===================================================================
--- plugins/trunk/contentfilter/class/view/admineditfilteredcontentview.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/class/view/admineditfilteredcontentview.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -19,11 +19,21 @@
 		
 		function render()
 		{
+			$blogSettings = $this->_blogInfo->getSettings();
+			$pluginEnabled = $blogSettings->getValue( "plugin_contentfilter_enabled" );
+
 		    $contents = new FilteredContents();
             $filteredContent = $contents->getBlogFilteredContent( $this->_contentId, 0 );
-            
+
+            $this->setValue( "pluginEnabled", $pluginEnabled );
             $this->setValue( "filteredcontent", $filteredContent ); 
-			
+
+            if (!$pluginEnabled) {
+                $locale = $this->_blogInfo->getLocale();
+                $text = $locale->tr("error_contentfilter_not_enabled");
+                $this->setErrorMessage( $text );
+            } 			
+
 			parent::render();
 		}
 	}

Added: plugins/trunk/contentfilter/class/view/adminfilteredcontentsettingsview.class.php
===================================================================
--- plugins/trunk/contentfilter/class/view/adminfilteredcontentsettingsview.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/class/view/adminfilteredcontentsettingsview.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -0,0 +1,28 @@
+<?php
+	
+	include_once( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
+
+	/**
+	 * implements the main view of the feed reader plugin
+	 */
+	class AdminFilteredContentSettingsView extends AdminPluginTemplatedView
+	{
+
+		function AdminFilteredContentSettingsView( $blogInfo )
+		{
+			$this->AdminPluginTemplatedView( $blogInfo, "contentfilter", "filteredcontentsettings" );
+		}
+		
+		function render()
+		{
+			// load some configuration settings
+			$blogSettings = $this->_blogInfo->getSettings();
+			$pluginEnabled = $blogSettings->getValue( "plugin_contentfilter_enabled" );
+			
+			// create a view and export the settings to the template
+			$this->setValue( "pluginEnabled", $pluginEnabled );		
+			
+			parent::render();
+		}
+	}
+?>
\ No newline at end of file

Modified: plugins/trunk/contentfilter/class/view/adminfilteredcontentview.class.php
===================================================================
--- plugins/trunk/contentfilter/class/view/adminfilteredcontentview.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/class/view/adminfilteredcontentview.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -24,7 +24,13 @@
             $blogFilteredContents = $filteredContents->getAllFilteredContents();
 
             $this->setValue( "pluginEnabled", $pluginEnabled );
-            $this->setValue( "filteredcontent", $blogFilteredContents );	
+            $this->setValue( "filteredcontent", $blogFilteredContents );
+            
+            if (!$pluginEnabled) {
+                $locale = $this->_blogInfo->getLocale();
+                $text = $locale->tr("error_contentfilter_not_enabled");
+                $this->setErrorMessage( $text );
+            }
 			
 			parent::render();
 		}

Modified: plugins/trunk/contentfilter/class/view/adminnewblogfilteredcontentview.class.php
===================================================================
--- plugins/trunk/contentfilter/class/view/adminnewblogfilteredcontentview.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/class/view/adminnewblogfilteredcontentview.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -15,6 +15,16 @@
 		
 		function render()
 		{
+			$blogSettings = $this->_blogInfo->getSettings();
+			$pluginEnabled = $blogSettings->getValue( "plugin_contentfilter_enabled" );
+
+            $this->setValue( "pluginEnabled", $pluginEnabled );
+
+            if (!$pluginEnabled) {
+                $locale = $this->_blogInfo->getLocale();
+                $text = $locale->tr("error_contentfilter_not_enabled");
+                $this->setErrorMessage( $text );
+            } 
         	// get the content that has been filtered by this blog
 			parent::render();
 		}

Modified: plugins/trunk/contentfilter/class/view/adminnewfilteredcontentview.class.php
===================================================================
--- plugins/trunk/contentfilter/class/view/adminnewfilteredcontentview.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/class/view/adminnewfilteredcontentview.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -15,6 +15,17 @@
 		
 		function render()
 		{
+			$blogSettings = $this->_blogInfo->getSettings();
+			$pluginEnabled = $blogSettings->getValue( "plugin_contentfilter_enabled" );
+
+            $this->setValue( "pluginEnabled", $pluginEnabled );
+
+            if (!$pluginEnabled) {
+                $locale = $this->_blogInfo->getLocale();
+                $text = $locale->tr("error_contentfilter_not_enabled");
+                $this->setErrorMessage( $text );
+            }            			
+
         	// get the content that has been filtered by this blog
 			parent::render();
 		}

Modified: plugins/trunk/contentfilter/plugincontentfilter.class.php
===================================================================
--- plugins/trunk/contentfilter/plugincontentfilter.class.php	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/plugincontentfilter.class.php	2005-02-23 08:30:30 UTC (rev 1163)
@@ -47,7 +47,6 @@
 			$this->registerAdminAction( "updateFilteredContent", "AdminUpdateFilteredContentAction" );
 			$this->registerAdminAction( "deleteFilteredContent", "AdminDeleteFilteredContentAction" );
 			$this->registerAdminAction( "deleteFilteredContents", "AdminDeleteFilteredContentAction" );
-			$this->registerAdminAction( "updateContentFilterConfig", "AdminUpdateContentFilterConfigAction" );
 			
 			// register the blog owner actions
 			$this->registerAdminAction( "blogFilteredContent", "AdminBlogFilteredContentsAction" );
@@ -57,17 +56,26 @@
 			$this->registerAdminAction( "updateBlogFilteredContent", "AdminUpdateBlogFilteredContentAction" );
 			$this->registerAdminAction( "deleteBlogFilteredContent", "AdminDeleteBlogFilteredContentAction" );
 			$this->registerAdminAction( "deleteBlogFilteredContents", "AdminDeleteBlogFilteredContentAction" );
-			$this->registerAdminAction( "updateBlogContentFilterConfig", "AdminUpdateBlogContentFilterConfigAction" );
+
+			// register the plugin settings actions
+			$this->registerAdminAction( "filteredContentSettings", "AdminFilteredContentSettingsAction" );
+			$this->registerAdminAction( "updateFilteredContentSettings", "AdminUpdateFilteredContentSettingsAction" );
 			
 			$menu =& Menu::getMenu();
+
 			if( !$menu->entryExists( "/menu/Manage/blogSecurity" ))
 				$this->addMenuEntry( "/menu/Manage", "blogSecurity", "", "", true, false );
             $this->addMenuEntry( "/menu/Manage/blogSecurity", "blogFilteredContent", "admin.php?op=blogFilteredContent", "blogFilteredContent", true, false );
             $this->addMenuEntry( "/menu/Manage/blogSecurity", "newBlogFilteredContent", "admin.php?op=newBlogFilteredContent", "newBlogFilteredContent", true, false );	
+
 			if( !$menu->entryExists( "/menu/adminSettings/siteSecurity" ))
 				$this->addMenuEntry( "/menu/adminSettings", "siteSecurity", "", "", true, false );
 			$this->addMenuEntry( "/menu/adminSettings/siteSecurity", "filteredContent", "admin.php?op=filteredContent", "filteredContent", false, true );
 			$this->addMenuEntry( "/menu/adminSettings/siteSecurity", "newFilteredContent", "admin.php?op=newFilteredContent", "newFilteredContent", false, true );
+
+            if( !$menu->entryExists( "/menu/controlCenter/manageSecurityPlugins" ))                     
+                $this->addMenuEntry( "/menu/controlCenter", "manageSecurityPlugins", "", "", true, false );
+            $this->addMenuEntry( "/menu/controlCenter/manageSecurityPlugins", "filteredContentSettings", "admin.php?op=filteredContentSettings", "", true, false );
 		}
 	}  
 ?>
\ No newline at end of file

Modified: plugins/trunk/contentfilter/templates/addblogfilteredcontent.template
===================================================================
--- plugins/trunk/contentfilter/templates/addblogfilteredcontent.template	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/templates/addblogfilteredcontent.template	2005-02-23 08:30:30 UTC (rev 1163)
@@ -1,5 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=newBlogFilteredContent title=$locale->tr("newBlogFilteredContent")}
+{if $pluginEnabled}
 <form name="newBlogFilteredContent" action="admin.php" method="post">
  <fieldset class="inputField">
  <legend>{$locale->tr("add_filtered_content")}</legend>
@@ -29,6 +30,9 @@
  </div>    
 
 </form>
+{else}
+ {include file="$admintemplatepath/errormessage.template"}
+{/if}
 {include file="$admintemplatepath/footernavigation.template"}
 {include file="$admintemplatepath/footer.template"}
 

Modified: plugins/trunk/contentfilter/templates/addfilteredcontent.template
===================================================================
--- plugins/trunk/contentfilter/templates/addfilteredcontent.template	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/templates/addfilteredcontent.template	2005-02-23 08:30:30 UTC (rev 1163)
@@ -1,5 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=newFilteredContent title=$locale->tr("newFilteredContent")}
+{if $pluginEnabled}
 <form name="newFilteredContent" action="admin.php" method="post">
  <fieldset class="inputField">
  <legend>{$locale->tr("add_filtered_content")}</legend>
@@ -29,5 +30,8 @@
  </div>    
 
 </form>
+{else}
+ {include file="$admintemplatepath/errormessage.template"}
+{/if}
 {include file="$admintemplatepath/footernavigation.template"}
 {include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Modified: plugins/trunk/contentfilter/templates/blogfilteredcontent.template
===================================================================
--- plugins/trunk/contentfilter/templates/blogfilteredcontent.template	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/templates/blogfilteredcontent.template	2005-02-23 08:30:30 UTC (rev 1163)
@@ -1,28 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=blogFilteredContent title=$locale->tr("blogFilteredContent")}
-<div id="list_nav_bar">
- <div id="list_nav_select">
-  <form id="blogContentFilter" action="admin.php" method="post">
-   <fieldset>
-    <legend>{$locale->tr("label_configuration")}</legend>
-    <div class="list_nav_option">
-     <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("contentfilter_plugin_enabled")}
-     </div>
-    </div>
-    <div class="list_nav_option">
-     <br />
-     <input type="hidden" name="op" value="updateBlogContentFilterConfig">
-     <input type="submit" name="{$locale->tr("update_settings")}" value="{$locale->tr("update")}">
-    </div>
-   </fieldset> 
-  </form> 
- </div>
- <br style="clear:both">
-</div>
-
+{if $pluginEnabled}
 <form name="blogFilteredContent" action="admin.php" method="post">
  <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
@@ -58,6 +36,9 @@
   </div> 
  </div>
 </form>
+{else}
+ {include file="$admintemplatepath/errormessage.template"}
+{/if}
 {include file="$admintemplatepath/footernavigation.template"}
 {include file="$admintemplatepath/footer.template"}
 

Modified: plugins/trunk/contentfilter/templates/editblogfilteredcontent.template
===================================================================
--- plugins/trunk/contentfilter/templates/editblogfilteredcontent.template	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/templates/editblogfilteredcontent.template	2005-02-23 08:30:30 UTC (rev 1163)
@@ -1,5 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=blogFilteredContent title=$locale->tr("blogFilteredContent")}
+{if $pluginEnabled}
 <form name="editBlogFilteredContent" action="admin.php" method="post">
  <fieldset class="inputField">
  <legend>{$locale->tr("edit_filtered_content")}</legend>
@@ -30,6 +31,9 @@
  </div>   
 
 </form>
+{else}
+ {include file="$admintemplatepath/errormessage.template"}
+{/if}
 {include file="$admintemplatepath/footernavigation.template"}
 {include file="$admintemplatepath/footer.template"}
 

Modified: plugins/trunk/contentfilter/templates/editfilteredcontent.template
===================================================================
--- plugins/trunk/contentfilter/templates/editfilteredcontent.template	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/templates/editfilteredcontent.template	2005-02-23 08:30:30 UTC (rev 1163)
@@ -1,5 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=filteredContent title=$locale->tr("filteredContent")}
+{if $pluginEnabled}
 <form name="editFilteredContent" action="admin.php" method="post">
  <fieldset class="inputField">
  <legend>{$locale->tr("edit_filtered_content")}</legend>
@@ -30,5 +31,8 @@
  </div>   
 
 </form>
+{else}
+ {include file="$admintemplatepath/errormessage.template"}
+{/if}
 {include file="$admintemplatepath/footernavigation.template"}
 {include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Modified: plugins/trunk/contentfilter/templates/filteredcontent.template
===================================================================
--- plugins/trunk/contentfilter/templates/filteredcontent.template	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/templates/filteredcontent.template	2005-02-23 08:30:30 UTC (rev 1163)
@@ -1,28 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=filteredContent title=$locale->tr("filteredContent")}
-<div id="list_nav_bar">
- <div id="list_nav_select">
-  <form id="contentFilter" action="admin.php" method="post">
-   <fieldset>
-    <legend>{$locale->tr("label_configuration")}</legend>
-    <div class="list_nav_option">
-     <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("contentfilter_plugin_enabled")}
-     </div>
-    </div>
-    <div class="list_nav_option">
-     <br />
-     <input type="hidden" name="op" value="updateContentFilterConfig">
-     <input type="submit" name="{$locale->tr("update_settings")}" value="{$locale->tr("update")}">
-    </div>
-   </fieldset> 
-  </form> 
- </div>
- <br style="clear:both">
-</div>
-  
+{if $pluginEnabled}
 <form name="filteredContent" action="admin.php" method="post">
  <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
@@ -59,5 +37,8 @@
   </div> 
  </div>
 </form>
+{else}
+ {include file="$admintemplatepath/errormessage.template"}
+{/if}
 {include file="$admintemplatepath/footernavigation.template"}
 {include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plugins/trunk/contentfilter/templates/filteredcontentsettings.template
===================================================================
--- plugins/trunk/contentfilter/templates/filteredcontentsettings.template	2005-02-22 18:41:46 UTC (rev 1162)
+++ plugins/trunk/contentfilter/templates/filteredcontentsettings.template	2005-02-23 08:30:30 UTC (rev 1163)
@@ -0,0 +1,24 @@
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=filteredContentSettings title=$locale->tr("contentfilter_plugin")}
+<form name="filteredContentSettings" method="post">
+ <fieldset class="inputField">
+ <legend>{$locale->tr("label_configuration")}</legend>  
+  {include file="$admintemplatepath/successmessage.template"}
+  {include file="$admintemplatepath/errormessage.template"}   
+  <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")}
+   </div>
+  </div>
+  
+ </fieldset>  
+
+ <div class="buttons">
+  <input type="hidden" name="op" value="updateFilteredContentSettings" />
+  <input type="reset" name="{$locale->tr("reset")}" />    
+  <input type="submit" name="{$locale->tr("update_settings")}" value="{$locale->tr("update")}" />
+ </div>
+</form>
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file




More information about the pLog-svn mailing list