Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Automatic tags Details »»
Automatic tags
Version: 1.00, by buro9 buro9 is offline
Developer Last Online: Jul 2012 Show Printable Version Email this Page

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

Title: Automatic tags by B?ro9 is licensed under a Creative Commons Attribution 2.0 UK: England & Wales License.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 05-19-2008, 01:32 PM
Zaiaku's Avatar
Zaiaku Zaiaku is offline
 
Join Date: Jul 2007
Location: 3rd Level of Hell
Posts: 502
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well the reason I would like it added to all threads with r without tags is just as discribe in the first post. It may use better tags then the ones already listed. Of course it would be a 1 time run since you don't want it to keep trying to add tags to all the threads over and over again.
Reply With Quote
  #23  
Old 05-19-2008, 01:39 PM
M-Tuning's Avatar
M-Tuning M-Tuning is offline
 
Join Date: Jul 2005
Location: Winschoten (NL)
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works like a charm!

Good work.
Reply With Quote
  #24  
Old 05-19-2008, 03:19 PM
MetalORock's Avatar
MetalORock MetalORock is offline
 
Join Date: Jul 2007
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very great hack thanks
Reply With Quote
  #25  
Old 05-19-2008, 06:00 PM
GlitterKill GlitterKill is offline
 
Join Date: Jul 2002
Location: Nashville
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have to agree that adding a feature/option to have it go back and generate tags for old, untagged threads would be great!
Reply With Quote
  #26  
Old 05-19-2008, 06:24 PM
maxicep maxicep is offline
 
Join Date: Oct 2006
Location: California
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I seen some problems and i removed it for now.

Example:
forum, maxicep.com maxicepdsadasdasd, melodi, mobile, phone

U will get error that "need min 3 character in tags for open thread"

because tags are looking
forum, maxicep.com, maxicepdsadasdasd, me, lodi, mobile, phone

It has problem on some thread titles like which include "<" or ">" character also ","

Just try and see.

If i set to all limits to no limit on tag system options, than no problem but it isnt fine.
Reply With Quote
  #27  
Old 05-19-2008, 08:17 PM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excellent mod. thanks very much for this, I will install it later this week.
Reply With Quote
  #28  
Old 05-19-2008, 09:22 PM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This reminds me of a good ol vb 2.0 hack Nice and simple too!

Installed!

Edit: Need to exclude non-word characters For example, see the tags on this thread:
http://cellphoneforums.net/htc/t2758...-s710-vox.html
Reply With Quote
  #29  
Old 05-20-2008, 03:24 AM
paramegsoft paramegsoft is offline
 
Join Date: Apr 2008
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

welcome

very nice mod buro9

but please

how i can do it to some forums only

like forum id 4 and 5

and how i activate it in rss forums which get news from another sites
Reply With Quote
  #30  
Old 05-20-2008, 04:18 AM
abrecher abrecher is offline
 
Join Date: Jan 2004
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by maxicep View Post
I seen some problems and i removed it for now.

Example:
forum, maxicep.com maxicepdsadasdasd, melodi, mobile, phone

U will get error that "need min 3 character in tags for open thread"

because tags are looking
forum, maxicep.com, maxicepdsadasdasd, me, lodi, mobile, phone

It has problem on some thread titles like which include "<" or ">" character also ","

Just try and see.

If i set to all limits to no limit on tag system options, than no problem but it isnt fine.
This is EXACTLY what I've been waiting for! This user definitely is making a good point and I hope his issues will be addressed in future versions.

I also would LOVE to be able to run a script which would backdate this for all old threads.
Reply With Quote
  #31  
Old 05-20-2008, 08:35 AM
maxicep maxicep is offline
 
Join Date: Oct 2006
Location: California
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tpearl5 View Post
This reminds me of a good ol vb 2.0 hack Nice and simple too!

Installed!

Edit: Need to exclude non-word characters For example, see the tags on this thread:
http://cellphoneforums.net/htc/t2758...-s710-vox.html
Tags are looking very bad.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 09:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06028 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete