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/
What are you looking for?
1) Incrementally fixing old threads by populating tags if those threads are replied to?
or
2) Generating tags for all threads that have none?
To be honest I don't think doing all non-tagged threads would be difficult... the code is already up there and I'd just have to iterate over all threads.