Member
Member
AlkaSeltxer   2009-05-29, 02:26
#1

I'm trying to get lightbox working, I've searched these forums and google and could not find an answer that works.

In the image.php file I've added:
`

Administrator
Administrator
acrylian   2009-05-29, 08:32
#2

You should update to the latest version which is currently 1.2.5 RC2. (The Thinkdreams theme also is not supported at all). Zenphoto's current default js libary is jQuery (1.2.6) that may cause conflicts with other libaries like prototype.

The general issue may be that you set full images with protection. These lightbox scripts generally need the unprotected images.

Member
Member
AlkaSeltxer   2009-05-29, 12:28
#3

Aw well hell. Thanks.

Member
Member
slyt   2009-07-29, 14:41
#4

Is it possible to add Lightbox v2.04 to Default Theme ? If yes can anyone write short how-to ?

Regards,

Administrator
Administrator
acrylian   2009-07-29, 15:20
#5

jQuery is the Zenphoto default javascript libary, so since Lightbox is based on other JavaScript framework there may be conflicts. Tgere is also a Jquery Lightbox variant. Also we have a similar solution named Thickbox already on board.

The the how-to is decribed on the lightbox page. Of course you will need to get familiar with Zenphoto themes in general by reading our theming tutorial for example as you will have to change your theme.

Member
Member
slyt   2009-07-30, 19:44
#6

OK. Thickbox is already on board but it opens (in default theme) only EXIF infos, not full-size picture (which is opened on blank raw page). Besides Lightbox2 or jQuery lightBox looks much better.
I am not programmer and it is a little bit troublesome to study all Theming Tutorial and Function Tutorial to add that feature.

Member
Member
slyt   2009-07-30, 19:57
#7

I try to add jQuery lightBox to default theme. Therefore I add these three lines to image.php:

Member
Member
stef404   2009-07-31, 05:23
#8

I fiddled many hours with the Lightview integration and finally got it, so I'm trying to give you some hints
First of all you should decide on which page you would like to have the effect. For myself the album page was the best choice. In this case you should modify the album.php of the default theme. Insert your Lightbox code AFTER the call of zenJavascript in line 5 (regarding to ZP 1.2.6 RC1 code).
To prevent any mistakes with notation I worked with absolute pathes at first.
Finally you should change line 43 "getImageLinkURL()" into "getFullImageURL()" as
AlkaSeltxer mentioned in the intitial post.
Good luck

Member
Member
slyt   2009-07-31, 05:59
#9

I choose lightBox due to Acrylian recommendation because of potential conflict between jQuery and Prototype. In my case edit image.php was conscious choice - I want lightbox effect after click on resized picture not thumbnail. I added above lines after the call of zenJavascript (I use ZP 1.2.6 RC1 ). Now I have to include in the file function calling lightBox plugin and maybe do some modifications of 'The image' section, but I have no idea what form. I did some tests studying lightBox example file but no success.

Member
Member
stef404   2009-07-31, 06:29
#10

I can only guess, but finally you need a customised link to the full image, adding the rel="lightbox" attribute between href and title in line 50 of image.php.
Sorry, but I have no chance to test or simulate your constellation.

Member
Member
slyt   2009-07-31, 06:48
#11

Almost done . Thx stef404 for your advice.

Changes in header image.php:
`

Member
Member
stef404   2009-07-31, 07:09
#12

There's no next image to show, unless you tell lightbox that you want to display a set of images
You could try adding this one rel="lightbox[]".
But I'm not sure if this will work.
In my opinion next image does not make a sense when you call the function from a single image page.

Member
Member
slyt   2009-07-31, 19:00
#13

Something is still wrong. I've just applied lightBox to album.php and there is not images "next" "prev". Besides trick with rel doesnt work this time.

Member
Member
slyt   2009-08-02, 09:31
#14

For now I give up. It is not working as I expected. Anyway I'll try to fix it (I need to run an experimental enviroment on my NAS) in the spare time.
If anyone wants to use modified files - it can downloaded from http://photos.troyniak.com/default.7z. Feel free to visit my photo gallery under http://photos.troyniak.com .

Regards,

Administrator
Administrator
acrylian   2009-08-02, 10:15
#15

The only way to get next/prev is to use the lightbox script on album.php as an replacement of the bigger image on the image.php page to show the full size image directly.

EDIT: Forgot you already tried that...

Member
Member
slyt   2009-08-02, 18:21
#16

Previously I didnt enunciate. Except lack of "next" and "prev" images there is no rest of required images like "close" etc. It would suggest that path to images is wrong ...

Member
Member
slyt   2009-08-04, 15:53
#17

I changed image path in jquery.lightbox-0.5.js to http://my_site/path_to_images and images appeared BUT only in IE (!!), FF 3.5.1 doesnt show it at all.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.