[pmwiki-users] Thumblist, ?i param, regex

Petko Yotov 5ko at 5ko.fr
Wed Jul 6 15:56:35 CDT 2011

On Wednesday 06 July 2011 22:12:27, ABClf wrote :
> I'm trying to show, on some page, a gallery of pictures made with
> thumblist. I need to link these pictures to some other page.
> For a picture named 111.jpg I need a link to
> http://www.languefrancaise.net/bob/detail.php?id=111
> I didn't succeed with http://tl.5ko.fr/T/AlternativeLinks to get it to work
> ; I suspect I am expected to use a true PmWiki styled link ;

Yes, it expects a wiki page: Group.Page.

> so i'm working with caption. It works mostly fine, excepted the fact the
> regex is too hungry.
> For generating my link, I use this :
> captionfmt="[[http://www.languefrancaise.net/bob/detail.php?id=?i|?i]]"

If this works, it is some side effect, not entirely by design - I couldn't 
promise it will work in future versions of the script - so, keep a backup copy 
of the version you have now. OTOH, I really don't have plans for major changes 
in Thumblist, so it might work in the future. :-)

> and I get (for number : 63135)
> http://www.languefrancaise.net/bob/detail.php63135d=63135
> As you can see, ?id has been transformed as if it were ?i and d
> Would it be possible to distinguish ?i from ?id in the regex  ?

"?i" is a question variable, and it is transformed to some property of the 
picture; to place a literal question mark, just double it: 


See http://www.pmwiki.org/wiki/Cookbook/ThumbList#questionvars .


More information about the pmwiki-users mailing list