Back to vBulletin 3.7 Add-ons

Automatic tags
Mod Version: 1.00, by buro9

This modification is in the archives.
vB Version: 3.7.0 Rating: (16 votes - 4.63 average) Installs: 169
Released: 19 May 2008 Last Update: Never Downloads: 194
Not Supported Code Changes Re-usable Code Translations  

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) <= || 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/

Effectively it's this:
http://creativecommons.org/licenses/by/2.0/uk/
Title: Automatic tags by http://www.buro9.com/ is licensed under a http://creativecommons.org/licenses/by/2.0/uk/.

Download

No files for download.

Similar Mods

Wide image automatic resize for html and vB tags in posts - fixes template problems vBulletin 3.0 Full Releases
New Posting Features Pre-Defined Topic Tags for Zoints Thread Tags vBulletin 3.6 Template Modifications

vblts.ru supports vBulletin®, 2022-2024