Index: /branches/1.4/content/plugins/tags/tags.php
===================================================================
--- /branches/1.4/content/plugins/tags/tags.php	(revision 1952)
+++ /branches/1.4/content/plugins/tags/tags.php	(revision 1953)
@@ -3,9 +3,9 @@
  * name: Tags
  * description: Show tags, filter tags and RSS for tags
- * version: 1.7
+ * version: 1.8
  * folder: tags
  * class: Tags
  * type: tags
- * hooks: theme_index_top, header_include, header_include_raw, header_meta, show_post_extra_fields, show_post_extras, bookmarking_functions_preparelist, breadcrumbs, post_rss_feed
+ * hooks: theme_index_top, header_include, header_include_raw, header_meta, show_post_extra_fields, show_post_extras, bookmarking_functions_preparelist, breadcrumbs, post_rss_feed, admin_plugin_settings, admin_sidebar_plugin_settings
  * author: Nick Ramsay
  * authorurl: http://hotarucms.org/member.php?1-Nick
@@ -147,5 +147,15 @@
         
         $tags = explode(',', $h->post->tags);
-        
+
+	$tags_settings = $h->getSerializedSettings('tags');
+	
+	if ($tags_settings['tags_setting_exclude_active'] && $tags_settings['tags_setting_exclude_words'])  {
+	    $exclude_tags = explode(',', $tags_settings['tags_setting_exclude_words']);	    
+	    array_walk($exclude_tags, array($this,'trim_value'));	    
+	    if ($exclude_tags) {
+		$tags = array_diff( $tags, $exclude_tags );
+	    }
+	}
+
         // lots of nice issets for php 5.3 compatibility
         if (isset($vars[0]) && isset($vars[1]) && ($vars[0] == "tags") && ($vars[1] == "raw")) {
@@ -169,5 +179,16 @@
             echo "<div class='clear'>&nbsp;</div>\n";
         }
