linking2Add my vote for this tag rendering2Add my vote for this tag create new tag
, view all tags

External Link Plugin

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


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 [[...]]-syntax - like i.e.
[[http://external.site.com][an external site]]

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

Syntax Rules

Remember to use the [[...]] forced link syntax.

Plugin Settings

  • One line description, is shown in the 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. "»" (»))
    • Set MARK = 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 ExternalLinkPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/ExternalLinkPlugin.txt Plugin topic
    lib/TWiki/Plugins/ExternalLinkPlugin.pm Plugin Perl module
    pub/TWiki/ExternalLinkPlugin/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
[[http://TWiki.org][TWiki.org: TWiki's home]] TWiki.org: TWiki's home External link mark TWiki.org: TWiki's home
[[ftp://no.where.com][Some nonexistent FTP site]] Some nonexistent FTP site External link mark Some nonexistent FTP site
[[https://sourceforge.net][Sourceforge.net under a secure connection]] Sourceforge.net under a secure connection External link mark 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
[[%ATTACHURL%/bli.png][link to (nonexistent) local attachment]] link to (nonexistent) local attachment link to (nonexistent) local attachment
[[%SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%][explicit link to this topic]] explicit link to this 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:  
2010-10-31: TWikibug:Item6530: Doc fixes
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
License: GPL (GNU General Public License)
Benchmarks: GoodStyle nn%, FormattedSearch nn%, ExternalLinkPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/ExternalLinkPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/ExternalLinkPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/ExternalLinkPluginAppraisal

Related Topics: TWikiPreferences, TWikiPlugins

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 ExternalLinkPlugin.md5 r6 r5 r4 r3 r2 manage 0.2 K 2010-10-31 - 07:47 PeterThoeny  
Compressed Zip archivetgz ExternalLinkPlugin.tgz r6 r5 r4 r3 r2 manage 5.0 K 2010-10-31 - 07:47 PeterThoeny  
Compressed Zip archivezip ExternalLinkPlugin.zip r7 r6 r5 r4 r3 manage 6.9 K 2010-10-31 - 07:47 PeterThoeny  
Unknown file formatEXT ExternalLinkPlugin_installer r2 r1 manage 3.4 K 2010-10-31 - 07:47 PeterThoeny  
Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r13 - 2013-10-16 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.