Maxi-Pedia Forum

Information Technologies and Systems (IT/IS) => Internet, SEO, HTML, AdSense, How to build a website => Topic started by: atari on October 22, 2008, 05:06:43 pm



Title: NoFollow tag in outgoing links in SMF
Post by: atari on October 22, 2008, 05:06:43 pm
How can I add the nofollow tag to outgoing links in my SMF project?



Title: Re: NoFollow tag in outgoing links in SMF
Post by: mod on October 22, 2008, 05:12:47 pm
Go to your sources/Subs.php file in your SMF folder and go to somewhere around lines 1578. Add the nofollow to the definition of the array elements.

array(
   'tag' => 'url',
   'type' => 'unparsed_content',
   'content' => '<a href="$1" target="_blank" rel="nofollow">$1</a>',
   'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
   'tag' => 'url',
   'type' => 'unparsed_equals',
   'before' => '<a href="$1" target="_blank" rel="nofollow">',
   'after' => '</a>',
   'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
   'disabled_after' => ' ($1)',
),

Note, this will add nofollow to all a href links whether they point outside the server or to another topic in your forum.

There is also the NoFollow All Links v1.0 module that can do the code change for you:
http://custom.simplemachines.org/mods/index.php?mod=1236




Title: Re: NoFollow tag in outgoing links in SMF
Post by: mismas on November 14, 2008, 05:17:49 pm
Yea, I have tried this on my website, it works fine, thanks.


Title: NoFollow tag in outgoing links in SMF
Post by: TanyVady73 on November 16, 2009, 07:50:40 am
I have noticed yahoo not respecting rel="nofollow" links on my site. What about everyone else?


Title: Re: NoFollow tag in outgoing links in SMF
Post by: mismas on November 18, 2009, 11:01:45 am
I have noticed yahoo not respecting rel="nofollow" links on my site. What about everyone else?

How do you know? How did you find out?