View Full Version : New Posting Features - Automatic tags
buro9
05-18-2008, 10:00 PM
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, socialWhich 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):
if ($type == 'thread' AND $post['taglist'])
{Replace that with:
// 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
Uninstalling
Open the file /includes/functions_newpost.php
Find:
// HACK : START : AUTO TAGDelete everything up to:
// HACK : END : AUTO TAGInsert in that space:
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:
https://vborg.vbsupport.ru/external/2008/05/9.png (http://creativecommons.org/licenses/by/2.0/uk/)
Title: Automatic tags by B?ro9 (http://www.buro9.com/) is licensed under a Creative Commons Attribution 2.0 UK: England & Wales License (http://creativecommons.org/licenses/by/2.0/uk/).
HaYLaZ
05-19-2008, 09:11 AM
I accepted this modification but I took error;
Parse error: parse error, unexpected $end in C:\AppServ\www\vbulletin\includes\functions_newpos t.php on line 1730
CThiessen
05-19-2008, 09:19 AM
Hi,
pretty good idea. Do you think it might be possible in the future to check against an own positive List?
I think I do have about 100 Tags with the Main Words that Guest are looking for.
Christian
buro9
05-19-2008, 09:32 AM
I accepted this modification but I took error;
Parse error: parse error, unexpected $end in C:\AppServ\www\vbulletin\includes\functions_newpos t.php on line 1730
The bit of code to be modified is around line 410.
Line 1730 is the very end of the file. It would suggest that there is a problem with the file that you have edited... check the code in the file that it ends with "?>".
I applied this hack to a file with no other modifications, and it does not create an error.
buro9
05-19-2008, 09:33 AM
Hi,
pretty good idea. Do you think it might be possible in the future to check against an own positive List?
I think I do have about 100 Tags with the Main Words that Guest are looking for.
Christian
I don't see why not. This is why I allow derivative works... if you have a feature that you want implemented, go ahead and implement it :)
buro9
05-19-2008, 09:36 AM
Actually... on the parse error... double check the number of brackets, the installation advice originally missed one, but it's now corrected.
CThiessen
05-19-2008, 09:50 AM
if you have a feature that you want implemented, go ahead and implement it :)
I can?t do that, I do not have the knowledge. :( Only Ideas.
next Step than is to Change words.
If somebody is writing:
American Airlines
Lufthansa
Delta AirlinesChange it in:
Fligthor that ever to meet our special Keywords.
Christian
PS: I will install but in the Moment I can?t use FTP from here.
7lanet
05-19-2008, 10:48 AM
Thanks ^_^
very good
buro9
05-19-2008, 11:23 AM
It should work with arabic too if tags work with arabic. You can change the code to fit your needs if you feel it's not suited for you :)
7lanet
05-19-2008, 11:33 AM
Can I make it too in reply
buro9
05-19-2008, 11:36 AM
Can I make it too in reply
That sentence doesn't really make sense to me.
Do you mean that you want to populate tags for a thread if there are no tags already and someone responds to the thread? If so, this may be possible.
maxicep
05-19-2008, 11:42 AM
Perfect
Installed !
7lanet
05-19-2008, 11:54 AM
I mean
The amendment that I have done only for new post
But old post does not add topics
Can I make my words appear in new reply
buro9
05-19-2008, 12:03 PM
I mean
The amendment that I have done only for new post
But old post does not add topics
Can I make my words appear in new reply
Yeah, I like that idea too.
I'll have to check to see whether I know about the thread at this point and whether updating the post will affect the thread... it may not.
leeman
05-19-2008, 12:07 PM
<font color="Lime">*Installed*</font>
jasculs
05-19-2008, 01:00 PM
What's the possibility of making automatic tags for threads that already exist?
Zaiaku
05-19-2008, 01:03 PM
This would really be good if it did it for older post too. Is there a way to make it add tags weither or not tags are added?
buro9
05-19-2008, 01:13 PM
What are you looking for?
1) Incrementally fixing old threads by populating tags if those threads are replied to?
or
2) Generating tags for all threads that have none?
buro9
05-19-2008, 01:14 PM
To be honest I don't think doing all non-tagged threads would be difficult... the code is already up there and I'd just have to iterate over all threads.
maxicep
05-19-2008, 01:17 PM
This would really be good if it did it for older post too. Is there a way to make it add tags weither or not tags are added?
Yes, certainly ...
Zaiaku
05-19-2008, 01:32 PM
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.
M-Tuning
05-19-2008, 01:39 PM
Works like a charm!
Good work.
MetalORock
05-19-2008, 03:19 PM
very great hack thanks :)
GlitterKill
05-19-2008, 06:00 PM
I have to agree that adding a feature/option to have it go back and generate tags for old, untagged threads would be great!
maxicep
05-19-2008, 06:24 PM
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.
Hornstar
05-19-2008, 08:17 PM
excellent mod. thanks very much for this, I will install it later this week.
tpearl5
05-19-2008, 09:22 PM
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/t275895-not-valid-windows-ce-application-s710-vox.html
paramegsoft
05-20-2008, 03:24 AM
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
abrecher
05-20-2008, 04:18 AM
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.
maxicep
05-20-2008, 08:35 AM
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/t275895-not-valid-windows-ce-application-s710-vox.html
Tags are looking very bad. :o
peterska2
05-20-2008, 09:33 AM
nice one! I've been keeping an eye out for something like this.
/me tags thread to download and install later
masterross
05-20-2008, 10:26 AM
@buro9
mate do u familiar with AJAX?
I think will be better if it's AJAX based hack which takes the words from thread title immediately after we left the title field and put the suggestion in tags field.
So users will have possibility to edit unwanted tags.
DubaiHost
05-20-2008, 10:37 AM
Perfect Idea .. !
Installed
good idea. tagged for when i update to 3.7.0. thanks!
jim6763nva
05-20-2008, 04:37 PM
Thank you for this - works great!
Jim
Newfarm
05-20-2008, 04:50 PM
masterross's idea is actually very, very cool.
That being said, installed and crossing fingers for some fancy ajax implementation ;)
TruthElixirX
05-21-2008, 01:53 AM
I have a weird question.
If I have tags off, will this still auto add them in the background, so to speak?
We're wanting to wait a bit to enable tags, but when we do, would this modification have been working in the background?
EDIT::
Found a work around for this. Thanks for the hack!
DestekForumu
05-24-2008, 08:34 PM
thank you
jim6763nva
05-25-2008, 02:29 AM
How difficult would it be to do this for RSS posts?
xorex
05-25-2008, 10:31 PM
nice !! Ingeniously.....
coder genius :D
dfc005
05-26-2008, 08:33 AM
I'd also love to see this mod go through and ad tags to all previous threads.
Brandon Sheley
05-27-2008, 04:31 AM
works great!
* Brandon Sheley clicked install and nominated motm :)
jim6763nva
05-27-2008, 06:49 AM
I'd also love to see this mod go through and ad tags to all previous threads.
I would think there would have to be a one time maintenance utility that would be run. This mod would do tags going forward.
q8salem
05-27-2008, 07:32 AM
Thanks man
It works great
redlabour
05-29-2008, 05:03 PM
After Automatic Thread Tagger (https://vborg.vbsupport.ru/showthread.php?t=179927) is dead - any chance to get a Update here with his Code to get a Modification without editing Files? ;)
And yes i agree - we need a Script that Tags all old Threads. :(
steveneff
05-31-2008, 10:33 AM
When my posters select tags for a post, if the tag does not already exist the tag is refused.
Is it possible for this mod to check existing tags and only allow them to be added to the posts tag list?
Forget this post, it already does this.
Magnumutz
06-01-2008, 06:39 AM
After Automatic Thread Tagger (https://vborg.vbsupport.ru/showthread.php?t=179927) is dead - any chance to get a Update here with his Code to get a Modification without editing Files? ;)
And yes i agree - we need a Script that Tags all old Threads. :(
Yeah, that's exactly what i was thinking of... how about it buro?
FreshFroot
06-02-2008, 12:55 AM
there is no way to REQUIRE tags for all NEW THREADS.. without a file edit?
Silencer Groans
06-02-2008, 07:34 AM
Thank
Magnumutz
06-02-2008, 02:51 PM
There should be one... some other dude achieved it.
buro9
06-02-2008, 07:46 PM
@buro9
mate do u familiar with AJAX?
I think will be better if it's AJAX based hack which takes the words from thread title immediately after we left the title field and put the suggestion in tags field.
So users will have possibility to edit unwanted tags.
masterross's idea is actually very, very cool.
That being said, installed and crossing fingers for some fancy ajax implementation ;)
I like this idea a lot.
I quite like the two-pronged approach... AJAX to offer the opportunity for the user to edit, and the server side code to force it if the user consciously removed the tags or if JavaScript were disabled.
I will definitely look at this.
Not sure on the earlier request for non-word characters... can be done with a regexp but is there a regexp that allows unicode for other languages but blocks punctuation? If someone can provide a sample that works with multiple languages I'll use it and give credit accordingly.
guvner
06-06-2008, 12:57 PM
Excellent mod - for a tech support forum with members who just can't get used to manually adding tags, this is very useful!
Many thanks.
Mike :)
peterska2
06-08-2008, 10:40 PM
The ability to auto tag RSS Feed created posts would finish this off perfectly. I know that on the site I installed it on my members love it and has got the regulars starting to tag their threads and others threads while doing it for them if they forget or don't think about doing it. I just need to be able to do it with RSS Feeds then it will be perfect and I could install it on another few sites which would benefit from it greatly.
dutchbb
06-09-2008, 05:00 AM
Exactly what I was looking for, as I was thinking the same: title = good tags. Thank you!
SaPh[i]R
06-09-2008, 06:51 AM
Thanks a lot !
citeman
06-12-2008, 04:32 PM
One slight problem with this. some of the html characters get through - to remove that use:
// 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 {
$tagtext = html_entity_decode($tagtext);
$tagtext = ereg_replace("[^A-Za-z0-9 _]", "", $tagtext);
array_push($newtags,$tagtext);
}
}
$post['taglist'] = join(',',$newtags);
}
// HACK : END : AUTO TAG
drpeppper
06-12-2008, 05:44 PM
this is a nice and useful mod.
thank you. installed and marked as.
dutchbb
06-13-2008, 01:11 AM
How can we make tags for the old threads from their titles? Is there a script for this? And where can we find these stop words to strip?
nightbloom
06-13-2008, 03:03 AM
Sweet, works OK on my forum. Thanks.
glennybee
06-13-2008, 03:28 PM
Thanks buro9, easy to implement, great results!
:)
7lanet
06-14-2008, 08:55 AM
the code does not work with version 3.7.1
and this code causes mistakes please edite it to be fitted with3.7.1
thank you
guvner
06-14-2008, 01:08 PM
the code does not work with version 3.7.1That's not quite accurate - it may not work with your 3.7.1, but it works just fine with mine :)
Universal
06-15-2008, 02:17 AM
Thankyou buro9 and also thankyou citeman for that quick fix, those characters were a problem. Works perfectly on 3.7.1 :)
Noodles24
06-16-2008, 08:42 AM
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)
ArnyVee
06-16-2008, 12:02 PM
Noodles, you are THE man! :D
Hopefully this is 'added' to the actual first post so that we can keep this hack 'updated'. :)
This is what i was looking for exactly! Can somebody kindly help this person to make this hack into an automated feature please?
Cheers
dutchbb
06-16-2008, 01:47 PM
Noodles, you are THE man! :D
Hopefully this is 'added' to the actual first post so that we can keep this hack 'updated'. :)
+1 ASA the coder confirms this we can upgrade to the plugin, otherwise its best to wait.
tobybird
06-16-2008, 03:58 PM
The ability to auto tag RSS Feed created posts would finish this off perfectly. I know that on the site I installed it on my members love it and has got the regulars starting to tag their threads and others threads while doing it for them if they forget or don't think about doing it. I just need to be able to do it with RSS Feeds then it will be perfect and I could install it on another few sites which would benefit from it greatly.
Oh this would be an outstanding addition.
Thank you for this modification!
**Installed**
mavortium
06-19-2008, 12:27 AM
Noodles for galactic president!
schlottkej
06-19-2008, 07:15 PM
It adds the tags from the RSS feed titles, however, they don't actually work as links...
ALSO, any way to add the functionality where it goes back through each thread and tags based on title? I see the automatic post by NOODLES, but I can't see how it works exactly? I don't know where it is located?
jim6763nva
06-19-2008, 10:31 PM
Just installed the xml for this and it doesn't appear it is capturing keywords from RSS titles. Is it supposed to?
MPDev
06-19-2008, 11:36 PM
I think you can remove some errors with an extra check:
// 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.
pedroenf
06-20-2008, 01:44 PM
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.
Zacarias
06-22-2008, 09:47 AM
Installed, works great. :)
thestaton
06-22-2008, 01:17 PM
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.
higge
06-22-2008, 01:47 PM
*installed
Thank you
Amiga Harrison
06-25-2008, 12:32 PM
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).
Alovepoem
06-28-2008, 10:54 PM
Delete Link :(
EagleNick
06-30-2008, 04:10 AM
Nice MOD. :)
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 :D
Noodles24
07-01-2008, 01:04 AM
Product has been posted as it's own mod: https://vborg.vbsupport.ru/showthread.php?t=184028
needaltuna
07-08-2008, 05:31 AM
Can thread tagging boost a board's search engine rankings?
enginethatcan't
11-10-2008, 03:41 PM
installed beed working great......anyway to integrate it to work with posting the RSS reed?
GlamRockTalk
11-20-2008, 03:06 AM
This mod ROCKS! :D
dadoc
01-31-2009, 06:10 AM
Great mod,
I also would love it to work for RSS feeds?
muhteren007
02-08-2009, 10:01 AM
sagol
avsunforum
05-08-2009, 08:07 PM
thanks
dbreh
06-16-2009, 05:52 PM
thanks i try it on vB3.8.2
its good
Michael.A
09-22-2009, 10:20 PM
installed on vb v3.8.4
www.ch-joy.com
11-09-2009, 08:27 PM
thanx :)
appsfinder
12-22-2009, 05:08 PM
please can you help i have setup rss import feeds it would be nice to auto tag these
AkBilge
02-16-2010, 09:14 PM
3.8.4 PL2 working.
Süper. Thank you
blind-eddie
02-15-2011, 01:29 AM
Yep, its working on 3.8, Thanks
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.