Member
Member
ZenTryOuter   27-05-2008, 21:52
#1

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

Member
Member
sbillard   27-05-2008, 23:38
#2

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.

Member
Member
ZenTryOuter   28-05-2008, 09:11
#3

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.

`

Administrator
Administrator
acrylian   28-05-2008, 09:29
#4

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 `

Member
Member
ZenTryOuter   28-05-2008, 18:54
#5

Thanks a lot ;-)

Is it also possible to choose the orientation of the thumbnail ?
In place of vertical => horizontal ?

Administrator
Administrator
acrylian   28-05-2008, 20:10
#6

Yes, with CSS. There is an CSS id attached to the list with the same name as the option ("popular" in this case) you can use.

Member
Member
ZenTryOuter   28-05-2008, 20:34
#7

Oh :O
I didn't understand what you mean, sorry.
Can you explain it please ?

Administrator
Administrator
acrylian   28-05-2008, 20:42
#8

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.

Member
Member
ZenTryOuter   28-05-2008, 20:52
#9

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 ;-)

Administrator
Administrator
acrylian   28-05-2008, 20:54
#10

Actually the function generates a (....), not a .

Member
Member
ZenTryOuter   28-05-2008, 20:59
#11

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";

}`

Administrator
Administrator
acrylian   29-05-2008, 07:53
#12

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.

Member
Member
ZenTryOuter   29-05-2008, 16:58
#13

No problem ;-)
You do great job !
Thanks for everything !

Member
Member
Barbara   01-06-2008, 10:07
#14

[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')

Administrator
Administrator
acrylian   01-06-2008, 11:04
#15

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)").

Member
Member
Barbara   01-06-2008, 12:35
#16

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.

Administrator
Administrator
acrylian   01-06-2008, 12:55
#17

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.

Member
Member
Barbara   01-06-2008, 13:06
#18

Thanks a lot acrylian!

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