Introducing the Hashtag Plugin
The Hashtag plugin is used to automate the tagging of discussions in a similar way that Twitter and other sites work - when users create content that contain #hashtags, these tags are automatically used to tag the content and allows finding other similar content. The tags themselves are the standard Vanilla tags as enabled by the Tagging plugin.
There are two main aspects to this process:
1. Hashtag Recognition. The plugin uses the twitter syntax - a word prefixed by a hash (#) sign. While Twitter supports tags between 2 to 140 characters in length, the Admin configuration screen can change the length parameters. The admin can also specify whether hashtag recognition is limited to the Discussion title or the Title and the bodies of the discussion and subsequent comments.
2. Hashtag Linking. This process recognize #hashtags within the discussion and comment content (whether they were used to create tags or not) and link them to other discussions sharing the same hashtags. This feature requires that the "Garden.Format.Hashtags" in config.php be set to false (otherwise Vanilla will use the hashtags as text-search links as it does on this forum - see #this link).
The plugin requires permission settings in Roles and Permissions which provides the ability to limit the plugin functionality to selected users (e.g. moderators).
Hints:
1. The Tagging plugin adds a side panel with the list of popular tags. I use the "Module Sort" plugin to place the popular tags high on the side panel.
2. I set the length of the tags to be between 4 and 30 characters to prevent automatic recognition of short and very long tags. That does not interfere with users ability tag discussions manually without that restriction.
Comments
Amazing @rbrahmson. We had this in discussion some years ago, but the conclusion was that somehow (don't ask me who brought that up) was that a plugin like this would be a performance drain. I tested the plugin and love it.
What do you think about the Hashtag field when creating a discussion? I think it would make sense to remove this extra field when your plugin is integrated. Is there a way do add this to the Addon or is it possible to set this in the config?
Thanks @phreak! IMHO there is no performance issue because the plugin does it's main processing only when a single discussion is edited.
As for your enhancement - I have few additional minor things I want to include in the next version so perhaps I can do what you asked. But I want to understand better - what do you mean by "hashtag -field" can you elaborate?
With hashtag field i mean the "Tags" input on starting a discussion. It would be two logics to apply tags and i think that making the hashtag just in the text is simple and smart enough. I think it could be disabled so users are less confused.
OK, now I understand what you mean. What you want is to remove the tags form on the discussion edit screen.
I was able to do that with this simple css change:
But before you do that, please consider these:
Last but not least - thank you for using the plugin and providing feedback.
@rbrahmson: Thank you for the tip. I did it like you mentioned.
Another issue i came across is that tags only seem to get highlighted and linked in the initial post of a discussion and not in the comments. Is this by intention or a bug on my side?
Works fine for me...
I assume your config settings are correct (the plugin setting screen should validate and warn you of issues...)
I also assume you are running 2.1 or 2.2 (not 2.3b1 which has few issues)
@phreak - I just uploaded a new version of the plugin. Please let me know if you still have the issue you reported earlier.
Thank you @rbrahmson. I'm going to test that this weekend.
I'm not seeing "Garden.Format.Hashtags" in config.php. Any ideas?
As a general rule in Vanilla, whenever a configuration option does not appear in congif.php, it is taken from config-defaults.php (which you should not change!).
So copy the "Garden.Format.Hashtags" from config-defaults.php into config.php, set it to false, and then the plugin option would work:
$Configuration['Garden']['Format']['Hashtags'] = false;
Independently, I uploaded a new version related to the other issue you mentioned.
Hi @rbrahmson,
I'm still testing your plugin and one issue i found was that HEX-colors seem to be added to the hashtag list. My users tend to to color some text parts in the their posts with HTML > For example the old font tag: font color="#11eedd".
This leads to numerous tags with color value. Any idea how to conquer that?
Hi @phreak, thanks for testing my plugin. Indeed you uncovered a flaw in the plugin. Here is another manifestation of the same logic flaw - try pasting a url with an anchor link - the anchor will also be captured as a Hashtag.
I have to fix this. Will let you know when it's done.
Again, thank you for your feedback.
I created a minor version update that addresses that issue as well as adding few enhancements.
Use the source at github to test this minor upgrade. The only changes are in class.hashtag.plugin.php
I'll wait to see if there is some feedback on the plugin functionality before uploading this version on the Vanilla plugin site.
Thanx a lot @rbrahmson. I'm currently testing and let you know.
I uploaded the new version and in addition to the bug fix it also has minor enhancements:
Version 2.1.2 changes:
Thanks to all those testing the plugin.
@rbrahmson: Great! I have experienced no issues so far with the newest release. top