Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Automatic Thread Tagger (Project Terminated) Details »»
Automatic Thread Tagger (Project Terminated)
Version: 1.00 Beta, by MrEyes MrEyes is offline
Developer Last Online: May 2017 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.7.0 Rating:
Released: 05-19-2008 Last Update: 05-21-2008 Installs: 150
Uses Plugins
Re-useable Code Code Changes Additional Files Translations Is in Beta Stage  
No support by the author.

This modification has now been taken over by Phalynx updates/information etc can be found here:

https://vborg.vbsupport.ru/showthread.php?t=185495

Do not post on this thread, or mark this thread as installed.


Old Post:
Quote:
Unfortunately I find myself in a position where continued development of this modification is not possible. So as of today (29/05/08) this project is terminated. If you are a coder feel free to take this project on and take it from beta to gold.


Quote:
You will be please to learn that this modification has been taken over by Phalynx.

https://vborg.vbsupport.ru/member.php?u=49918
Automatic Thread Tagger v1.0
Beta 3


THIS IS A BETA MODIFICATION

Please read the entire post before diving in


If you report a bug please post the thread title that created it, without this I cannot test it and improve the language parsers


When a user submits a new thread this product will automatically take keywords from the thread title and use these as tags.

As an example, if a user submits a thread with a title of:

Quote:
Fish Food for Cats
The thread will be automatically tagged with:
  • Fish
  • Food
  • Cats

If the user also submits an actual tag of "Fish" this will not be duplicated. Additionally this product hooks in before vBulletin processes tags so any rules you have setup for this will be respected. It also checks if you have tagging enabled, if not the product does nothing.

If you choose to do so this product will also automatically tag threads created by incoming RSS feeds.

And if all that wasn't enough there is a whole load of different configuration options.

Installation

If you have a previous beta version of this modification install this MUST be uninstalled before proceed to install this version

  1. Download the modification zip file to your local machine and extract the contents.
  2. Upload the functions_autotagger.php to your includes folder (the same directory as your config.php)
  3. Goto "ACP -> Plugins & Products -> Manage Products".
  4. Click "Add/Import Product".
  5. In the "Import Product" section, click the browse button and select the downloaded XML file (product-auto_thread_tagger.xml).
  6. Click "Import"

After install, and by default the modification is disabled, this will allow you to play around with configuration before switching it on.

Configuration
Configuration for this product can be accessed via:

ACP -> vBulletin Options -> Automatic Thread Tagger

Each configuration entry has a description against it, so I won't rehash it all here. However the following configuration items are worth mentioning:

Disable Auto Tag if Tagged?

If this option is enabled and a user submits tags with their post then the title keywords will not be added.

Use Smart Quotes?

If this option is enabled (default) then the auto tagger will treat quoted terms as a single tag. For example if a user submits a title of:

Quote:
This is a great technical website
The tags will be:
  • great
  • technical
  • website

However if they submit a title of:

Quote:
This is a great "technical website"
The tags will be:
  • great
  • technical website

Filter / Replacement Characters

This is the heart of the modification, as we are dealing with human input it can be rather complicated for a machine to handle and parse meaningful keywords. This configuration area allows you to configure filter and replacements for incoming thread titles. For example, you might not want & in your tags, through the options here you can filter it out or replace it with and.

In addition to this you can also use filter/replacements to extend tags. So if you run a motorbike website you might want to extend the term "GSXR" to "Suzuki GSXR" or change it completly to "Fast Bike".

Filters/replacements do not change titles, they only effect the resulting auto tags.

This configuration area is pre-populated with a series of default rules, these rules are based on my experience during development and should cover most things. However as mentioned this is a beta modification and we are dealing with human input so with your help and input this list will be improved.

Composite Tags

With composite tags you can define a collection of words to use a single tags. So if for example you specify a composite tag of "brown dog", and the user submits a title of "I love my brown dog" the tags will be "love, brown dog" without this composite tag the tags would be "love, brown, dog"

RSS Feed Additional Tags

