Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Stop Spammers with rel=nofollow in URLs! Details »»
Stop Spammers with rel=nofollow in URLs!
Version: 1.00, by kall kall is offline
Developer Last Online: Aug 2021 Show Printable Version Email this Page

Version: 3.0.5 Rating:
Released: 01-19-2005 Last Update: Never Installs: 41
 
No support by the author.

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>

This would also be acceptable, as order of elements within the anchor tag makes no difference:

<a rel="nofollow" href="http://www.site.com/page.html" >Visit My Page</a>

Once added, the search engines supporting the attribute will understand that the link has not been approved in some way by the site owner.

Think of it as a way to flag to them, "I didn't post this link -- someone else did."

Quote:
Originally Posted by Alkatraz
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.

WHAT WILL THIS DO, IN ESSENCE?

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.

Update:

Thanks to Michael Morris and natez0rz for pointing out that using the $post global would be a much better idea.

To change the conditional number of posts, alter
PHP Code:
OR $post['posts'] > 50
to whatever you like.

It should work with all vB 3.0.x versions, but was tested on 3.0.6.

File to modify: 1

1/ Open your includes/functions_bbcodeparse.php file

Find:
PHP Code:
if ($type == 'url')
    {
        
// standard URL hyperlink
        
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
    }
    else
    {
        
// email hyperlink (mailto:) 
Replace with:
PHP Code:
        if ($type == 'url')
    {
        global 
$post;

if (
is_member_of($post6//Admins are exempt
OR is_member_of($post5//Mods are exempt
OR is_member_of($post7//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>";
    }
    }
   else
    {
        
// email hyperlink (mailto:) 
2/ Save and Upload.

3/ Relax, safe in the knowledge that spammers linking from your site are doing so for no reason whatsoever.

4/ Edit: exclude staff usergroups and members with over 50 posts.

Show Your Support

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

Comments
  #42  
Old 04-15-2005, 07:25 PM
wirewolf's Avatar
wirewolf wirewolf is offline
 
Join Date: Jun 2004
Location: New York City
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great little hack!
First, you are only excluding new members, with under a certain post count, from having a link that they put in a post, or in a signature, from being indexed by a search engine. It does not affect any other links in your forum, only those. If you have spammers dropping urls in posts, then the urls they drop, will not be indexed.

I recently had a user join my forum, and I could tell right away that he was nothing more than a "link dropper" (or, you could call, a "name dropper"). He posted short, little one sentence messages and reply's in all of my sub-forums with little meaning to the related subject matter. In other words, he was trying to 'fake' it. The one thing that he did manage to include was a link to his website, or other sites (commercial sites, loosely related to our forum) in both his posts, and in his signature. He only made about ten posts and was never heard from again. Little does he know that, with this hack installed, it was all for nothing.

After installing this hack, I check the source code of various posts made by members that are under the post thresh-hold and those that are over the thresh-hold. I only found the "nofollow" in posted urls that were under the thresh-hold.

My forum deals with ship/boat modeling. A some what limited subject to most Internet users. I and my fellow hobbyists can tell pretty quickly if a new member like the one above knows what the hell they are talking about or not. I set my new poster thresh-hold to 25 for now. So any llegitimate link that a legitimate member puts in a post will be indexed soon enough.

This hack, for me any way, takes care of those links that are in that 'gray' area. Ones that are kind of related to our site, but until the new member has "proven himself", his posted links won't be indexed.

Great hack kall, , John 'clicks install'
Reply With Quote
  #43  
Old 04-15-2005, 07:31 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*salutes*

Thank you John. Your story illustrates EXACTLY what the point of this hack was to achieve.

I'm feeling all warm and fuzzy now.
Reply With Quote
  #44  
Old 04-15-2005, 07:44 PM
wirewolf's Avatar
wirewolf wirewolf is offline
 
Join Date: Jun 2004
Location: New York City
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall
*salutes*

Thank you John. Your story illustrates EXACTLY what the point of this hack was to achieve.

I'm feeling all warm and fuzzy now.
Your quite welcome kall. This hack is exactly what I've been looking for.

BTW, I was looking at this part of the code:
PHP Code:
// standard URL hyperlink
    
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
    }
    else
    {
     return 
"<a href=\"$rightlink\" rel=\"nofollow\" target=\"_blank\">$text</a>";
    } 
, and was wondering if it could be edited with some conditionals related to my post here.
I'll have to play around with it, and see if something can work.
John

PS; I forgot to add, I have V-3.0.7 and this hack works fine.
Reply With Quote
  #45  
Old 04-15-2005, 11:11 PM
Caveman2k2 Caveman2k2 is offline
 
Join Date: Mar 2005
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice hack.
/me clicks install
Reply With Quote
  #46  
Old 04-17-2005, 06:41 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by wirewolf
Your quite welcome kall. This hack is exactly what I've been looking for.

BTW, I was looking at this part of the code:
PHP Code:
// standard URL hyperlink
    
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
    }
    else
    {
     return 
"<a href=\"$rightlink\" rel=\"nofollow\" target=\"_blank\">$text</a>";
    } 
, and was wondering if it could be edited with some conditionals related to my post here.
I'll have to play around with it, and see if something can work.
John

PS; I forgot to add, I have V-3.0.7 and this hack works fine.
I think that would involve some way of defining a link as being internal or external...

Something that is outside my scope I am afraid. If someone else could give us some pointers?
Reply With Quote
  #47  
Old 05-04-2005, 08:12 AM
Lexserv Lexserv is offline
 
Join Date: Feb 2003
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone noticed an increase in their site's PageRank after installing the mod???
Reply With Quote
  #48  
Old 05-04-2005, 08:28 AM
Zero Tolerance's Avatar
Zero Tolerance Zero Tolerance is offline
 
Join Date: Feb 2004
Location: England
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a little question, but does this extra attribute added to the anchor tag show up as invalid on XHTML validators?

- Zero Tolerance
Reply With Quote
  #49  
Old 05-04-2005, 10:36 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zero Tolerance
Just a little question, but does this extra attribute added to the anchor tag show up as invalid on XHTML validators?

- Zero Tolerance
Nope, the validator doesn't choke on it at all.
Reply With Quote
  #50  
Old 06-06-2005, 08:58 AM
David_R David_R is offline
 
Join Date: Mar 2005
Location: Los Angeles
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Questions:
1. Can I only add this addon to my forums posts ? as well archive posts ?
2. Will this help anyway in SEO ?
3. I have some paid sponsorers on forums footers and archive footers, will this hack ignore those links if only added for forums posts ?
4. Can I exclude some urls from getting ignored ?

Thanks.
Reply With Quote
  #51  
Old 06-06-2005, 10:42 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by David_R
Questions:
1. Can I only add this addon to my forums posts ? as well archive posts ?
2. Will this help anyway in SEO ?
3. I have some paid sponsorers on forums footers and archive footers, will this hack ignore those links if only added for forums posts ?
4. Can I exclude some urls from getting ignored ?
Thanks.
1.
Quote:
Originally Posted by me
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.
2. If you subscribe to the theory that PR is wasted if spread out to unwanted pages, using this hack will help focus your PR to wanted pages by stopping the robots from applying it to those links that are affected. (see Answer 1.)

3. See Answer 1.

4. That should be doable, but is a little complicated for me this time of night. Would involve an extra conditional under OR $posts=50..but I dunno what. OR $rightlink=='excludedlink' is the basic psuedocode I think.
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:00 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.07012 seconds
  • Memory Usage 2,341KB
  • 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
  • (6)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
  • (3)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