Welcome to Maxi-Pedia Forum. Maxi-Pedia discussion forum is a free community inviting you to express your ideas and discuss various topics with other contributors.

April 19, 2024, 11:46:12 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Most Recent Posts:
Pages: [1]
  Print  
Author
Topic: 

NoFollow tag in outgoing links in SMF

 (Read 15088 times)
atari
Moderator
*****
Posts: 121


« on: October 22, 2008, 05:06:43 pm »

How can I add the nofollow tag to outgoing links in my SMF project?

Logged
Maxi-Pedia Forum
« on: October 22, 2008, 05:06:43 pm »

 Logged
mod
Moderator
*****
Posts: 525


« Reply #1 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


Logged
mismas
Jr. Member
**
Posts: 60


« Reply #2 on: November 14, 2008, 05:17:49 pm »

Yea, I have tried this on my website, it works fine, thanks.
Logged
TanyVady73
Semi-Newbie
*
Posts: 10


« Reply #3 on: November 16, 2009, 07:50:40 am »

I have noticed yahoo not respecting rel="nofollow" links on my site. What about everyone else?
Logged
mismas
Jr. Member
**
Posts: 60


« Reply #4 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?
Logged
Maxi-Pedia Forum
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Page created in 0.076 seconds with 22 queries. (Pretty URLs adds 0s, 0q)