[pmwiki-users] flyover title for anchor?

Hans design5 at softflow.co.uk
Sun Apr 6 14:07:04 CDT 2008


Sunday, April 6, 2008, 6:57:52 PM, Hans wrote:

> Limitation: does not work with IE

Here is  a solution which works also in IE, and does not use css, but
relies on the browser to show alternative link text in a "hover" box.
I think most browsers will do this.

With the added markup and alternative $LinkPageExistsFmt a link
markup like [[target | text "tooltip"]] will show 'text' as link text
with 'tooltip' as a "hover tooltip". you need to use the double quote
marks "..." for the tooltip text.

Add to config.php

## [[target | text "tooltip"]]
Markup('[[|tt','<[[|',
  "/(?>\\[\\[([^|\\]]*)\\|\\s*)(.*?)\\s*(\"(.*?)\")?\\s*\\]\\]($SuffixPattern)/e",
  "Keep(ToolTipLink(\$pagename,PSS('$1'),PSS('$2'),PSS('$4'),'$5'),'L')");
 
function ToolTipLink($pagename, $tgt, $txt, $tooltip='', $suffix) {
  global $FmtV;
  $FmtV['$LinkAlt'] = $tooltip;
  return MakeLink($pagename, $tgt, $txt, $suffix);
}

$LinkPageExistsFmt = "<a class='wikilink' href='\$LinkUrl' rel='nofollow'
   title='\$LinkAlt'>\$LinkText</a>";


  ~Hans




More information about the pmwiki-users mailing list