External Links
Designating external links, either with a graphic or a different colour, is an important feature of accessible and usable websites. If you or your clients use Textile or a WYSIWYG editor then you may not be able to ensure that an appropriate CSS class is applied to such links. This plugin enables you to do that.
Checked for EE: 1.5.2 + Download: pi.external_links.php (Zipped)
Installation Instructions
- Unzip the archive
- Copy pi.external_links.php to your /system/plugins/ directory
Usage
Wrap {exp:external_links} around text you wish to process. There are two parameters:
- class=”the CSS class you wish assigned to external links” (will default to ‘external-link’ if you don’t specify a class)
- local=”the site domain name”
So, assuming your domain is ‘myblog.com’ then this:
{exp:external_links class="external" local="myblog.com"}
<p><a href="http://www.anotherblog.com">consectetuer</a>, <a href="http://www.myblog.com/gallery/">hendrerit</a></p>
{/exp:external_links}will output this:
<p><a href="http://www.anotherblog.com" class="external">consectetuer</a>, <a href="http://www.myblog.com/gallery/">hendrerit</a></p>It is will take extra attributes like ‘title’ into account and place the class at the end of them.