If you use this modification to tag RSS created threads, you can also specify additional tags to add for each RSS feed. So for example if you have a feed from BBC News, in addition to the title based tags, you could also tag each thread with "General News".

In summary the other configuration values allow you to:
  • Globally enable or disable the product (default is off).
  • Exclude forums by id
  • Exclude usergroups by id
  • Exclude user by id
  • Exclude words from the search words stop list (default is on). This excludes words like can, by, do, etc (open includes/searchwords.php for a full list). I would strongly recommend not disabling this, however you could and then use the following:
  • Define your own list of exclude words.
  • Exclude RSS feeds by feed ID.

Using this to tag RSS feeds

Unfortunately vBulletin does not include (that I can see) a hook that is called when an RSS thread is created. This means that it is not possible to hook into the code and perform auto tagging. All is not lost though, however it does require an edit to one of the default vBulletin files.

This is what you need to do:
  • Open includes/cron/rssposter.php
  • Find the following line:

    Code:
    $itemdata->set('ipaddress', '');
  • On a new line immediately after this paste in:

    Code:
    require_once(DIR . '/includes/functions_autotagger.php');
    $autotags = GetAutoTags($itemdata->fetch_field('title'), "", true, $itemdata->fetch_field('forumid'), $feed['userid'], $item['rssfeedid']);
    $itemdata->set('taglist', $autotags);
  • Save the file and place on you server.

Once this is done, and you have enabled RSS tagging in the configuration then RSS threads will be tagged.

I will find a solution to this as I really don't like the idea of having to edit files in this fashion. So if anybody can suggest a better way of doing this please speak up as it will mean I can get the solution out quicker.

Other Information

At the moment this product is most definitely in beta testing, once I and the people using it are happy with the product then I may consider releasing a hack that will tag all existing threads. Releasing this right now would probably cause more trouble than it is worth.



Parsing the thread text for tags is an extremely unlikely addition as this would require some fairly heavy processing to ensure quality of tags.

At the moment I am primarily concentrating on the parsing of human language and refining the filters/replacements. So adding Ajax support (i.e. auto populate the tag box as user enter words into the thread title box) is on the todo list however this won't happen until we are happy that the parsing system is as good as it can be.

One thing the product does not do which you may want to consider is change the "Separate tags using a comma." phrase used on the new thread post screen. You might want to consider changing this to something like "Separate tags using a comma, do not include words from your title". This depends on your personal preference and how you have the product configured.

Disclaimers
Obviously the input this product uses comes from human beings, therefore it is almost impossible to code for every single possible scenario. As such there is always a possibility that a specifically crafted submission may cause problems. I strongly suggest running this through some tests before committing to installing this on a live forum.

Ahh yes, one final thing - this is the first time I have created a product XML file, I have tested and install this and all seems fine - but it would be great if somebody in "the know" could cast an eye over it for obvious errors/issues.

Actually, one more one final thing, if you install it please click install

Hold on, one more one more one final thing, if you really like this mod then why not nominate it for MOTM

Release History

1.0 Beta 1
First Release

1.0 Beta 2
  • Added filters/replacements
  • Added RSS support
  • Added RSS inclusion/exclusion support
  • Added composite tags
  • Added ability to tag all RSS threads with a specific tags (per RSS id)

1.0 Beta 3
Bug fix release
  • Fixes issues with escaped characters
  • Removed option to process filters on full title rather than potential tags.

Show Your Support

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

Comments
  #52  
Old 05-21-2008, 10:49 PM
Seb@'s Avatar
Seb@ Seb@ is offline
 
Join Date: Aug 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks men updated
Reply With Quote
  #53  
Old 05-21-2008, 11:28 PM
abrecher abrecher is offline
 
Join Date: Jan 2004
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by shlomot View Post
I second this request. Thanks.



And thank you for this cool mod in general.
Ditto! I'd pay for this if necessary.
Reply With Quote
  #54  
Old 05-21-2008, 11:29 PM
Stubbed's Avatar
Stubbed Stubbed is offline
 
Join Date: Dec 2007
Location: New Zealand
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After the update, "quote text" appears as two tags, rather than one?

Title: This is a "test post" for great111 11 justice!!?!!
Tags: great111, justice, post, test

Title: This is a 'test post' for great justice.
Tags: great, justice, post, test

Smart Tags is definitely enabled.
Reply With Quote
  #55  
Old 05-21-2008, 11:31 PM
abrecher abrecher is offline
 
Join Date: Jan 2004
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It was really getting to me that my users were barely using the tagging feature in VB. This is the PERFECT solution. Much appreciated!
Reply With Quote
  #56  
Old 05-22-2008, 01:49 AM
Vtec44 Vtec44 is offline
 
Join Date: Jan 2005
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there an option to update all old threads. I know this can be intensive, especially on bigger forums, but I'm just throwing it out there.

BTW, great hack!
Reply With Quote
  #57  
Old 05-22-2008, 02:46 AM
budatalk's Avatar
budatalk budatalk is offline
 
Join Date: Jul 2007
Location: Budapest
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks like a great mod! I also have a question, when you install it, does it automatically check all threads before installation and tags them? Or is there an option for that? (especially that there are a lot of threads since the 3.6.8 days that might need tagging)
Reply With Quote
  #58  
Old 05-22-2008, 04:50 AM
G3MM4 G3MM4 is offline
 
Join Date: Jul 2004
Location: Westcounty UK
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks good, however, I think I'll hold off installing until old threads are taggable and until AJAX is implemented.
Reply With Quote
  #59  
Old 05-22-2008, 06:33 AM
redlabour's Avatar
redlabour redlabour is offline
 
Join Date: Mar 2004
Location: Wuppertal, NRW, Germany
Posts: 1,541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Feature Request:

It was a Killerapplication if it has a routine to mark all old Threads with Tags.
Reply With Quote
  #60  
Old 05-22-2008, 07:05 AM
Stubbed's Avatar
Stubbed Stubbed is offline
 
Join Date: Dec 2007
Location: New Zealand
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by G3MM4 View Post
It looks good, however, I think I'll hold off installing until old threads are taggable and until AJAX is implemented.
How would you implement AJAX into this?

Another special character bug:

Topic: petrol $2.09
Tags: petrol, \$2
Reply With Quote
  #61  
Old 05-22-2008, 07:15 AM
MrEyes MrEyes is offline
 
Join Date: Nov 2004
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Stubbed View Post
After the update, "quote text" appears as two tags, rather than one?

Title: This is a "test post" for great111 11 justice!!?!!
Tags: great111, justice, post, test

Title: This is a 'test post' for great justice.
Tags: great, justice, post, test

Smart Tags is definitely enabled.
Issue fixed in new update to Beta 3. This was all to do with how slashes and escape characters were handled. One thing that it won't do though is remove "111" from "great111" unless you specify a filter like these:

'111'=>''
'1'=>'one'
'1'=>''

However this does have downsides as all instances of those strings would be replaced.

Quote:
Originally Posted by Stubbed View Post
How would you implement AJAX into this?

Another special character bug:

Topic: petrol $2.09
Tags: petrol, \$2
Also fixed in the new beta 3. However you might want to remove the replacement/rule for the '.' characters as otherwise the tags will be '$209'. In the next release I will add support for only filter/replacing the end of strings. So "$2.09" is tag as that, but "Purple." is tagged as "purple".

At the moment I am primarily concentrating on the parsing of human language and refining the filters/replacements. So adding Ajax support is on the todo list however this won't happen until we are happy that the parsing system is as good as it can be.

Quote:
...tag old threads...
Also just to reiterate one point mentioned in the first post:

When the modification goes gold I will release something that will tag all old threads. However until the code is as good as it can be it would be extremely dangerous and potentially destructive to release this now. At the end of the day I am sure you don't want 1000's of thread tagged with bad tags because of a bug or odd configuration setting.
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 02:03 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.08394 seconds
  • Memory Usage 2,336KB
  • 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
  • (2)bbcode_code
  • (10)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)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