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/
I think you can remove some errors with an extra check:
Code:
// HACK : END : AUTO TAG
if ( $post['taglist'] )
{
fetch_valid_tags($dataman->thread, $post['taglist'], $tag_errors, true, false);
if ($tag_errors)
{
foreach ($tag_errors AS $error)
{
$dataman->error($error);
}
}
}
}
This way it doesnt try to process blank taglists.
Note: Didnt see the plugin before making this suggestion.
I've decided to uninstall this mod. I think it's a great idea, but I'm just not getting the results I desired. In 95% of my threads it misses the point of the title, and I end up with a tag cloud looking like. ex. this, his, thus, etc etc etc. Hopefully it can be optimized.
I've converted it to a product as I don't like doing code modifications (especially when vbulletin is upgrading every other month).
Should work with 3.7.x (tested with 3.7.1)
Nice work. :up:
I had been using the manual install method for this mod, but the latest 3.7.2 broke when I added it in after I updated my forum yesterday.
However installing this product version works perfectly on 3.7.2 and I've had no problems.
Why not release this product as it's own mod and give tribute to this original manual mod? That way members would be able to find this much easier solution (no need to manual edit the files after every vB update).
Why not release this product as it's own mod and give tribute to this original manual mod? That way members would be able to find this much easier solution (no need to manual edit the files after every vB update).
I completely agree... I almost didn't see the XML file Noodles uploaded, so I was about to miss out on installing it.
EDIT:
Where in the AdminCP do I configure settings for this mod? I can't find it anywhere.