Member
Member
kagutsuchi   2009-09-19, 01:26
#1

So I seem to be having a problem getting a number of all the images in the entire gallery. First I tried using getTotalImagesIn($_zp_gallery) and it gave the error:

Fatal error: Call to undefined method Gallery::getSubalbums() in /home/web29205/domains/archlinuxgallery.com/public_html/zenphoto/zp-core/template-functions.php on line 1712

Then I tried to use getNumImages($_zp_gallery) and it gives this error:

Fatal error: Call to a member function isDynamic() on a non-object in /home/web29205/domains/archlinuxgallery.com/public_html/zenphoto/zp-core/template-functions.php on line 1691

Am I doing something wrong and is there any easier way to do this?

Thanks,
kagutsuchi

EDIT: Never mind, I used the getNumImages() from the Gallery class and that worked perfectly!

Member
Member
lestat832   2010-06-24, 03:40
#2

Hi,

I am also seeing this error message when I updated versions. Could you please elaborate on how you resolved the issue with getNumImages()?

Thanks,
Marc

Administrator
Administrator
acrylian   2010-06-24, 06:53
#3

Use the gallery object $_zp_gallery->getNumImages(). See also the object model tutorial about that.

Member
Member
lestat832   2010-06-26, 00:20
#4

Hi,

Sorry but I'm a real noob.

I checked out the tutorial at http://www.zenphoto.org/2010/02/zenphotos-object-model-framework/. However, I'm not sure what I need to do. Do I need to go to the theme file editor and update the code? If so, which code am I replacing and if so, what code am I replacing it with.

Are there any step-by-step instructions?

Thanks!

Administrator
Administrator
acrylian   2010-06-26, 08:41
#5

I can't answer this, you have to edit there where your error occurs. Where that is I can't answer because you provide no info about anyhting. Probably you are using an outdated third party theme.

Member
Member
kagutsuchi   2010-06-26, 21:18
#6

Btw, I did use what acrylian posted above.

Member
Member
lestat832   2010-06-28, 02:02
#7

Ok...you can see the error message here:
http://www.marilynandmarc.com/miami09/index.php?album=Oscar

The error says:
Fatal error: Call to undefined method Album::getSubalbums() in /home5/marilyn4/public_html/miami09/zp-core/template-functions.php on line 484

In addition, if I go to the Themes tab, I see:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home5/marilyn4/public_html/miami09/zp-core/admin-functions.php on line 2391

I'm assuming I have to change one of the files in the Theme File Editor...I just have problems trying to pinpoint the actual line where the problem occurs.

I hope this helps in providing more info about the problem.

album.php
404.php
archive.php
image.php
index.php
search.php
slideshow.php
contact.php
theme_description.php
themeoptions.php
register.php
password.php
Style sheets (.css)
slideshow.css
zen.css

Member
Member
lestat832   2010-06-28, 02:03
#8

Oh...one thing I did want to add is I saw these error messages AFTER updating to the most recent version of Zenphoto.

Administrator
Administrator
acrylian   2010-06-28, 08:13
#9

The getSubAlbums() method is deprecated. You have apparently not updated correctly as that method has been replaced with getAlbums() method on that line in template-function.php. Please do a reinstall.

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