[pmwiki-users] Tool tips not working for me (Also Re: Title Attribute?)

Andrew Standfield andy at scruffyco.com
Fri Mar 14 01:22:50 CDT 2008


Oh my gosh!

This recipe fixes my issue from before! :)

It looks like the $LinkPageExistsFmt option you're using (the third  
one one the recipe you link to) wants to set the page description as  
the title attribute for the link (which is what causes tooltips).  
However, the example you give on how you're setting the description  
is incorrect. You want to use it as a directive, like you've done  
with the title. Like this:

(:description This is my page description:)

I used the third option:

$FmtPV['$DescriptionT'] = '@$page["description"] ?  $page 
["description"] : PageVar($pn, "\$Title")';
$LinkPageExistsFmt = "<a class='wikilink' title='{\$DescriptionT}'  
href='\$LinkUrl'>\$LinkText</a>";

Which will put the page title if no description exists.

I didn't think it was working for me at first, either. After you  
implement it, make sure that you are hovering over an internal link  
to a page that exists and is *not* the current page.

BTW, the link to PITS that Hagan gave me earlier (http:// 
www.pmwiki.org/wiki/PITS/00657) has a note on the top of how to put a  
title attribute in to an *external* link.

It says to add this to your config.php:

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

To set the title attribute for the external links, use [[http:// 
www.whatever.com/"Tooltip text can go here" | Link Text]]

I have them both in config.php, and they seem to be working fine.  
Take a look at:

http://www.scruffyco.com/divide/Main/HomePage

Mouse over the two (external) links in the main body, as well as  
"Overview" and "Links" in the navigation. Over view has the  
(:description:) set, but "Links" does not.



Andy

On Mar 13, 2008, at 8:53 PM, Randy wrote:

> Can anyone tell me why I don't see a tool tip when I follow the recipe
> described at http://www.pmwiki.org/wiki/Cookbook/ 
> LinkPageExistsFmtTooltip
>   and then hover my cursor over a link?
>
> I'm using the latest version of PmWiki, and have a number of recipes
> installed.
>
> The working example referred to in the recipe works for me, so I doubt
> the problem is with my browser.
>
> My Sandbox contains:
>
> (:title The Sandbox:)
> Description: test tool tips
>
> [[Main.Sandbox]]
>
> My config.php contains only one reference to LinkPageExistsFmt:
>
> $LinkPageExistsFmt = "<a class='wikilink' title='{\$Description}'
> href='\$LinkUrl'>\$LinkText</a>";
>
> Thanks in advance for any comments,
>
> Randy
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080313/eea4f8bf/attachment.html 


More information about the pmwiki-users mailing list