ZenphotoCMS Forum
(invisible) links to pictures before and after the actual album page - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: (invisible) links to pictures before and after the actual album page (/thread-9554.html)

Pages: 1 2 3


(invisible) links to pictures before and after the actual album page - Wete - 2012-01-31

Hi everybody!

I'd prefer to use Fancybox instead of image.php to show the single images of an album. It's no problem to change the image links in album.php, so that I have a nice slideshow in Fancybox, but the problem is, that with this approach I only have those images, which are shown on the actual album page. Fancybox should show all images of the album - like the original slideshow of ZenPhoto.
To solve this problem, I could place invisible links () before and after the image thumbnails that contain exactly the complement image links. The other solution would be to show ALL images of an album on one album page, what would be problematic for large albums.
There is the function $images = $album->getImages();, but is there another function which gives back "all images on previous album pages" and "all images on next album pages"?

Greetings!
Wete




(invisible) links to pictures before and after the actual album page - acrylian - 2012-01-31

To have any "box" script to show all images you have to invisibly generate a list of all the images you wish to show. This is how the Slideshow plugin in Colorbox mode does it.




(invisible) links to pictures before and after the actual album page - Wete - 2012-01-31

Yeah, this was exactly my question.

Now I only need the answer. (Images on previous pages, images on next pages ...)

;-)




(invisible) links to pictures before and after the actual album page - acrylian - 2012-01-31

Ahm, you answered yourself. Use the getImages() album class method to get all the images of the current album and then print them hidden via css for example.




(invisible) links to pictures before and after the actual album page - Wete - 2012-01-31

Example: The album contains 50 images, 12 thumbnails are shown on each page -> 5 pages. On Page 1 there are thumbnails 1-12, so I need the (invisible) links to image 13-50. On page 2 the thumbs 13-24 are displayed, so I need links to 1-12 and 25-50 and so on ... I wondered if there are functions for this task.

Wete




(invisible) links to pictures before and after the actual album page - acrylian - 2012-01-31

I don't understand. Do you want to show all images via a lightbox popup or not? If you don't need pagination, right? Again, if you use the method noted above with the right parameter set you get all images without pagination. Then print a invisible list of the links to the image and attach the gallery attributes fancy box (which I don't know) needs. Colorbox uses a del attribute for that.




(invisible) links to pictures before and after the actual album page - Wete - 2012-01-31

I'd like to have the normal album-pages (album.php). But when you klick on a thumbnail, $box (e.h. fancybox) should be open - not image.php. Therefore I need the invisible links additionaly to the thumbnails. And I'd like to have the usual pagination for the album.php, because I do not want to show more than x thumbs per page (e.g. 12).

Page 1: no invisible links / 12 thumbs / 38 inv. links
Page 2: 12 inv. links / 12 thumbs / 26 inv. links
Page 3: 24 inv. links / 12 thumbs / 14 inv. links
Page 4: 36 inv. links / 12 thumbs / 2 inv. links
Page 5: 48 inv. links / 2 thums / no inv. links

Wete




(invisible) links to pictures before and after the actual album page - acrylian - 2012-01-31

http://www.zenphoto.org/documentation/classes/Album.html#methodgetImages




(invisible) links to pictures before and after the actual album page - Wete - 2012-02-01

Aaaah, perfect!
So I only need values for "actual page" and "number of pages in this album". getGalleryPage( ) should help.

Thx!
Wete




(invisible) links to pictures before and after the actual album page - acrylian - 2012-02-01

Exactly, now you got it..;-)




(invisible) links to pictures before and after the actual album page - Wete - 2012-02-02

It works!




(invisible) links to pictures before and after the actual album page - Wete - 2012-02-02

Problem:
I now have a wonderful list of all images I need - but without path. I thought, this would work, but it does not. :-(

`

`
Wete




(invisible) links to pictures before and after the actual album page - Wete - 2012-02-02

VERY dirty workaround:

$albumurl = '/galerie/albums'.substr(getAlbumLinkURL(), 8);




(invisible) links to pictures before and after the actual album page - acrylian - 2012-02-02

Did you even look at our documentation, especially the object model tutorial?

$galleryobject = new Gallery(); $albumobject = new Album($galleryobject,$_GET['album']);
http://www.zenphoto.org/news/zenphotos-object-model-framework#global-object-variables

getUnprotectedImageURL($bilder[$i])
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetUnprotectedImageURL




(invisible) links to pictures before and after the actual album page - Wete - 2012-02-02

Hm, looks as I have to read and learn ... sigh




(invisible) links to pictures before and after the actual album page - acrylian - 2012-02-02

A little..;-)




(invisible) links to pictures before and after the actual album page - Wete - 2012-02-03

I learned!

`

`




(invisible) links to pictures before and after the actual album page - acrylian - 2012-02-03

Great..:-) Two notes: The gallery object is always available on theme scripts in $_zp_gallery. Additionally the current album object is available in $_zp_current_album if you are on album.php and image.php of a theme (also within the next_album loop).




(invisible) links to pictures before and after the actual album page - Wete - 2012-02-03

One additional question: Is it possible to use getIndex() within the next_image-loop to get a description like "Image 2/72" (72 is getNumImages() and works)?

Wete




(invisible) links to pictures before and after the actual album page - acrylian - 2012-02-03

Even easier. Just add a simple count to your loop.
Update: You have the number of the image already, why not just echo $i?