Pages (3): 1 2 3   
Member
Member
Wete   31-01-2012, 09:18
#1

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

Administrator
Administrator
acrylian   31-01-2012, 11:36
#2

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.

Member
Member
Wete   31-01-2012, 14:17
#3

Yeah, this was exactly my question.

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

;-)

Administrator
Administrator
acrylian   31-01-2012, 16:50
#4

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.

Member
Member
Wete   31-01-2012, 17:34
#5

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

Administrator
Administrator
acrylian   31-01-2012, 18:19
#6

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.

Member
Member
Wete   31-01-2012, 18:40
#7

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

Administrator
Member
Member
Wete   01-02-2012, 07:44
#9

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

Thx!
Wete

Administrator
Administrator
acrylian   01-02-2012, 10:37
#10

Exactly, now you got it..;-)

Member
Member
Wete   02-02-2012, 12:37
#11

It works!

Member
Member
Wete   02-02-2012, 16:54
#12

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

Member
Member
Wete   02-02-2012, 17:28
#13

VERY dirty workaround:

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

Administrator
Administrator
acrylian   02-02-2012, 17:37
#14

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

Member
Member
Wete   02-02-2012, 17:49
#15

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

Administrator
Administrator
acrylian   02-02-2012, 17:53
#16

A little..;-)

Member
Member
Wete   03-02-2012, 14:37
#17

I learned!

`

`

Administrator
Administrator
acrylian   03-02-2012, 15:18
#18

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).

Member
Member
Wete   03-02-2012, 15:37
#19

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

Administrator
Administrator
acrylian   03-02-2012, 15:38
#20

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

Pages (3): 1 2 3   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.