%META:TOPICINFO{author="TWikiContributor" date="1288510659" format="1.1" version="$Rev$"}%
---+ External Link Plugin
<!--
   Contributions to this plugin are appreciated. Please update the plugin page at
   http://twiki.org/cgi-bin/view/Plugins/ExternalLinkPlugin or provide feedback at
   http://twiki.org/cgi-bin/view/Plugins/ExternalLinkPluginDev.
   If you are a TWiki contributor please update the plugin in the SVN repository.
-->
<div style="float:right; background-color:#EBEEF0; margin:0 0 20px 20px; padding: 0 10px 0 10px;">
%TOC{title="Page contents"}%
</div>
%SHORTDESCRIPTION%

---++ Introduction

This plugin will mark external links so users don't leave your site by accident.

This will only work for forced links marked up using <code>[<nop>[...]]</code>-syntax - like i.e. %BR% 
<code>[<nop/>[http://external.site.com]<nop/>[an external site]<nop/>]</code>

URLs that are just written in straight text (i.e. just =http://external.site.com=) are left untouched.

---++ Syntax Rules

Remember to use the =[<nop>[...]]= forced link syntax.

---++ Plugin Settings

   * One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic:
      * Set SHORTDESCRIPTION = This plugin will mark external links so users don't leave your site by accident.

   * External link mark (besides images it is also possible to use HTML entity characters like e.g. "&raquo;" (=&amp;raquo;=))
      * Set MARK = <img src="%PUBURLPATH%/%SYSTEMWEB%/ExternalLinkPlugin/external.gif" alt="External link mark" />

   * Debug plugin: (See output in =data/debug.txt=)
      * Set DEBUG = 0

---++ Plugin Installation Instructions

This plugin is installed by default with a TWiki release. You should not need to install the plugin unless it is for an upgrade.

   * Download the ZIP file from the Plugin web (see below)
   * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content:
     | *File:* | *Description:* |
     | ==data/TWiki/%TOPIC%.txt== | Plugin topic |
     | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module |
     | ==pub/TWiki/%TOPIC%/external.gif== | Default graphic for external link mark |
   * Visit =configure= in your TWiki installation, and enable the plugin in the {Plugins} section.

---++ Testing your installation

To test if the plugin is correctly installed, check the following links.

---+++ External links

The links in the "If plugin enabled"-column should be marked with a %EXTERNALLINKPLUGIN_MARK% if the plugin is functioning correctly.

| *Verbatim* | *Pre-rendered* | *If plugin enabled* | 
| =[<nop>[http://TWiki.org][TWiki.org: TWiki's home]]= | <a href="http://TWiki.org" target="_top">TWiki.org: TWiki's home</a>&nbsp;<img src="%PUBURLPATH%/%WEB%/%TOPIC%/external.gif" alt="External link mark"> | [[http://TWiki.org][TWiki.org: TWiki's home]] |
| =[<nop>[ftp://no.where.com][Some nonexistent FTP site]]= | <a href="ftp://no.where.com" target="_top">Some nonexistent FTP site</a>&nbsp;<img src="%PUBURLPATH%/%WEB%/%TOPIC%/external.gif" alt="External link mark"> | [[ftp://no.where.com][Some nonexistent FTP site]] |
| =[<nop>[https://sourceforge.net][Sourceforge.net under a secure connection]]= | <a href="https://sourceforge.net" target="_top">Sourceforge.net under a secure connection</a>&nbsp;<img src="%PUBURLPATH%/%WEB%/%TOPIC%/external.gif" alt="External link mark"> | [[https://sourceforge.net][Sourceforge.net under a secure connection]] |

---+++ Local links

Not surprisingly, ExternalLinkPlugin won't mark local links as being external. The
following links should not be marked with a %EXTERNALLINKPLUGIN_MARK%:

| *Verbatim* | *Pre-rendered* | *If plugin enabled* | 
| =[<nop>[%<nop>ATTACHURL%/bli.png][link to (nonexistent) local attachment]]= | <a href="%ATTACHURL%/bli.png" target="_top">link to (nonexistent) local attachment</a> | [[%ATTACHURL%/bli.png][link to (nonexistent) local attachment]] |
| =[<nop>[%<nop>SCRIPTURL%/view%<nop>SCRIPTSUFFIX%/%<nop>WEB%/%<nop>TOPIC%][explicit link to this topic]]= | <a href="%SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%" target="_top">explicit link to this topic</a> | [[%SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%][explicit link to this topic]] |

---++ Plugin Info

|  Plugin Author: | TWiki:Main.AurelioAHeckert, TWiki:Main.NelsonFerraz, TWiki:Main.AntonioTerceiro |
|  Plugin Version: | 2010-10-31 - v1.12 |
|  Change History: | <!-- versions below in reverse order -->&nbsp; |
|  2010-10-31: | TWikibug:Item6530: Doc fixes |
|  24 Apr 2006: | (v1.11) - =%<nop>TOPIC% removed from =MARK= definition, wasn't expanded correctly. |
|  23 Apr 2006: | (v1.10) - Incorporated patch from TWiki:Main.TobiasRoeser (only mark external link once in an included scenario). Minor doc brush-up. Changed default marker to =external.gif= graphic. (TWiki:Main.SteffenPoulsen). |
|  02 Nov 2005: | (v1.00) - Initial release |
|  CPAN Dependencies: | none |
|  Other Dependencies: | none |
|  Perl Version: | 5.005 |
|  License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
|  [[TWiki:Plugins/Benchmark][Benchmarks]]: | %SYSTEMWEB%.GoodStyle nn%, %SYSTEMWEB%.FormattedSearch nn%, %TOPIC% nn% |
|  Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% |
|  Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev |
|  Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal |

__Related Topics:__ %SYSTEMWEB%.TWikiPreferences, %SYSTEMWEB%.TWikiPlugins

%META:FILEATTACHMENT{name="external.gif" attr="h" comment="" date="1288510120" path="external.gif" size="2008" user="TWikiContributor" version=""}%
