> From: Chris Arnold
>
> Hello all! I am using Gallery2 which uses the smarty
engine. I have a
> gallery and a lightbox on this gallery. I have added
the class for the
> lightbox in the G2 template so the pic's load in a
lightbox; like so:
> [snip]
> The problem is that the pics load the header and footer
in the lightbox.
> I have asked this on the G2 forums and the replies were
to ask smarty
> people. You can see what i am talking about here:
> http://www.mytimewithgod.net/wp-gallery2.php?g2_itemId=
26
> and click on any pic. You will see that the lightbox
has the site header
> and footer in it. Thanks for any help.
Seeing as how no one has answered yet, I'll take a stab at
it. Maybe
someone more familiar with Gallery2 can give a better
answer.
That code below seems to be for the thumbnail listing
template. I don't
know much about Gallery2, but it looks like your problem is
this line:
<a href="{g->url params=$theme.pageUrl
arg1="itemId=`$child.id`"}"
class="lightwindow">
The URL resulting from that {g->url...} call is pointing
to a full page
rather than just the image. For example, for the first
thumb on that page
you get:
<a href="wp-gallery2.php?g2_itemId=27"
class="lightwindow"><img ...></a>
Your lightbox script is using that URL to pull the image.
If you try that
URL in a browser yourself, you see that you're getting a
full page. So
that's what appears in the lightbox. I think you want to be
getting the URL
to access the image itself. I just looked at the source on
the page at the
above URL, and found the URL to the image itself is:
photos/main.php?g2_view=core.DownloadItem&g2_itemId=27&a
mp;g2_serialNumber=1
So I guess you'll need to find the template that is used for
the individual
photo display page, and either modify your thumbnail listing
template or the
lightbox script.
--
Max Schwanekamp
NeptuneWebworks.com
541-517-9064
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|