[pmwiki-users-fr] Lightbox by default : $ThumbList['LinkRel'] = 'lightbox';
ABClf
languefrancaise at gmail.com
Jeu 16 Oct 15:20:41 CDT 2008
Hello pmwiki users,
I'm upgrading the wonderful Petko's recipe (thumblist) from v1 to the last
one (20081015).
I see no problem (I'm playing with the basicer fonctions) but at that time I
can't or don't know how to make the lightbox work by default (It did with
former thumblist v1).
If I write rel=lightbox, it's working, the lightbox is there, but no way to
to make it work by defaut (for thumb and for thumblist, I want both).
---the doc--- :
To enable Lightbox for all thumblist galleries by default, set in
config.php:
$ThumbList['LinkRel'] = 'lightbox';
---my config (lightbox)--- :
##-- THUMBLIST
****************************************************************************************
include_once("$FarmD/cookbook/thumblist2.php");
##-- LIGHTBOX
*******************************************************************************************
$ThumbList['fPreChecks'] = 'uThumbLightbox';
function uThumbLightbox(&$opt)
{
global $HTMLHeaderFmt;
if(preg_match("/lightbox/i", @$opt['rel']))
{
$LightboxDirUrl = "/pub/lb"; # LIGHTBOX DIRECTORY
$opt['rel'] = 'lightbox[?G]';
$HTMLHeaderFmt['lightbox'] =<<<EOF
<script type="text/javascript" src="$LightboxDirUrl/prototype.js"></script>
<script type="text/javascript"
src="$LightboxDirUrl/scriptaculous.js?load=effects"></script>
<script type="text/javascript"><!--
LightboxDirUrl = "$LightboxDirUrl";//--></script>
<script type="text/javascript" src="$LightboxDirUrl/lightbox.js"></script>
<link rel="stylesheet" href="$LightboxDirUrl/lightbox.css" type="text/css"
media="screen"/>
EOF;
}
}
$ThumbList['LinkRel'] = 'lightbox';
Any idea of what's wrong ?
Looking at the html code there is something strange in the image link :
When using (notworking) config param I got :
rel="lightbox"
When using (working) rel=lightbox in wiki code I got :
rel="lightbox[1]"
You can see in live my page I'm playing with this recipe if needed :
http://www.languefrancaise.net/docs/Argot/Apaches
edit password : editer
Thank you !
Gilles.
---------------------------------------
| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com
---------------------------------------
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: http://www.pmichaud.com/pipermail/pmwiki-users-fr/attachments/20081016/388ee85c/attachment.html
Plus d'informations sur la liste de diffusion pmwiki-users-fr