Hitcounter is a new capability in the SVN/Nightly builds. It may still be undergoing refinements in its implementation.
The proper use of this function is to place it in the theme when you want hitcounts. It is not there by default because it adds overhead. At present you have to put a call to hitcounter in your album.php and image.php files if you want hitcounts.
The useage of hitcounter is:
hitcounter("image"); for image.php and hitcounter("album"); for album.php. If you wish to show the hitcounter then use echo hitcounter($option");
There is an api that both increments and returns the hitcounter. None that just retrieves it. The function is hitcounter($what) where $what is image or alubm. Increments and returns the hitcounter for the currene image or ablum.
Your theme needs to include this function if you want a page to be counted.
Acrylian,
Yes, I know of those, but I want to build a slightly different version that outputs the hitnumber for each of those images/albums. Don't you think hitcounter should have a neutral getter that doesn't also increment it, something in the image and album classes ?
Sorry, just noticed that I got you wrong. You are right, we should do that for the next version.
Its not that big problem to modify the getImage/AlbumStatisitc functions to put out the hitcounter when printing the popular images/albums, since we already do a query we could easily expand that.
Yes, it is in the nightly builds. There is a 'viewonly' parameter to hitCounter. However, I don't think that will do what you want, the function works only on the current album. It could be extended to also have a parameter which is the id of the album/image you wish to get the hitcount of.