Version: 1.00, by buro9
Developer Last Online: Jul 2012
Category: New Posting Features -
Version: 3.7.0
Rating:
Released: 05-18-2008
Last Update: Never
Installs: 169
Re-useable Code Code Changes Translations
No support by the author.
Description
With vBulletin tags you can either set to require tags be completed or not. However requiring tags to be completed can easily result in low-quality tags that don't provide SEO value to your forum. With that in mind the thread title often provides better keywords than the tags that the user is forced to enter.
What this modification does is:
When a thread is started, has the user filled in tags?
Yes: Then we do nothing.
No: Then take the thread title, and strip out all words that would be invalid tags and are in the stop words list and use the remaining words as tags.
Example
User enters:
Thread title = We like the social group email mod
Thread tags =
vBulletin records the new thread as:
Thread title = We like the social group email mod
Thread tags = email, group, social
Which isn't an entirely bad set of tags and is better than none, and better than the user typing in gibberish (IMHO).
Installing
Installation REQUIRES FILE MODIFICATION. If you are not happy doing this, don't install this mod.
In the file /includes/functions_newpost.php
Find (near line 409):
PHP Code:
if ($type == 'thread' AND $post['taglist']) {
Replace that with:
PHP Code:
// HACK : START : AUTO TAG // if ($type == 'thread' AND $post['taglist']) // { if ($type == 'thread') {
if (!$post['taglist']) { $temptags = split(' ',$post['title']); $newtags = array(); require(DIR . '/includes/searchwords.php'); foreach ($temptags as $tagtext) { if (strlen($tagtext) <= 3 || in_array(strtolower($tagtext), $badwords)) { // Do nothing } else { array_push($newtags,$tagtext); } } $post['taglist'] = join(',',$newtags); } // HACK : END : AUTO TAG
Uninstalling
Open the file /includes/functions_newpost.php
Find:
PHP Code:
// HACK : START : AUTO TAG
Delete everything up to:
PHP Code:
// HACK : END : AUTO TAG
Insert in that space:
PHP Code:
if ($type == 'thread' AND $post['taglist']) {
Screenshots
Screenshots don't really make sense... read the description.
License
You are free to modify, create derivatives, produce any version of this that you wish even for commercial use, just leave in the code an attribution credit that contains the Url to http://www.buro9.com/
mate do u familiar with AJAX?
I think will be better if it's AJAX based hack which takes the words from thread title immediately after we left the title field and put the suggestion in tags field.
So users will have possibility to edit unwanted tags.
Quote:
Originally Posted by Newfarm
masterross's idea is actually very, very cool.
That being said, installed and crossing fingers for some fancy ajax implementation
I like this idea a lot.
I quite like the two-pronged approach... AJAX to offer the opportunity for the user to edit, and the server side code to force it if the user consciously removed the tags or if JavaScript were disabled.
I will definitely look at this.
Not sure on the earlier request for non-word characters... can be done with a regexp but is there a regexp that allows unicode for other languages but blocks punctuation? If someone can provide a sample that works with multiple languages I'll use it and give credit accordingly.
The ability to auto tag RSS Feed created posts would finish this off perfectly. I know that on the site I installed it on my members love it and has got the regulars starting to tag their threads and others threads while doing it for them if they forget or don't think about doing it. I just need to be able to do it with RSS Feeds then it will be perfect and I could install it on another few sites which would benefit from it greatly.