![]() |
|
Total image views per album (incl. subalbums) - 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 image views per album (incl. subalbums) (/thread-3537.html) |
Total image views per album (incl. subalbums) - Idrownpuppies - 2008-08-22 Hi, I want to see on my index.php the total images views per album including subalbums. I've done it at the moment this way: in my image.php I have: So everytime the image is viewed it adds 1 to the image hitcounter and 1 to the albums hitcounter. Therefore with on index.php I get the total views of that album. The only problem with this workaround is, it doesn't work anymore if I work with subalbums. Is there a code that gives the total image views per album including subalbums? Like does it for the total number of images. I hope you understand my problem (well its not huge a problem though, I still enjoy my zenphoto very much), cheers, Total image views per album (incl. subalbums) - sterk - 2008-08-29 a feature i would like to see Total image views per album (incl. subalbums) - sbillard - 2008-08-29 Certainly something you could add if you want. Total image views per album (incl. subalbums) - sterk - 2008-08-31 and how can it be done? or is it already in zenphoto? Total image views per album (incl. subalbums) - acrylian - 2008-08-31 No, it isn't you would have to write a function yourself. Total image views per album (incl. subalbums) - sterk - 2008-08-31 time for me to learn some php or i can use Idrownpuppies way. only its not working for subalbums Total image views per album (incl. subalbums) - acrylian - 2008-08-31 you can pass a the id of an album or image directly to the hitcounter() function to get it for a specific album/image. If you know the ids of them all you can summarize them. There is of course a way to do that more convenient via the classes. Another way would be to use a db query to get them. But I currently don't have the time to try that. Total image views per album (incl. subalbums) - wittie - 2013-10-05 To display the total number of views of all images in the gallery Total image views per album (incl. subalbums) - acrylian - 2013-10-05 Or use the object model so unpublished and protected items and those from protected and unpublished albums are not counted. |