NoFollow BBCode

Started by karlbenson, October 14, 2007, 04:07:54 PM

Previous topic - Next topic

karlbenson

Link to Mod


NoFollow BBCode v1.0
By Karl Benson



Introduction
A modification for the use of [nofollow][/nofollow] bbcode to create links with rel="no-follow" attribute.

This mod is intended for use where you may want to link to a 'bad site' and not want to create a backlink and therefore not give it any pagerank.

The only search engine that really takes account of the rel="nofollow" attribute is Google.
For more information see the Wikipedia NoFollow Article

If you want to force ALL urls/links to have a nofollow attribute, then use my Make All Links rel="nofollow" mod.

Features
o BBCode Button to Insert [nofollow][/nofollow] bbcode.
o Works with 2 different types of BBCODE (just like url/iurl bbcode)
- Works with [nofollow=http://www.badbadbadsite.com][/nofollow]
- Works with [nofollow=http://www.badbadbadsite.com]Very Bad Site[/nofollow]

Installation
Simply install the package to install this modification on the Default theme.

This mod will work for both SMF 1.1.x versions
and SMF 2.0.x versions (the beta of which is currently available to Charter Members).

Manual Edit
A Manual edit will be required for non-default themes to add the BBCode button to the Post.template.php (IF the theme has a custom Post.template.php)
FIND
'email' => array('code' => 'email',
ADD BEFORE
'nofollow' => array('code' => 'nofollow', 'before' => '[nofollow]', 'after' => '[/nofollow]', 'description' => $txt['nofollow']),

You will also need to place a copy of the nofollow.gif in each of your themes bbc image folders (eg Themes/{themename}/images/bbc)

If your using a language different than the ones supported this mod (listed below), then you will need to add the following to the Modifications.{language}.php for each theme (The language folder can be found eg Themes/{themename}/languages/)

FIND
?>
ADD BEFORE (and translate as necessary the language strings)

$txt['nofollow'] = 'Insert a URL with a NoFollow Attribute';


Languages
o Supports
- English/English-utf8
- English_British/English_British-utf8
I welcome translations for any languages which SMF Supports.
Please translate the following and send them to me via the mods support topic or via pm.
(I would be grateful if you could translate for both standard and for UTF-8 aswell).

$txt['nofollow'] = 'Insert a URL with a NoFollow Attribute';


Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
1.0 - 3rd October 2007
o Initial Release per request

karlbenson

I have reuploaded this mod and screenshots for it.

I am in the process of doing it for ALL my other mods aswell.  Please bear with me.

Advertisement: