[pmwiki-users] re RE: help for adding titlw="*"

Peter K.H. Gragert p.k.h.gragert at misc.utwente.nl
Mon Aug 25 09:05:02 CDT 2008


> -----Oorspronkelijk bericht-----

> Van: Patrick R. Michaud [mailto:pmichaud at pobox.com]

> Verzonden: zondag 24 augustus 2008 15:08

> Aan: Peter K.H. Gragert

> CC: PmWiki Users

> Onderwerp: Re: [pmwiki-users] help for adding titlw="*"

> 

> On Sun, Aug 24, 2008 at 11:36:16AM +0200, Peter K.H. Gragert wrote:

> > Hallo PmWiki  users

> > I would like to  to 'extend' [[ pmwikilink ]] markup such that

> > I could add the value of the 'title=' in the a-tag.

> 

> This is PITS:00657, and listed in the roadmap.  It's on my

> todo list, I just haven't had an opportunity to go through

> and fix it up properly.

> 

> Pm

Yes, indeed that PITS is what I would like to use.
Idea: make it for any number of 'attibute' pairs (name="value")?!

[[group.page style="." title="." alt="."  etc. | link text ]] 

 

 

 

Ugly implementation but it Works ;-) of my 'wish':

 

<?php if (!defined('PmWiki')) exit();

 

$atpname = 'ajaxtooltip';

$atpwhen = 'directives';

$atppattern = '/\\(:ajaxtooltip (.*)\\|(.*)\\|(.*):\\)/ei';

 

 

function PKHGmakeNewLink($page,$external,$linkText){

  return ("<a href=\"$page\" title=\"ajax:$external\">$linkText </a>");

}

 

Markup($atpname,$atpwhen,$atppattern,"Keep(PKHGmakeNewLink('$1','$2','$3'))"
);

 

?>

 

Have a look at 

http://www.pkhg.nl/pmwiki.php/Test/AjaxTooltip

 

Several problems remain ..
The needed javascript inclusions are done in  config.php (not nice, only
those pages using the tooltip should load the javascript)
IN the jquery code the ajaxtooltip, adjusted for THE [meaning: ONE]
website,  had to be include into jquery*pack.js, otherwise jQuery is
sometimes loaded too late (why, not yet understood).

And too, if I change the external *.html, I do not know to persuade the
system to immediately use the NEW version (AJAX property?!)

 

But nevertheless, PKHG is happy.

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


More information about the pmwiki-users mailing list