External Link Plugin

This plugin adds a visual indicator to external links, so users can distinguish outgoing links from site links.

This will only work for forced links marked up using the so-called double bracket syntax, like:
[[http://external.site][an external site]]

URLs that are just written in as http://external.site are left untouched.

Syntax Rules

Remember to use the double bracket link syntax.

Plugin Settings

Change default settings in configure.
Configure setting Meaning Default
{MarkerImage} link marker image; see below for a list of images external.gif
{CssOnly} If set to 1, does not add an image but writes CSS to the page; use if your users have modern browsers 0
{Debug} If set to 1, writes debugging info to data/debug.txt 0

Marker images

Code text Image
%PUBURLPATH%/%SYSTEMWEB%/ExternalLinkPlugin/external.gif external.gif
%PUBURLPATH%/%SYSTEMWEB%/ExternalLinkPlugin/diagonal.gif diagonal.gif

CSS Classes

This plugin adds one CSS class:

.externalLink link class to mark outgoing links

Plugin Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Testing your installation

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

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

Code text If plugin enabled
[[http://foswiki.org][foswiki.org]] foswiki.org

Unsurprisingly, local links won't be marked as being external. The following links should not be marked:

Code text If plugin enabled
[[%ATTACHURL%/bli.png][link to (nonexistent) local attachment]] link to (nonexistent) local attachment

Plugin Info

Authors: TWiki:Main.AurelioAHeckert, TWiki:Main.NelsonFerraz, TWiki:Main.AntonioTerceiro, Foswiki:Main.ArthurClemens
Copyright: © 2005: Aurelio A Heckert, Nelson Ferraz, Antonio Terceiro; 2006: Steffen Poulsen; 2009: Foswiki:Main.ArthurClemens
License: GPL (Gnu General Public License)
Version: 5906 (2009-12-31)
Release: 1.21
Change History:  
31 Dec 2009 v1.21 - fixed closing css declaration.
02 Oct 2009 v1.20 - Ported to Foswiki; changed img HTML tag to CSS style; moved plugin settings to Configure.
24 Apr 2006 v1.11 - %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
Plugin Home: http://foswiki.org/Extensions/ExternalLinkPlugin
Support: http://foswiki.org/Support/ExternalLinkPlugin
Topic attachments
I Attachment Action Size Date Who Comment
diagonal.gifgif diagonal.gif manage 0.1 K 31 Dec 2009 - 21:42 AdminUser  
external.gifgif external.gif manage 0.1 K 31 Dec 2009 - 21:42 AdminUser  
Topic revision: r3 - 09 Oct 2012, AdminUser
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback Privacy policy & use of cookies