The hitcounter is only incremented when the `hitcounter()` function is called and it is not the admin viewing the page that calls it. `printImageStatistics` does not call the function.
Oh , ok then. Thanks for replying ;-) But now I have another question : If I print out the most popular images, how can i get also the amount of viewing ? I want in fact to have the 5 most popular images of all the albums and then just under the amount of views of each images.
Sorry, there is currently no option to get the actual hitcount together with the most popular functions. But it seems to make sense, I will add that the next days to the nightly.
(BTW, it must be `<?php printImageStatistic ( 5, "popular" ) ?> <?php hitcounter (" image," true>`)
The function for popular images generates a unordered html list that you can style via CSS to be horizontal. There is a CSS id attached named "popular" you can use to do that.
Ok ;-) Now, I get it. The function make a DIV with ID popular. So I Can make myself a CSS for that or integrate it in my default CSS. I will do it. Thanks for everything ;-)
Sorry, you are right, it's an div in the 1.1.6 release, I confused it with the nightly that I as you might guess work mostly with and there it's been changed to a unordered list, because it's more semantic to do that since there are new options for title, description and date.
EDIT: You are more that right, I really confused something (too much functions). It's of course surrounded by a DIV...I am sorry for confusion.
Sorry, there is currently no option to get the actual hitcount together with the most popular functions. But it seems to make sense, I will add that the next days to the nightly.
Just out of curiosity, is this function implemented in the latest nightly build yet? I'm quite interested in this functionality too (only, I need it with 'latest')
Yes, the option to show the hitcount is in the nightly, but only for the "popular" option since that is where the hitcounter is directly related to. Does the hitcount makes sense with the latest??
Anyway, additionally you can there are now option to show rating and votes with "mostrated" ("votes (rating)") and "toprated" ("rating (votes)").
I think yes. I frequently update my gallery, the image count could help giving an idea of what's new (newer > less views, older > more views) Or, for example, if I choose to display the latest 10 pics I could immediately tell by the hit count which item is 'hot' inside the album.
But for that we actually have the "popular" images/albums function...:-) But well, it's not a big deal to add that. I will change the last parameter ($showstatistic) so that you can choose it for all options. I will add this the next days.
Comments
But now I have another question :
If I print out the most popular images, how can i get also the amount of viewing ?
I want in fact to have the 5 most popular images of all the albums and then just under the amount of views of each images.
`<?php printImageStatistic ( 5, popular ) ?>`
`<?php hitcounter ( image, true, $id=????? ?>`
something like this ?
(BTW, it must be `<?php printImageStatistic ( 5, "popular" ) ?> <?php hitcounter (" image," true>`)
Is it also possible to choose the orientation of the thumbnail ?
In place of vertical => horizontal ?
I didn't understand what you mean, sorry.
Can you explain it please ?
Now, I get it. The function make a DIV with ID popular.
So I Can make myself a CSS for that or integrate it in my default CSS.
I will do it.
Thanks for everything ;-)
(....)
`, not a <div></div>.I see this `echo "n
`/**
* Prints image statistic according to $option as an unordered HTML list
* A css class is attached by default named accordingly'$option'
*
* @param string $number the number of albums to get
* @param string $option "popular" for the most popular images,
* "latest" for the latest uploaded,
* "latest" for the latest uploaded,
* "mostrated" for the most voted,
* "toprated" for the best voted
* @param string $album title of an specific album
* @return string
*/
function printImageStatistic($number, $option, $album='', $showtitle=false, $showdate=false, $showdesc=false, $desclength=40) {
$images = getImageStatistic($number, $option, $album);
echo "n
echo "
";- getImageLink() . "\" title=\"" . htmlspecialchars($image->getTitle(), ENT_QUOTES) . "\">n";
foreach ($images as $image) {
echo "
echo "getThumb() . "\" alt=\"" . htmlspecialchars($image->getTitle(),ENT_QUOTES) . "\" />n";
if($showtitle) {
echo "
name)."\" title=\"" . $image->getTitle() . "\">n";
";echo $image->getTitle()."n";
}
echo "
if($showdate) {
echo "
". zpFormattedDate(getOption('date_format'),strtotime($image->getDateTime()))."
";}
if($showdesc) {
echo "
".my_truncate_string($image->getDesc(), $desclength)."
";}
}
echo "
echo "
}`
unordered list, because it's more semantic to do that since there are new options for title, description and date.
EDIT: You are more that right, I really confused something (too much functions). It's of course surrounded by a DIV...I am sorry for confusion.
You do great job !
Thanks for everything !
Just out of curiosity, is this function implemented in the latest nightly build yet?
I'm quite interested in this functionality too (only, I need it with 'latest')
Anyway, additionally you can there are now option to show rating and votes with "mostrated" ("votes (rating)") and "toprated" ("rating (votes)").
Or, for example, if I choose to display the latest 10 pics I could immediately tell by the hit count which item is 'hot' inside the album.