Tagging Enhanced 1.0.1

Allow tagging of discussions. Enhanced version fixes various bugs and enables viewing of tags at the category level as well.
Note: Disable and remove old tagging plugin before enabling this one!
Credit: Code is based on original Tagging Plugin 1.0.1 by Mark O'Sullivan

Tagging Enhanced 1.0.1

New in 1.01:
Fixed bugs relating to
-case sensitive SQL statements not working on Linux
-enabling, disabling and reenabling gives error due to duplicate indices / table

Plugin Description:
-Based on original Tagging Pluging 1.0.1 by Mark O'Sullivan
-This new version allows viewing of tags by Category level (previous version only allowed viewing of ALL tags in the forum)
-Fixes the following bugs in original version:
a) Renaming tags (in dashboard) does not update the "Tags" field in the discussion table.
b) Tag validation allowed did not correct repeat tags within the "Tags" string. Tag validation has since been fixed to to ensure the tag string is both unique AND in alphabetical order before saving into discussions table "Tags" Field.
c) Disabled tag autocomplete search as it is slightly buggy when typing in tags that are similar to existing tags (Pressing space bar too quickly will replace what you typed with the tagsearch tag)
d) Fixed horizontal display menu when viewing tagged discussions (Previously just showed "Tagged Discussions", with no other menu options)
e) Tag counts are not decreased when you delete a discussion.

INSTALLATION INSTRUCTIONS:
1. Disable existing tag plugin
2. Remove existing tag plugin
3. Copy Tagging Enhanced to plugin directory
4. Enable Tagging Enhanced plugin
5. Go to tagging settings and "enable tagging" --> Note this step involves initialising the tables with new columns, may take a few seconds if your database has very large number of rows

Please let me know ASAP if you encounter any bugs.

Thanks!

PS: Bug where announcements are not shown when tag filter is on

This bug can be solved by editing a line in the vanilla\models\class.discussionmodel.php

Change this line from:
CODE START
if (!isset($Wheres['w.Bookmarked']) && !isset($Wheres['d.InsertUserID'])) $this->RemoveAnnouncements($Data);
CODE END

to

CODE START
if (!isset($Wheres['w.Bookmarked']) && !isset($Wheres['d.InsertUserID']) &&!property_exists($this, 'FilterToTagID')) $this->RemoveAnnouncements($Data);
CODE END

Screenshots

Questions