BenjaminLinder wrote:
Hi,
I saw Lightbox ( http://www.lokeshdhakar.com/projects/lightbox2/ ) is used
on http://rollerweblogger.org/
but it doesn't work for me...
Where do I have to copy the lightbox.js , lightbox.css , etc. at my
tomcat/webapps/roller ? And how do I define this path in my header? Or do I
have to enable javascript on my page or something? On my 2nd page (built
with Liferay) lightbox works fine...

I use lightbox, here is how I set it up. I think the key to getting it working was using absolute paths. IIRC I had to edit some of the lightbox css and script to use absolute paths too.

In _decorator (my custom theme is based on quite an old theme, so you may need to edit the WebLog theme instead), I have the following:

   #includeTemplate($model.weblog "_css")
<link rel="stylesheet" type="text/css" href="/lightbox/css/lightbox.css" media="screen" />

Then in each blog post that uses lightbox, I include the scripts. This could be done in the decorator/WebLog template, but putting them in each post saves loading the scripts for pages that don't use them. In my case, I use summaries for the blog posts that use lightbox, so only the individual blog post pages need to include the scripts:

   <script src="/lightbox/js/prototype.js" type="text/javascript"></script>
<script src="/lightbox/js/scriptaculous.js?load=effects" type="text/javascript"></script>
   <script src="/lightbox/js/lightbox.js" type="text/javascript"></script>


I also have an xsl stylesheet to convert a Picasa XML export into a lightbox enabled blog post if you're interested. I've uploaded it to:

  http://home.jasonrumney.net/picasa-import.xsl

Reply via email to