Hi all,
Just a lil' question :
When you use the printImageStatistic (option:popular ) for one image, does that increment the hitcounter of that image ?
thx
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.
`
Thanks a lot ;-)
Is it also possible to choose the orientation of the thumbnail ?
In place of vertical => horizontal ?
Oh :O
I didn't understand what you mean, sorry.
Can you explain it please ?
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 ;-)
Are you sure ?
I see this echo "nn"; in zp-core/image_album_statistics.php
`/**
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 "nn";
echo "[list]";
foreach ($images as $image) {
echo "[*]getImageLink() . "\" title=\"" . htmlspecialchars($image->getTitle(), ENT_QUOTES) . "\">n";
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 "[/list]n";
}`
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.
No problem ;-)
You do great job !
Thanks for everything !
[i] 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.
[/i]
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.