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
  #22  
Old 01-21-2005, 02:11 AM
neocorteqz's Avatar
neocorteqz neocorteqz is offline
 
Join Date: May 2002
Location: Barefoot Bay Fl
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall
Alrighty then, try this:

PHP Code:
           if ($type == 'url')
           {
               global 
$bbuserinfo;
       
           if (
is_member_of($bbuserinfo6))
               {
               
// standard URL hyperlink
               
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
               }
               else
               {
          return 
"<a href=\"$rightlink\" rel=\"nofollow\" target=\"_blank\">$text</a>";
               }
           }
           else 
This will make it so anyone who is an admin (group 6 - change this to whatever you want) will not have their links tagged with the nofollow attribute.

The syntax for multiple groups escapes me at present, but if someone can remind me, I will change it.
PHP Code:
            if (is_member_of($bbuserinfo6)) or (is_member_of($bbuserinfoX)) 
I believe that would be the correct syntax. Replacing X with the group you want. Don't quote me on that, thats just what I normally use in templates, but then again you are editing a php file and I don't know php all that well.

edit, actually I believe it would be
PHP Code:
             if (is_member_of($bbuserinfo6)) || (is_member_of($bbuserinfoX)) 
http://www.w3schools.com/php/php_operators.asp
Reply With Quote
  #23  
Old 01-21-2005, 06:28 AM
phlogiston's Avatar
phlogiston phlogiston is offline
 
Join Date: Feb 2003
Location: Woodlands
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yoyoyoyo
this hack was about the "no follow" so if you are planning on implementing the first hack I suggest adding the meta in the header
surely the two do different things?

This hack adds the "no follow" attribute to links which have gone through vB's bbcode parser (posts, sigs, etc) and will stop spiders following them
but the links in your templates (almost all probably pointing to other pages on your own site) won't be affected and so will be followed.

The "no follow" in the header meta will tell spiders to not follow any links at all, including to the rest of your own site.
Reply With Quote
  #24  
Old 01-21-2005, 07:37 AM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by phlogiston
surely the two do different things?

This hack adds the "no follow" attribute to links which have gone through vB's bbcode parser (posts, sigs, etc) and will stop spiders following them
but the links in your templates (almost all probably pointing to other pages on your own site) won't be affected and so will be followed.

The "no follow" in the header meta will tell spiders to not follow any links at all, including to the rest of your own site.
true. they are different. I run a private forum that has no interest in being indexed or spammed or followed, so that is why I added those, but I see your point, and this was not the intent of this hack, and I apologize. Feel free to delete my posts on this topic and the whole "no follow" discussion.
Reply With Quote
  #25  
Old 01-22-2005, 09:32 PM
ttlgDaveh's Avatar
ttlgDaveh ttlgDaveh is offline
 
Join Date: Dec 2003
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack.

I made a modification to it so that only new members (in my case, those with less than 30 posts) have rel="nofollow" attached to their posts. Established members are not penalised and the searchbots will still follow and index their links.

Replace
PHP Code:
global $bbuserinfo;

    if (
is_member_of($bbuserinfo6)) 
With

PHP Code:
global $post;
    if (
$post[posts]>30
Reply With Quote
  #26  
Old 01-23-2005, 10:45 AM
Soto Soto is offline
 
Join Date: Dec 2004
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dean C
Not to criticise your modification but I'd say this was a poor way of implementing this. As soon as you put no follow on the links it'll:



Also your addon will mean google will not try to index the page. Maybe I'm missing something here but why on earth would you not want the search engines to index your page. The only usage for this will be on blog comment pages. Just because a spambot sees your link having rel="no follow" inside of it will not mean it won't spam the email.
The point of this hack has been missed. The code does not stop spiders from indexing your pages, only from following links that posted on the pages.

Cretins get high ranking by using loopholes in the way that search engines rank sites/pages. Essentially if a search engine "sees" a url that has numerous other pages linking to it it thinks that that site is popular. This may be the case, but if I were to visit every single one of the users sites from this forum alone and posted a link to my board on each one suddenly my sites ranking will increase as the bots "see" lots of links to my site. This is the essence of "google bombing" (like search on Feeling Lucky for WMD in google for example).

By making it so that links POSTED IN THREADS have no follow means that the search engine bots IGNORE links in posts but will index your pages and follow all the other links in your pages unless you've messed with robots.txt or put the nofollow elsewhere.

I think that explains it....


*INSTALLED*
Reply With Quote
  #27  
Old 01-23-2005, 06:49 PM
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 Soto
The point of this hack has been missed. The code does not stop spiders from indexing your pages, only from following links that posted on the pages.

Cretins get high ranking by using loopholes in the way that search engines rank sites/pages. Essentially if a search engine "sees" a url that has numerous other pages linking to it it thinks that that site is popular. This may be the case, but if I were to visit every single one of the users sites from this forum alone and posted a link to my board on each one suddenly my sites ranking will increase as the bots "see" lots of links to my site. This is the essence of "google bombing" (like search on Feeling Lucky for WMD in google for example).

By making it so that links POSTED IN THREADS have no follow means that the search engine bots IGNORE links in posts but will index your pages and follow all the other links in your pages unless you've messed with robots.txt or put the nofollow elsewhere.

I think that explains it....


*INSTALLED*
Thank you.

I kinda thought that was obvious, but thank you for spelling it out so well for those people who seem to think this is some kind of 'Stop Spiders from indexing your site' hack, which..quite frankly, would be a retarded idea.
Reply With Quote
  #28  
Old 01-28-2005, 05:56 PM
ricker ricker is offline
 
Join Date: Jun 2003
Location: Apple Valley, CA
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed, however, is there a way this can be implemented into signatures as well? It seems as if it's taking no effect there. *edit* Errr, maybe it is. It should work everywhere, right? Profile pages don't seem to include it, maybe my browser is cached.
Reply With Quote
  #29  
Old 01-29-2005, 07:29 PM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Although I think yoyo's post needed to be clarified, I think people arebeing hard on him. There are many boards out there with many goals. Aslong as people understand what he's doing and implement it tofurthertheir goals, his posts have been very helpful AND he clearlyknows whathe's talking about.

Thanks for the hack Kall and the additions. I like the one basedonnumber of posts. It will be cool if the addons can be mentioned inthefirst thread for new people coming onto this thread. This willprobablygrow into a big thread until vb supports the tag....WHICH Isuggestthey do right away so that they can boost their pagerank bygettingmentioned in Google's blog which announced this

(just kidding, they are using a redirect anyway.)
Reply With Quote
  #30  
Old 02-05-2005, 04:54 PM
mindbuster mindbuster is offline
 
Join Date: Oct 2002
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Couldnt get this to work, followed instructions but no "nofollow" showed when viewing source.
Reply With Quote
  #31  
Old 02-15-2005, 04:08 AM
nintendo's Avatar
nintendo nintendo is offline
 
Join Date: Dec 2001
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ttlgDaveh
I made a modification to it so that only new members (in my case, those with less than 30 posts) have rel="nofollow" attached to their posts. Established members are not penalised and the searchbots will still follow and index their links.
Now that's a MUCH better version. With the way it is by default, this is one STUPID hack, punishing the 99% that arn't spammers! At this rate it won't be long before a STUPID signiture version of the hack is created!
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 03:44 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.05293 seconds
  • Memory Usage 2,349KB
  • 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
  • (8)bbcode_php
  • (7)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