TIP LinkOptionsPlugin is not installed on Foswiki.org.

LinkOptionsPlugin

It adds one third block to "Forced Specific Links" in the format:
[[URL or TopicName][Link Text][Option:value]]

Some new options and CSS sets can be used simultaneously, separated by a pipe (|):
[[URL or TopicName][Link Text][Option1:value1|Option2:value2|...|OptionN:valueN]]


Syntax Rules

Options Values Coment
NewWin XxY X and Y must be integer values. This option will open a new window with no menu, butons, or url bar, but it well have status bar
Name Name Name can be a target name (using fames) or the name of a new window
Title Text A text to be a hint for the link
Class Name The name of a class (to define CSS style)
ID Name This Name must be unique on the web page
Skin SkinName SkinName must be a valid Foswiki skin
CSS CSS Code CSS Code is any CSS formatatin code. You can repeat this option

color is a CSS properti, and you can put values like #00A0F0 or red. See more colors in StandardColors. You can use any CSS properti (valid for links) hire. See more in the CSS2 Specification in the W3C Web Site.

The option names are case insensitive for LinkOptionsPlugin or CSS, but the W3C defines the CSS properties in lower case and it is important to validade. Write the LinkOptionsPlugin optins as you prefer.

Examples

The text in Red:
  • Code: [[WebHome][Start Page][Color:red|Title:Go to the Start!]]
  • Expand to: Start Page
    • If installed: [[WebHome][Start Page][Color:red|Title:Go to the Start!]]
(Stop the mouse over the link to see the title)

Opening in other target:
  • Code: [[http://www.gnu.org][the GNU web site][Name:_blank|Class:myclass|ID:myid]]
  • Expand to: the GNU web site
    • If installed: [[http://www.gnu.org][the GNU web site][Name:_blank|Class:myclass|ID:myid]]
(_blank is no target. It will Open in a new window)

Opening in a new window (with options):
  • Code: [[System.Macros][See the Macros][NewWin:600x500|Name:winMacros|Skin:plain]]
  • Expand to: See the Macros
    • If installed: [[System.Macros][See the Macros][NewWin:600x500|Name:winMacros|Skin:plain]]

Crazy CSS use:
  • Code: [[WebHome][Crazy Link!][color:green|background-color:#FFF0A0|border:3px dotted #FFC030|text-decoration:none|letter-spacing:10px|padding:4px|font-size:15px|font-weight:900]]
  • Expand to: Crazy Link!
    • If installed: [[WebHome][Crazy Link!][color:green|background-color:#FFF0A0|border:3px dotted #FFC030|text-decoration:none|letter-spacing:10px|padding:4px|font-size:15px|font-weight:900]]

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Extends the "Forced Specific Links" syntax [[URL or TopicName][Link Text][Options]]

  • Set DEBUG to 1 to get debug messages in data/debug.txt. Default: 0
    • Set DEBUG = 0

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.

Plugin Files

File: Description:
data/System/LinkOptionsPlugin.txt Plugin description topic
lib/Foswiki/Plugins/LinkOptionsPlugin.pm Plugin code module

Plugin Info

Plugin Author: Foswiki:Main.ItaloValcy
Previous Author: Foswiki:Main.AurelioAHeckert
Copyright: © 2009, Italo Valcy, © 2005-2006, Aurelio A. Heckert
Version: 4643
Change History:  
21 Jul 2009 Foswiki:Main.ItaloValcy: Porting to Foswiki (closes Foswikitask:Item1916)
27 Jul 2006 (v1.001) - TWiki:Main.AntonioTerceiro: Dakar compatibility
29 Mar 2005 Initial version
Foswiki Dependency: $Foswiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
License: GPL (GNU General Public License)
Plugin Home: http://foswiki.org/Extensions/LinkOptionsPlugin
Support: http://foswiki.org/Support/LinkOptionsPlugin

Related Topics: DefaultPreferences, SitePreferences, Plugins
I Attachment Action Size Date Who Comment
LinkOptionsPlugin.md5md5 LinkOptionsPlugin.md5 manage 174 bytes 11 Aug 2009 - 14:51 ItaloValcy  
LinkOptionsPlugin.sha1sha1 LinkOptionsPlugin.sha1 manage 198 bytes 11 Aug 2009 - 14:51 ItaloValcy  
LinkOptionsPlugin.tgztgz LinkOptionsPlugin.tgz manage 6 K 11 Aug 2009 - 14:50 ItaloValcy  
LinkOptionsPlugin.zipzip LinkOptionsPlugin.zip manage 7 K 11 Aug 2009 - 14:50 ItaloValcy  
LinkOptionsPlugin_installerEXT LinkOptionsPlugin_installer manage 4 K 11 Aug 2009 - 14:50 ItaloValcy  
Topic revision: r1 - 11 Aug 2009, ItaloValcy
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy