![]() |
|
total number of images - 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: total number of images (/thread-2290.html) Pages:
1
2
|
total number of images - gregluk - 27-02-2008 Hi to all.
Any help??? Thanks in advance total number of images - acrylian - 27-02-2008 Try getNumImages() instead of getTotalImagesIn(). total number of images - gregluk - 27-02-2008 alredy tried. It seems wherever I insert getNumImages() or getTotalImagesIn() functions in the index.php page it simply block the page. total number of images - acrylian - 27-02-2008 You need to place getNumImage() within the albums loop that starts with `` since it returns only the images of one album. getTotalimages instead returns the number of images in an album and all of it's subalbums. If you mean the total number of all images in all albums? There is no function for that if I recall correctly. Use something like this: Probably worth considering a standard function for that. total number of images - jsumners - 27-02-2008 From class-gallery.php: ` 224 /** 225 Returns the number of images from a database SELECT count() 226 * Ideally one should call garbageCollect() before to make sure the database is current. 227 * @return int 228 */ 229 function getNumImages() { 230 $result = query_single_row("SELECT count(*) FROM ".prefix('images')); 231 return array_shift($result); 232 } ` total number of images - acrylian - 27-02-2008 Oh, right, there it is... To make it complete, gregluk, use it this way `` total number of images - gregluk - 27-02-2008 Thanks a lot. Now i'll give a try to your tips. Indeed i'm looking for a function that returns total numbers of images in the whole gallery, as shown in the gallery stats on the admin page. There it works, i hoped there was something similare for the templates. Thanks a lot and please excuse my english, I'm from Italy total number of images - selim - 17-03-2008 also you can use for total images in sub albums. total number of images - MelodyNelson - 05-06-2008 hi, I'm looking for a function like getNumImages() but I would like to exclude images from unpublished albums, is it possible ? in my template, I use this code [code] [/code] I have a lot of unpublished albums (images and docs used in a CMS, files are shared between the CMS and ZP). Around 60% of images are in unpublished albums (± 2500 images) thanks ps: sorry for my english, I'm french total number of images - acrylian - 05-06-2008 I haven't tried yet, but if you are logged in there are no "unpublished" albums/images. The admin sees them all. Actually total number of images - MelodyNelson - 05-06-2008 thanks acrylian I've tried but the count is the same with total number of images - macalter - 05-06-2008 gregluk: WOW Love the site even if I can't read the words What PHP function did you use to add "subtitles" to the thumbnails (album.php page)? total number of images - acrylian - 05-06-2008 What is the number of images you have? I see a count of 4816 . total number of images - MelodyNelson - 05-06-2008 1813 images in 18 published albums ... and 4816 in all abums total number of images - acrylian - 05-06-2008 Ok, we found out that this function does indeed not care about published or not. We will have a fix in one of the next nigthlies. total number of images - MelodyNelson - 05-06-2008 ok thanks, I'll check it... and thanks for zenphoto, really nice "tool"... I could manage to include albums and recent images in other pages from my website (powered by Plume CMS)
total number of images - sbillard - 05-06-2008 Tonight's nightly build will allow you to pass a parameter total number of images - gregluk - 06-06-2008 Please "pardonnez moi" OT.. total number of images - MelodyNelson - 06-06-2008 hi, I've updated my ZP install with the latest nighly version (5/06) and tried Gallery (http://www.bilin-village.org/photos/) :
Admin Tool (Gallery Stats)
total number of images - acrylian - 06-06-2008 It's working for me with the latest svn 1679, please try tonight's nightly again. |