|
Cookbook /
LinkTitlesSummary: Add "title" attributes to all links
Version:20101221
Prerequisites: PmWiki 2.2.22 or newer, or svn revision 2613 or newer
Status: Beta
Maintainer: Petko
Comments: LinkTitles-Talk?
This recipe allows you to add link titles to external and internal links. Note that with PmWiki version 2.2.35 and newer you can already have link titles for all links. [[Main/Home"Start page"]] will print Home with a tooltip title "Start page".
[[http://www.wikipedia.org/"The free encyclopedia"|Wikipedia]] will print Wikipedia and a tooltip "The free encyclopedia" with a tooltip "The free encyclopedia".
Changelog:
DescriptionThis recipe allows you to add link titles to external and internal links. Link titles are displayed in a small tooltip when the mouse cursor passes over a link. It can be used to provide additional information and/or URL and is a usability recommended feature. InstallationTo use this script, download itΔ, place it into the cookbook/ folder and add the line include_once('cookbook/linktitles2.php');
to a local customization file (local/config.php). UsageYou can add a link title by placing it in parentheses after the link text:
If you don't have a text in parentheses, the title will be the external URL or the local target page:
To remove a link title, append "()" to the link text, i.e.
To keep a parenthesed words in the link text, append "()" or "(some title text)" to the link text, i.e. ConfigurationLinkTitles 20101221 can be configured. You can add to config.php, before including the recipe, the following commands:
Advanced admins can change the way a title is defined. For example: $LinkTitleRegExp = '/\\|([^\\|]*)\\s*$/'; will allow you to use the markup Notes
Release Notes
CommentsSee LinkTitles-Talk?. See Also
Contributors
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |