Member
Member
ncs   2011-08-20, 13:59
#1

Hello, I build a homepage with a slide show using the Galleriffic script. I succeed with this code:

`

[*]
class="thumb" href="" title="">

but I'd like to use a more proper way instead ofgetImageStatistic` as:

$albumobj = new Album($_zp_gallery, "home"); $images = $albumobj->getImages(); foreach ($images as $image) ...
but in this one looks like I'm doing something wrong in the second line. So how do I call the images?
Thanks

Administrator
Administrator
acrylian   2011-08-20, 15:29
#2

The code you used is the right way to call the images of an album named "home" via the object model. Of course that album has to exist.

What is wrong with using the getImageStatistics function? That is meant for these things as the object model has no functions to sort by popular at all.

Member
Member
ncs   2011-08-21, 13:57
#3

yeah, thank you for pointing it out, 'home' is an existent album of course.
That said, it's not really wrong, but I don't need any special sort order (random, popular or whatever) and I'd like instead to show all the pics in the album. Moreover I'm trying to improve my code learning, so I was looking for a more 'right' way.
Now, since getImageStatistic is working I can live with that (actually I didn't understand by your comment if the second way is ok or not).

Administrator
Administrator
acrylian   2011-08-21, 14:22
#4

Using the object model is the right way to get/show images from an album if outside the normal album/image context. I just tried to point out that it just gets the images on the normal sort order and also paginated if you don't set the parameter to getImages() accordingly.

You did not exactly point out what your problem was.

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