MyBB Community Forums

Full Version: Adding nofollow to outgoing links
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I didn't use any url modifying plugin.

well here is the source.
<div class="post_body" id="pid_709">
<a href="http://community.mybb.com/index.php" rel="nofollow" target="_blank"><br />target="_blank">MyBB</a><br /> 
<a href="http://community.mybb.com/index.php" rel="nofollow" target="_blank"><br />
 target="_blank">http://community.mybb.com/index.php</a><br /> 
<a href="http://community.mybb.com/index.php" rel="nofollow" target="_blank"><br />
 target="_blank">http://community.mybb.com/index.php</a>
				</div>

and this is the image that came out
[Image: jShnD.png]

do you know where I can fix this?
I'm using Google SEO and follow the step in 1st post.
I tested the given mycode in ACP, kindly check the screenshot if it is already OK and working?

Nofollow = [Image: attachment.php?aid=22985]

Dofollow = [Image: attachment.php?aid=22986]
You cannot tell by the screenshot, you need to look at the page's source.
The Sandbox of the MyCode editor doesn't parse message or automatically converts text urls to clickable url, like message would be parsed in a post. You need to check in the source code of the showthread.php page or paste in this code in the Test value:
<a href="http://googleblog.blogspot.com/2005/01/preventing-comment-spam.html">http://googleblog.blogspot.com/2005/01/preventing-comment-spam.html</a>
Thanks, sorry for late replay and noob question
It is already working, thanks again!
Where to download this plugin (sorry for bad English)?
(2011-06-04, 04:22 PM)supmener Wrote: [ -> ]Where to download this plugin (sorry for bad English)?

This is not a plugin. You have to manually add a Custom MyCode (via ACP > Configuration > MyCode) and add in the fields as described in the first post.
working very good

how can i enable it for only threads ?
Above mentioned solution depends on rel="nofollow" when placed exactly next to href="" text.

I've come up with better solution:

Regular Expression:
(?si)(<a href=[^>]+example\.com[^>]+)rel="nofollow"

Replacement
$1

So it has two advantages:
  • On any of html text is case insensitive( looks like it is already there by Mybb, internally)
  • Now it works wherever rel="nofollow" tag is placed within <a ...

I hope I'm right.
waw. nice..

I've tried it and steady.
Pages: 1 2 3 4