Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

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
  #72  
Old 06-19-2008, 10:31 PM
jim6763nva's Avatar
jim6763nva jim6763nva is offline
 
Join Date: Oct 2005
Location: Virginia
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed the xml for this and it doesn't appear it is capturing keywords from RSS titles. Is it supposed to?
Reply With Quote
  #73  
Old 06-19-2008, 11:36 PM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #74  
Old 06-20-2008, 01:44 PM
pedroenf pedroenf is offline
 
Join Date: Jun 2006
Location: Portugal
Posts: 308
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Noodles24 View Post
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)

Works perfectly in 3.7.0. Thank you for this convertion. You're the man.
Reply With Quote
  #75  
Old 06-22-2008, 09:47 AM
Zacarias Zacarias is offline
 
Join Date: Jan 2005
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed, works great.
Reply With Quote
  #76  
Old 06-22-2008, 01:17 PM
thestaton thestaton is offline
 
Join Date: Mar 2008
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #77  
Old 06-22-2008, 01:47 PM
higge higge is offline
 
Join Date: Jan 2008
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*installed

Thank you
Reply With Quote
  #78  
Old 06-25-2008, 12:32 PM
Amiga Harrison Amiga Harrison is offline
 
Join Date: Nov 2006
Location: UK
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Noodles24 View Post
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).
Reply With Quote
  #79  
Old 06-28-2008, 10:54 PM
Alovepoem Alovepoem is offline
 
Join Date: Jun 2008
Location: www.benimweb.net
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Delete Link
Reply With Quote
  #80  
Old 06-30-2008, 04:10 AM
EagleNick's Avatar
EagleNick EagleNick is offline
 
Join Date: Dec 2007
Location: Florida
Posts: 517
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice MOD.

Quote:
Originally Posted by Amiga Harrison View Post
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.

Thanks in advance for any help
Reply With Quote
  #81  
Old 07-01-2008, 01:04 AM
Noodles24 Noodles24 is offline
 
Join Date: Jul 2005
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Product has been posted as it's own mod: https://vborg.vbsupport.ru/showthread.php?t=184028
Reply With Quote
Reply

Thread Tools

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 07:41 AM.


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.09123 seconds
  • Memory Usage 2,320KB
  • 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
  • (1)bbcode_code
  • (5)bbcode_php
  • (3)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