View Full Version : Apply "rel=nofollow" attribute to all parsed URLs
In the first cooperative move for nearly ten years, the major search engines have unveiled a new indexing command for web authors that they all recognize, one that they hope will help reduce the link and comment spam that plagues many web sites....due to removing the point of doing it in the first place.
The new "nofollow" attribute that can be associated with links was originated as an idea by Google in late 2004 and MSN and Yahoo, as well as major blogging vendors have jumped onboard.
The Nofollow Attribute
The new attribute is called "nofollow" with rel="nofollow" being the format inserted within an anchor tag.
When added to any link, it will effectively serve as a flag to tell the search engines that the link has not been explictly approved by the site owner, and therefore "not follow" it, or not use the referring page's (on your site) Page Rank in any way.
For example, this is how the HTML markup for an ordinary link might look:
<a href="http://www.somedomain.com/page.html">My forums are the best lol lol lol click here!!</a>
This is how the link would look after the nofollow attribute has been added, with the attribute portion shown in bold
<a href="http://www.somedomain.com/page.html" rel="nofollow">My forums are the best lol lol lol click here!!</a>
Once added, the search engines supporting the attribute will understand that the link has not been approved by the site owner.
Think of it as a way to flag to them, "I didn't post this link -- someone else did, don't associate me with it."
If Google sees nofollow as part of a link, it will:
1. NOT follow through to that page.
2. NOT count the link in calculating PageRank link popularity scores.
3. NOT count the anchor text in determining what terms the page being linked to is relevant for.
The site that is being linked to will gain nothing from the link, so the whole point of doing it in the first place is removed.
This will affect URLs in posts, as well as signatures...anything that goes through the bbcodeparse function as far as I can tell/guess, and will work recursively, or whatever the word is that means 'it will affect all existing posts and signatures'...or it did for me anyway.
To change the conditional number of posts, alter OR $post['posts'] > 50) to whatever you like.
I can't see how this could be done as a plugin, but if anyone wants to point out how, that would be nicer....YAY Kirby!
Now all you need to do is unzip the attached file, upload the plugin using your Admin CP - Plugin System - Plugin Manager!
Relax, safe in the knowledge that spammers linking from your site are doing so for no reason whatsoever. :)
To remove the old version:
File to modify: 1
1/ Open your includes/class_bbcode.php file
Find:
// standard URL hyperlink
//return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
global $post;
if (is_member_of($post, 6) //Admins are exempt
OR is_member_of($post, 5) //Mods are exempt
OR is_member_of($post, 7) //SuperMods are exempt
OR $post['posts'] > 50) // People with over 50 posts are exempt
{
// standard URL hyperlink
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
}
else
{
return "<a href=\"$rightlink\" rel=\"nofollow\" target=\"_blank\">$text</a>";
}
}
Replace with:
// standard URL hyperlink
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
}
2/ Save and Upload.
mcncyo
08-07-2005, 11:06 AM
I will install this on monday.
bigcurt
08-07-2005, 12:48 PM
Good job kall, will work great
~Curt
FleaBag
08-07-2005, 11:05 PM
I'm not going to install this as my forum doesn't need it, microscopic in size compared to the majority - but just thought I would post my support for an excellent effort!
Andreas
08-08-2005, 03:33 PM
Hook bbcode_create
$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!function_exists('handle_bbcode_url_relnofollow') )
{
function handle_bbcode_url_relnofollow(&$parser, $text, $link)
{
global $post;
// Excempt Mods+ and Users with mor then 50 Posts
$parsedurl = $parser->handle_bbcode_url($text, $link);
if (is_member_of($post, 5, 6, 7) OR $post['posts'] > 50)
{
return $parsedurl;
}
else
{
return str_replace('href="', 'rel="nofollow" href="', $parsedurl);
}
}
}
Or (simpler, but might affect mor then just [url])
Hook: bbcode_parse_complete
global $post;
if (!is_member_of($post, 5, 6, 7) AND !($post['posts'] > 50))
{
$text = str_replace('href="', 'rel="nofollow" href="', $text);
}
ricker
08-09-2005, 03:12 AM
This seems to have conflicts with the "PM group leader on join request" plugin. At least it did with mine. :(
mcncyo
08-10-2005, 12:57 AM
would the work with grapping of the newsgroup and from mailinglist? Would the plugin work with the nntp newsgroup pulling.
This seems to have conflicts with the "PM group leader on join request" plugin. At least it did with mine. :(
I can't see how .. all this does is add an attribute to the href of a link.. can you please explain?
Hook bbcode_create
$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!function_exists('handle_bbcode_url_relnofollow') )
{
function handle_bbcode_url_relnofollow(&$parser, $text, $link)
{
global $post;
// Excempt Mods+ and Users with mor then 50 Posts
$parsedurl = $parser->handle_bbcode_url($text, $link);
if (is_member_of($post, 5, 6, 7) OR $post['posts'] > 50)
{
return $parsedurl;
}
else
{
return str_replace('href="', 'rel="nofollow" href="', $parsedurl);
}
}
}
For some reason I have no idea whatsoever how to apply this code. Is this basically a replacement in class_bbcode.php for what Kall originally posted?
For some reason I have no idea whatsoever how to apply this code. Is this basically a replacement in class_bbcode.php for what Kall originally posted?
You can just upload the attached .xml now, thanks to Kirby. :)
(Could a Mod move this to the Plugins Forum? Ta.)
The plugin is not working for me in 3.5 RC 2. Anyone else have any success with it?
Working fine for me. I have min posts set to 50 (51 promotes members to another usergroup) and several usergroups exempted.
Look at the signature for this user (http://llamasery.com/forums/showthread.php?t=5869#post42740) f.ex. as opposed to the moderator posting on that thread. Here (http://llamasery.com/forums/showthread.php?t=4675#post35661) is a user with 50 posts.
(this is where "View Selection Source" in Firefox comes in handy)
The plugin is not working for me in 3.5 RC 2. Anyone else have any success with it?
I am.
I downloaded it from my plugin system.
SnitchSeeker
09-01-2005, 08:14 AM
Will this make ALL links in forum posts get the attribute? Because it would be nice if links posted by admins or mods would not get it since they often link to other pages within our own site.
Will this make ALL links in forum posts get the attribute? Because it would be nice if links posted by admins or mods would not get it since they often link to other pages within our own site.
Let's look at the bit in the first post that controls who has their posts/signatures "nofollow"'ed:
if (is_member_of($post, 6) //Admins are exempt
OR is_member_of($post, 5) //Mods are exempt
OR is_member_of($post, 7) //SuperMods are exempt
OR $post['posts'] > 50) // People with over 50 posts are exempt
:)
Working fine for me. I have min posts set to 50 (51 promotes members to another usergroup) and several usergroups exempted.
Look at the signature for this user (http://llamasery.com/forums/showthread.php?t=5869#post42740) f.ex. as opposed to the moderator posting on that thread. Here (http://llamasery.com/forums/showthread.php?t=4675#post35661) is a user with 50 posts.
(this is where "View Selection Source" in Firefox comes in handy)
Rather odd. It's simply not working for me whatsoever. I've removed the if clause completely and had it apply the nofollow bit to all links but no luck!
Might this have something to do with vb's parsed post caching?
Logician
09-24-2005, 01:23 PM
One of the best hack ideas I have seen for a while. Very good job! :)
Jolten
10-18-2005, 08:49 PM
I'd love this for v3.0.9. I can't upgrade to 3.5 and the functions_bbcodeparse.php file is much different.
I'd love this for v3.0.9. I can't upgrade to 3.5 and the functions_bbcodeparse.php file is much different.
Then look at the 3.0.x hacks in my profile. ;)
G_Gekko
10-29-2005, 08:47 PM
Thanks for a great hack
soniceffect
10-29-2005, 09:07 PM
Ya know I kinda have mixed feelings on this idea ... personally I would like links in my users sigs to be followed, as some of my users run there own sites and would like to get them ranked well in search engines. I can`t see it causes me any problems, and helps the people who make my site work ..
The ability to choose which forums it stops would be nice .... eg. If I have a forum for people to post links like this, then I would like to disable this on that particular forum.. Hope that makes sense LOL
So, any way to do this?
Chris M
10-30-2005, 12:17 PM
Very nice modification kall :)
Chris
pokeraffiliates
12-01-2005, 06:18 AM
Do this work for Version 3.5.1?
Cause I installed the plugin but nothing happens.
Robert Fogt
12-03-2005, 08:09 AM
This worked great for me in 3.5.1 Except for the homepage URL located in their profile. Any way to add this there?
jdingman
12-22-2005, 03:46 AM
I installed this mod and it wouldn't display any threads after I did. Not sure what went wrong with it...
Baldy
12-29-2005, 04:02 AM
I would love to see a whitelist exclusion for certain URLs. vBSEO lets you specify, say, smugmug.com, google.com, and vbulletin.com as exclusions so the rel="nofollow" attribute.
I ended up not being able to use vBSEO, so I'm looking for a nofollow plugin to replace it.
croportal
01-17-2006, 03:47 PM
yes i have 3.5.3 and i dont know if this working, can u tell me also, i want to all group have The Nofollow Attribute
Dave-ahfb
01-21-2006, 01:23 AM
working for me on 3.5.3
JulianD
01-22-2006, 02:43 AM
Installed!! Thanks.
David_R
02-11-2006, 03:01 AM
is it possible to make this script work only in few forums ?
i dont want to block links with "rel=nofollow" in all forums
thanks.
InstaNet
02-12-2006, 07:42 PM
Hmm, I used the plugin system to upload this hack on a 3.5.3 board but it doesn't seem to be working? Anyone know why? Thanks
David_R
02-14-2006, 11:46 AM
Hmm, I used the plugin system to upload this hack on a 3.5.3 board but it doesn't seem to be working? Anyone know why? Thanks
i have this same problem, i am using vbulletin 3.5.3
technically hack should only add rel=nofollow tag to content in posts and users signatures without touching other parts of the forum..
but check this, there are many other areas where the rel=nofollow should not be added:
<table cellpadding="6" cellspacing="0" border="0" width="100%" class="page" align="center">
<tr>
<td class="tfoot" align="right" width="100%">
<div class="smallfont">
<strong>
<a href="sendmessage.php" rel="nofollow">Contact Us</a> -
<a href="http://www.officehelp.in">Office Help</a> -
<a href="admincp/index.php">Admin</a> -
<a href="modcp/index.php">Mod</a> -
<a href="archive/index.php">Archive</a> -
<a href="#top" onclick="self.scrollTo(0, 0); return false;">Top</a>
</strong>
</div>
</td>
</tr>
</table>
Am i missing something ? or can someone guide for installing this plugin perfectly, seems to be a very good plugin/addon.
thanks.
Problem 2:
Even after disabling the plugin from plugin manager, rel-nofollow still appears for internal forum links.. :surprised:
Problem 2:
Even after disabling the plugin from plugin manager, rel-nofollow still appears for internal forum links.. :surprised:
Look in your templates. Those are all there by VB default.
David_R
02-14-2006, 01:26 PM
Look in your templates. Those are all there by VB default.
thanks welo.
i was not aware about this :)
problem 2 solved - courtesy welo
problem 1 - waiting for a solution.
Yeah, they did that to prevent unnecessary spidering of 'Post Reply' buttons and stuff like that, along with somewhat controlling the silent spam that sometimes creeps into memberslists in signatures etc.
thanks welo.
i was not aware about this :)
problem 2 solved - courtesy welo
problem 1 - waiting for a solution.
So.. problem 1... does it occur if you disable the plugin?
If so, it is a vB default thing as per welo's post above this one.
David_R
02-15-2006, 09:14 AM
So.. problem 1... does it occur if you disable the plugin?
If so, it is a vB default thing as per welo's post above this one.
thanks kall for help, got clarified on problem 2.
can you help me implement the hack, add rel=nofollow for urls in posts table ?
thanks.
Citizen
02-15-2006, 05:17 PM
How do I install this? It says its not a product...
How do I install this? It says its not a product...
And nor do I say it's a Product.
It's a Plugin. Use the Upload/Download Plugins option.
Citizen
02-16-2006, 06:04 PM
And nor do I say it's a Product.
It's a Plugin. Use the Upload/Download Plugins option.
Thanks!
dethfire
02-17-2006, 07:30 PM
question, are the file edits still relevant and does the plugin effect current links or just links posted after the install
Annapurna
02-18-2006, 08:00 AM
just to ask clearly: Does it work with 3.5.3 or not?
Andreas
Citizen
02-18-2006, 07:40 PM
Umm... I installed this plug in and now none of my drop down menus work and I cant use my admincp because of the no-dropdown menu problem.
David_R
02-18-2006, 10:22 PM
works great with vb 3.5, need some small modifications for my forums:
a. I only want to ad rel=nofollow for some of my forums, how can only add this forums to my list ?
b. I want to disable some domains from getting rel=nofollow when a link is posted.
toddy38
02-20-2006, 06:43 PM
works fine with my 3.5.3
but i want the intern Board Links without "nofollow" is this possible?
Toddy
Hornstar
02-20-2006, 08:38 PM
i have only 1 section on the forums where i allow people to advertise there sites, is it possible to make it so all posts in only that forum will have this? Thanks
993ti
02-24-2006, 03:19 PM
Getting this with 3.5.4:
<a rel="nofollow" href="http:
The link still works though.
dethfire
02-24-2006, 03:24 PM
shouldn't this be in code modification since there is a file edit?
caislander
02-26-2006, 04:33 AM
is it possible to make this script work only in few forums ?
i dont want to block links with "rel=nofollow" in all forums
thanks.Is this possible? I didn't see an answer, so my guss iss no but I figued it was worth asking again :)
hello..
been looking for it for long time....
we are on vb 3.5.4 ?
does it works on 3.5.4 ?
like all of our posted image/sigs hosted on imageshack or photobucket...
Andres also posted an modification at #5 post
https://vborg.vbsupport.ru/showpost.php?p=752074&postcount=5
which 1 is for what? which one we should install?
Nick0r
03-22-2006, 08:49 AM
Kall, would there be a simple of way of making it so that rel=nofollow is _not_ added to internal links (e.g to the site the forum is on).
athloni
04-03-2006, 03:08 AM
Thanks for the hack.
b. I want to disable some domains from getting rel=nofollow when a link is posted.
I would like this too....
Hello,
What part of the code would I remove to make it so that all links in posts and signatures have the no follow tag, and not exept user groups or people with certain number of posts??
Also can someone confirm that this only rewrites post urls and signature urls? I read a few posts on here stating that the script was rewriting many URLs including inbound links.
-Griffe
How could a script rewrite INBOUND links?
Anyway. Take this out,
OR is_member_of($post, 5) //Mods are exempt
OR is_member_of($post, 7) //SuperMods are exempt
OR $post['posts'] > 50) // People with over 50 posts are exempt
Change if (is_member_of($post, 6) //Admins are exempt
to this:
if (is_member_of($post, 666) //Fake usergroup is exempt
meissenation
04-13-2006, 08:05 PM
Newbish question, but has to do with the linking. When someone posts a link in their signature, does it still work the same way as someone that posts a link in a reply? Would be an interesting way to stop someone from gaining rank just by putting links in their signatures.
Treasure Quest
04-22-2006, 06:15 PM
This was installed on 3.5.4 and the link URL posted doesn't show " rel="nofollow">
What can be done?
Greg
Who posted it? If it was you, and you are an admin (or it was posted by someone with over 50 posts, or a mod or supermod) it wont have the nofollow.
Is the plugin active?
Treasure Quest
04-22-2006, 07:15 PM
I posted this link as a test user:
http://www.treasurequestxlt.com/community/showthread.php?t=5246
The plugin is active and the The 50 post minimum was removed.
I want all links from members to be No Follow no matter how many posts they have.
Oh, will this mod also make old links posted no follow?
Thanks
Greg
Treasure Quest
04-24-2006, 07:23 PM
Still trying to get this working.
I'm not clear, is there a file edit or is this just a plugin or both??
It's a plugin.
It should work retrospectively, as per my comment in the first post.
Paul M
04-24-2006, 09:48 PM
Greg,
I checked this on your site tonight and it's working fine - I think the problem is the way you are checking - you must view the page source to see the nofollow tag, hovering over it in IE/FF will not show the tag.
Paul.
Treasure Quest
04-24-2006, 10:16 PM
Well I'll be dog :)
Thank you paul and sorry about that Kall.
Thanks again for this hack.
Greg
Pathor
05-02-2006, 06:11 PM
This plugin doesn´t work with Andreas 'Extended Signature Limits'.
If I disable Andreas product, the plugin works well.
How can I solve this problem?
dead7
05-09-2006, 09:26 PM
This plugin doesn?t work with Andreas 'Extended Signature Limits'.
If I disable Andreas product, the plugin works well.
How can I solve this problem?
Dang, I just logged in to post that same question..
ErikTheRed
05-26-2006, 05:47 PM
I just installed this plugin and it seems to work fine in conjunction with "Extended Signature Limits". What problem are you guys having with it?
By the way, I think someone already mentioned this, but it appears the only links that don't get the rel="nofollow" attribute are user's home page links. Since those show up in thread displays it would be cool if a future version could attach rel="nofollow" to those links as well, if it's even possible.
dead7
05-28-2006, 01:07 PM
It does work fine with it, however when Extended Sig limits is turned on, the rel=nofollow (a previous hack) is removed on signature URLS.
ErikTheRed
05-29-2006, 02:02 AM
That's not the case for me. Nofollow is attached to all member's signatures and Extended Sig Limits are on.
dead7
05-30-2006, 01:46 PM
That's not the case for me. Nofollow is attached to all member's signatures and Extended Sig Limits are on.
Which nofollow hack are you using?
RaZor Edge
08-30-2006, 05:29 AM
Just to let you known: I have installed this plugin on a 3.6.0 forum and this is working great.
doug1
09-05-2006, 02:51 PM
I've also installed on a 3.6.0 forum and all is working smoothly except rel=nofollow is not being added to signature links but is being added to forum posts. (I don't have any other plugins installed.)
Has anyone else seen this (or not seen this) with 3.6.0?
Does anyone have any idea why rel=nofollow would not be added to signatures while being added to posts?
RaZor Edge
09-05-2006, 04:46 PM
I've just tested it on my 3.6.0 and it seems to work with signatures.
The signature must be updated after the plugin have been installed to work. Also, make sure that the signature you are testing is not associate with a user who's this hack is set to not apply (ex: + than 50 posts).
doug1
09-05-2006, 05:57 PM
Ah-ha You're right - if someone updates a signature, rel=nofollow is added. Thank you very much. :)
Reynaldovb
10-22-2006, 01:18 AM
As of 3.6.1 it doesnt seem to work retroactively with links already posted. Seems like the function is not even called when parsing already saved urls.
nimonogi
11-06-2006, 05:08 AM
Anyone know if this hack works with 3.6.2?
Can you enable/disable this hack?
Nick0r
11-29-2006, 06:29 AM
Yes it works with 3.6.X
Does anyone know how we can modify it to ONLY add rel=nofollow to outbound links and NOT to internal ones?
richardl609
12-25-2006, 06:28 PM
will this plug in work for the VB 3.6.4 , i cannot find the functions_bbcodeparse.php file , please help
mrkhm
01-26-2007, 06:01 PM
just feeding back to let you know this works magnificently for vb 3.6.4 :)
seo guy
01-30-2007, 12:38 AM
I prefer to have it retroactively change the links - will the file base hack help me?
- it doesn't seem to work retroactively or at all with the pluggin..
what could I be doing wrong? - my templates are from 3.0.3 - I fear this is the problem..
Thank you,
navjotjsingh
01-31-2007, 05:23 AM
Excellent Mod! Thanks ... working wonderfully on 3.6.4 forum!
Thanks for this nice one.
I found few questions same as I have, but didnt see the answer.
Could there be a white list or at least to omit nofollow for internal forum_own links?
I have removed post condition so there is too many links now with nofollow for my board...
Thank you!!!
verbs
02-19-2007, 12:34 AM
Thanks for this nice one.
I found few questions same as I have, but didnt see the answer.
Could there be a white list or at least to omit nofollow for internal forum_own links?
I have removed post condition so there is too many links now with nofollow for my board...
Thank you!!!
That's a big sticking point for me too....if this is adding internal no-follow links then that's tough.
Another great add on would be the ability to control which forums the no-follow tags are added too.....certain forums that I control I am OK with outgoing no-follow links.
projectego
03-04-2007, 03:49 PM
Awesome plugin, kall; works flawless with 3.6.3. ;)
hugh_
03-15-2007, 09:28 AM
This mod doesn't seem to be working for me. I'm using VB 3.5.7 but none of my users' links in posts appear to be inheriting rel=nofollow except for their signatures and vbshout posts where all links are inheriting it. Anyway I'm assuming it's conflicting with something obviously. Has anyone else seen this and what can I do about it?
Thanks...
$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!function_exists('handle_bbcode_url_relnofollow') )
{
function handle_bbcode_url_relnofollow(&$parser, $text, $link)
{
global $post;
// Excempt Mods+ and Users with mor then 50 Posts
$parsedurl = $parser->handle_bbcode_url($text, $link);
if (is_member_of($post, 6, 7) OR $post['posts'] > 50)
{
return $parsedurl;
}
else
{
return str_replace('href="', 'rel="nofollow" href="', $parsedurl);
}
}
}
ThorstenA
04-09-2007, 10:45 PM
How can I exclude my own domain from rel=nofollow?
moveforward
04-14-2007, 09:45 AM
Thanks for this plugin. Works great for me on 3.6.5.
Only one issue is that Sig links are not NoFollow.
Smitty
04-14-2007, 12:37 PM
How can I exclude my own domain from rel=nofollow?
I am trying this out. Looking at it, if someone has more than 50 posts or is a mod, super-mod or admin the tag is not applied. That said, unless one has a very small forum, it shouldn't be attaching the tag to many internal url's. I see this as useful to keep the hit and run people at bay, so to speak. Actually, My installing it is more of an attempt to better SEO the forums to keep me high in the ratings.
On the other hand I have a very active moderator group so 'spam' posts are usually caught quickly and the links removed or the post (or posts) are deleted and the poster banned (I use Spam Decimator for 2 click convenience - the moderators love it) usually within minutes (there's almost always a mod or me on 24/7).
Well, now I'm off to check some page source to see if it's working as intended or not.
BTW - Running vB 3.5.6
Alfa1
04-17-2007, 05:42 PM
I want rel="nofollow" only applied to all outbound links. No matter who posts them. How can this be done?
ThorstenA
04-17-2007, 06:00 PM
I want rel="nofollow" only applied to all outbound links. No matter who posts them. How can this be done?
Me too !
Given that this has been asked for many times, and I have no idea how, I wish you and everyone else the best of luck in working out a method of determining whether a link is internal or external.
Again, for clarity: I have no idea how to achieve this easily.
No idea sorry.
If anyone can, by all means, please tell me.
ThorstenA
04-17-2007, 08:42 PM
Given that this has been asked for many times, and I have no idea how, I wish you and everyone else the best of luck in working out a method of determining whether a link is internal or external.
Again, for clarity: I have no idea how to achieve this easily.
A link which has this string in it:$variable where $variable is http://www.myforum.com/
jimbocook
04-19-2007, 03:50 PM
Using 3.6+ the plugin works fine until a user reaches 1000 posts and then it starts applying the nofollow to their posts. We've had to create a special group and exempt them as a work around. Is anyone aware of a reason the nofollow would kick back in after 1000 posts?
jimbocook
04-24-2007, 04:31 PM
At SEOrefugee.com, we had a problem with this plugin inserting the nofollow tags when a user passed the 1,000 post mark. The problem was a comma inserted into the number of posts (e.g. 1,000). We fixed it by changing this line in the plug in:
if (is_member_of($post, 5, 6, 7) OR $post['posts'] > 50)
to this (which strips the unwanted comma from the post count):
if (!(is_member_of($post, 5, 6, 7)===FALSE) || str_replace(",","",$post['posts']) > 50)
2 FN LOW
06-11-2007, 06:48 PM
can anybody tell me if this is working on my forum or not? I am viewing page sources for multiple threads but im not really sure where im suppose to look to see the no follow being used....Actually, i dont see it anywhere really..I want it to be applied to everything posted, dont care if your a mod or have over 367423 posts...So i changed the PHP code to this...Not sure if its right or not..
global $post;
// Excempt Mods+ and Users with mor then 50 Posts
$parsedurl = $parser->handle_bbcode_url($text, $link);
if (is_member_of($post, 666) OR $post['posts'] > 5000000)
also, my forum is located at www.obsession2speed.com/forums if somebody could take a look at it for me please.
2 FN LOW
06-11-2007, 07:02 PM
when i view the page source of this thread i dont see the no follow code where i believe it should be...
http://www.obsession2speed.com/forums/showthread.php?t=598
if you go down a lil bit when viewing the source code you will come to my post....I notice the URL post is not phrased with the no follow code...why is this?
in the nofollow_plugins.zip, there is one & to much:
in this line:
function handle_bbcode_url_relnofollow(&$parser, $text, $link)
Dave Hawley
07-23-2007, 04:19 AM
View Source, Ctrl+F and search for nofollow
unfortunately doesnt work for me @3.6.7PL1
i think there is something wrong with the condition
if (is_member_of($post, 5, 6, 7) OR $post['posts'] > 50)
^^ seems somehow wrong...?? $post[dont_we_need_some_group_entry_here?]
anyone any idea?
vwdforum
07-23-2007, 09:56 AM
Added this to www.vwdforum.com (http://www.vwdforum.com)
works, (when I check "view source code") however also for internal links. Anyone found a solution yet?
Gharibe
01-09-2008, 02:23 PM
Do Not Work
That's probably not a good idea, working can be useful to bring food into the house, and keep the house paid for. I work.
Dave Hawley
01-09-2008, 10:11 PM
Do Not WorkOk, you choose not to, but as stated above, it has its rewards :)
clasione
01-13-2008, 12:05 PM
I'm running three forums where this works in some instances and not in others.... I have already checked and double checked my user group id numbers to make sure there are not any regular users comming up in groups 5, 6, or 7 but I still find that in some instances the added no follow works on posts and signatures but some instances it just doesn't.... A user will have 3 posts and it will not add the nofollow....
I have tryed all the forums and it works in some places and it doesn't.. Also visiting posts I haven't viewed in a long time to rule out page cache. Can't figure it out.
RaZor Edge
02-19-2008, 05:06 AM
I'm using this code on 3.6.8 and it's running fine.
As I want this to work with every user exept my staff, I have removed the part with number of post.
Here's what I am using:
$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!function_exists('handle_bbcode_url_relnofollow') )
{
function handle_bbcode_url_relnofollow($parser, $text, $link)
{
global $post;
// Excempt Mods+ and Users with mor then 50 Posts
$parsedurl = $parser->handle_bbcode_url($text, $link);
if (is_member_of(5, 6, 36))
{
return $parsedurl;
}
else
{
return str_replace('href="', 'rel="nofollow" href="', $parsedurl);
}
}
}
myown
05-13-2008, 11:54 AM
what about 3.7 Gold any idea ?
oldengine
06-13-2008, 04:39 PM
It appears to be working in mine.
oldengine
06-22-2008, 03:45 PM
I have tryed all the forums and it works in some places and it doesn't.. Also visiting posts I haven't viewed in a long time to rule out page cache. Can't figure it out.
Don't over look that you need to go to Admin > Maintenance > Update Counters
and run "Rebuild Post Cache" and "Empty Signature Cache" to rebuild all those links.
A whitelist ability for your own forum's domain name would be an excellent add-on to this mod.
Greg-J
07-09-2008, 04:50 AM
I'm using this code on 3.6.8 and it's running fine.
As I want this to work with every user exept my staff, I have removed the part with number of post.
Here's what I am using:
$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!function_exists('handle_bbcode_url_relnofollow') )
{
function handle_bbcode_url_relnofollow($parser, $text, $link)
{
global $post;
// Excempt Mods+ and Users with mor then 50 Posts
$parsedurl = $parser->handle_bbcode_url($text, $link);
if (is_member_of(5, 6, 36))
{
return $parsedurl;
}
else
{
return str_replace('href="', 'rel="nofollow" href="', $parsedurl);
}
}
}
Your code will not work as you are not passing is_member_of() the users current groupid. It should be:
$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!function_exists('handle_bbcode_url_relnofollow') )
{
function handle_bbcode_url_relnofollow($parser, $text, $link)
{
global $post;
// Excempt Mods+ and Users with mor then 50 Posts
$parsedurl = $parser->handle_bbcode_url($text, $link);
if (is_member_of($post, 5, 6, 36))
{
return $parsedurl;
}
else
{
return str_replace('href="', 'rel="nofollow" href="', $parsedurl);
}
}
}
Greg-J
07-09-2008, 07:31 AM
A whitelist ability for your own forum's domain name would be an excellent add-on to this mod.
That's an easy fix. I tried to write it so it would work universaly, but I can't seem to get $vbulletin->options from within the plugin...
Anyway, use this but replace 'DOMAIN_NAME' with your domain. For instance, if vbulletin.org used this mod they would replace 'DOMAIN_NAME' with 'vbulletin'
$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_relnofollow';
if (!function_exists('handle_bbcode_url_relnofollow') )
{
function handle_bbcode_url_relnofollow($parser, $text, $link)
{
global $post;
$parsedurl = $parser->handle_bbcode_url($text, $link);
if (is_member_of($post, 5, 6) || strpos($parsedurl, 'DOMAIN_NAME') !== false)
{
return $parsedurl;
}
else
{
return str_replace('href="', 'rel="nofollow" href="', $parsedurl);
}
}
}
JPnyc
10-23-2008, 04:26 PM
Anyone know why this works for sig links in 3.5 but not in 3.7.x?
JPnyc
10-24-2008, 06:53 PM
nevermind, signature cache needed to be released.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.