Anybody integrated Lytebox in a theme?

TomR

Joined: 2007-08-08
Posts: 1
Posted: Mon, 2007-09-03 19:57

Has anybody already integrated Lytebox ( not Lightbox ) in a theme. I now use MatrixLightBox but want to use Lytebox instead.

It has autoresize posibilities and a slideshow viewer.

Tom

 
Rostyslav
Rostyslav's picture

Joined: 2006-10-22
Posts: 22
Posted: Thu, 2007-11-22 11:17

<a href="{$linkUrl}" class="giMissingThumbnail" rel="lyteshow[gallery]">

 
Leonhartsberger

Joined: 2007-11-25
Posts: 1
Posted: Mon, 2007-11-26 00:06

Hi!

I'm trying to integrate Lytebox also.

However, it stays always loading. I can't make it load the image.
I'm using Matrix template and the code in matrx/templates/album.tpl is:

<div>
{if isset($theme.params.$frameType) && isset($child.thumbnail)}
{g->container type="imageframe.ImageFrame" frame=$theme.params.$frameType
width=$child.thumbnail.width height=$child.thumbnail.height}
<a href="{$linkUrl}" rel="lytebox[gallery]">
{g->image id="%ID%" item=$child image=$child.thumbnail
class="%CLASS% giThumbnail" rel="lytebox[gallery]"}
</a>
{/g->container}
{elseif isset($child.thumbnail)}
<a href="{$linkUrl}" rel="lytebox[gallery]">
{g->image item=$child image=$child.thumbnail class="giThumbnail" rel="lyteshow[gallery]"}
</a>
{else}
<a href="{$linkUrl}" class="giMissingThumbnail" rel="lytebox[gallery]">
{g->text text="no thumbnail"}
</a>
{/if}
</div>

At theme.tpl I inserted at the <head> tag:
<script type="text/javascript" language="javascript" src="{g->theme url='lytebox.js'}"></script>
<link rel="stylesheet" href="{g->theme url='lytebox.css'}" type="text/css" media="screen" />

Any ideas of what possibily is wrong?
Thank you

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Tue, 2007-12-04 23:24

Lytebox is probably wanting just a picture not a HTML page as the link. So you need to change the links to look like this.

<a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$child.id`"}" rel="lytebox[gallery]">

However if someone comes along with Javascript disabled all they will get when they click the link is the picture.