[pmwiki-users] Lightbox 2 question

DaveG pmwiki at solidgone.com
Sun Mar 29 15:33:27 CDT 2009



Jan Erik Moström wrote:
> On 09-03-29 at 18.03, pmwiki at solidgone.com (DaveG) wrote:
> 
>> I usually set a global js variable to the wiki farm path in the page
>> header. That way I can reference it from within js functions.
> 
> Unfortunately I don't know enough javascript so I would be able to write 
> some code to setting the properties in the lightbox code.
Need to backtrack here. Lightbox2 uses relative paths to find it's 
images. By default Lightbox2 has three subdirectories all at the same 
level: css, images, js

Because the files in the directories need to be publicly available, I'd 
put them under /pub/lightbox2/ -- so you'd have three subdirectories 
under /lightbox2.

Then in config.php do something like:
$HTMLHeaderFmt['lightbox2'] = "
<script type='text/javascript' 
src='$PubDirUrl/lightbox2/js/prototype.js'></script>
<script type='text/javascript' 
src='$PubDirUrl/lightbox2/js/scriptaculous.js?load=effects,builder'></script>
<script type='text/javascript' 
src='$PubDirUrl/lightbox2/js/lightbox.js'></script>
<link rel='stylesheet' href='$PubDirUrl/lightbox2/css/lightbox.css' 
type='text/css' media='screen' />
";

  ~ ~ Dave




More information about the pmwiki-users mailing list