Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Mods for 3.7.x vBulletin Mods for 3.7, vBulletin hacks, vBulletin modification, vBulletin 3.7

Mods for 3.7.x Thread, Automatic tags in Mods; Automatic tags Description With vBulletin tags you can either set to require tags be completed or not. However requiring tags ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3311


Reply
 
 
The God Father
Developer's Avatar

Reply With Quote
 
Join Date: Jul 2008
Location: NDC
Posts: 5,425
08-09-2008, 08:03 PM
 
Automatic tags

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
__________________
I Love Walking In The Rain Cuz Nobody Know I'm Crying !!
 
 
 
Reply

Mods for 3.7.x Thread, Automatic tags in Mods; Automatic tags Description With vBulletin tags you can either set to require tags be completed or not. However requiring tags ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3311


Bookmarks

Tags
automatic, tags


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic Thread Tagger Developer Mods for 3.7.x 209 21-04-2009 05:35 AM
Working rapidshare automatic downloader *proof Inside* Developer Software and Programs 2 06-03-2009 03:56 PM
Table Tags Developer Articles 0 28-10-2008 07:01 PM
Automatic Tagging (Product) Developer Mods for 3.7.x 0 30-09-2008 03:42 PM
Automatic PM on New Thread Developer Mods for 3.7.x 0 10-09-2008 07:23 PM