-    }
+
+    }
+
+
+    
+    //required for above array_walk method
+    public function trim_value(&$value)
+    { 
+	$value = trim($value);
+    }
+
+
     
     
Index: /branches/1.4/content/plugins/tags/tags_settings.php
===================================================================
--- /branches/1.4/content/plugins/tags/tags_settings.php	(revision 1953)
+++ /branches/1.4/content/plugins/tags/tags_settings.php	(revision 1953)
@@ -0,0 +1,128 @@
+<?php
+/**
+ * File: /plugins/tags/tags_settings.php
+ * Purpose: Admin settings for the tags plugin
+ *
+ * author: Nick Ramsay
+ * authorurl: http://hotarucms.org/member.php?1-Nick
+ *
+ * PHP version 5
+ *
+ * LICENSE: Hotaru CMS is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * Hotaru CMS is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with Hotaru CMS. If not, see http://www.gnu.org/licenses/.
+ *
+ * @category  Content Management System
+ * @package   HotaruCMS
+ * @author    Nick Ramsay <admin@hotarucms.org>
+ * @copyright Copyright (c) 2009, Hotaru CMS
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU General Public License
+ * @link      http://www.hotarucms.org/
+ */
+
+class TagsSettings
+{
+    /**
+     * Tags Settings Page
+     */
+    public function settings($h) {
+
+	echo "<h1>" . $h->lang["tags_settings_header"] . "</h1>";
+
+	 // If the form has been submitted, go and save the data...
+        if ($h->cage->post->getAlpha('submitted') == 'true') {
+            $this->saveSettings($h);
+        }
+              
+	// Get settings from database if they exist...
+        $tags_settings = $h->getSerializedSettings();
+
+	$settings = array( 'tags_setting_exclude_active' => '',
+			'tags_setting_exclude_words' => '',
+	    );
+
+	foreach ($settings as $setting => $value) {
+	    $$setting = $tags_settings[$setting];
+	    if (!$tags_settings[$setting]) { $$setting = $value; }
+	}
+
+	echo "<form name='tags_settings_form' action='" . BASEURL . "admin_index.php?page=plugin_settings&plugin=tags' method='post'>";
+
+	// setting1
+        echo "<p>" . $h->lang['tags_setting_exclude_active'] . " <input type='checkbox' name='tags_setting_exclude_active' value='tags_setting_exclude_active' " . $tags_setting_exclude_active . " ></p>";
+
+        // setting2
+        echo "<p><label for='tags_setting_exclude_words'>" . $h->lang['tags_setting_exclude_words'] . "</label><br/>";
+	echo "<textarea rows=8 cols=80 name='tags_setting_exclude_words' >";
+	echo $tags_setting_exclude_words;
+	echo "</textarea></p>";
+
+        echo "<br /><br />";
+        echo "<input type='hidden' name='submitted' value='true' />";
+        echo "<input type='submit' value='" . $h->lang["main_form_save"] . "' />";
+        echo "<input type='hidden' name='csrf' value='" . $h->csrfToken . "' />";
+        echo "</form>";
+
+    }
+
+    /**
+     * Save admin settings
+     *
+     * @return true
+     */
+    public function saveSettings($h)
+    {
+        $error = 0;
+
+        // show setting1?
+        if ($h->cage->post->keyExists('tags_setting_exclude_active')) {
+            $tags_setting_exclude_active = 'checked';
+        } else {
+            $tags_setting_exclude_active = '';
+        }
+
+        // tags_setting_exclude_words
+        if ($h->cage->post->keyExists('tags_setting_exclude_words')) {
+            if ($h->cage->post->getHtmLawed('tags_setting_exclude_words')) {
+                $tags_setting_exclude_words = $h->cage->post->getHtmLawed('tags_setting_exclude_words');
+            } else {
+                $tags_setting_exclude_words = ''; $error = 1;
+            }
+        } else {
+            $tags_setting_exclude_words = ''; $error = 1;
+        }
+
+
+        if ($error == 1)
+        {
+            $h->message = $h->lang["main_settings_not_saved"];
+            $h->messageType = "red";
+            $h->showMessage();
+
+            return false;
+        }
+        else
+        {
+            $tags_settings['tags_setting_exclude_active'] = $tags_setting_exclude_active;
+            $tags_settings['tags_setting_exclude_words'] = $tags_setting_exclude_words;
+
+            $h->updateSetting('tags_settings', serialize($tags_settings));
+
+            $h->message = $h->lang["main_settings_saved"];
+            $h->messageType = "green";
+            $h->showMessage();
+
+            return true;
+        }
+    }
+
+}
+?>
Index: /branches/1.4/content/plugins/tags/languages/tags_language.php
===================================================================
--- /branches/1.4/content/plugins/tags/languages/tags_language.php	(revision 1952)
+++ /branches/1.4/content/plugins/tags/languages/tags_language.php	(revision 1953)
@@ -11,4 +11,9 @@
 
 /* RSS */
-$lang['post_rss_tagged'] = "Stories tagged"; 
+$lang['post_rss_tagged'] = "Stories tagged";
+
+
+$lang['tags_settings_header'] = "Tags Settings";
+$lang['tags_setting_exclude_words'] = "Tag words to exclude (separate by comma)";
+$lang['tags_setting_exclude_active'] = "Exclusion words active";
 ?>
Index: /branches/1.4/content/plugins/tags/readme.txt
===================================================================
--- /branches/1.4/content/plugins/tags/readme.txt	(revision 1952)
+++ /branches/1.4/content/plugins/tags/readme.txt	(revision 1953)
@@ -13,4 +13,5 @@
 Changelog
 ---------
+v.1.8 2010/06/10 - Alan - Added admin settings page, exclusion tag words for list and post page
 v.1.7 2010/05/22 - Nick - Fix for home page title tags and moved Tag RSS from SB Base into this plugin
 v.1.6 2010/04/14 - Nick - Top stories page name changed from "index" to "popular"
