Calling the image directly involves certainly no Zenphoto script so there is no "easy" way (which you probably have in mind): You could:
In any case this will require some work and knowledge by you and getting familiar with some Zenphoto internals. You should read the theming tutorial for the basics first.
Thanks for the fast answer!
The first variant would be to call a page with the embedded image in the fancybox I assume. So the fancybox needs to open a page instead of a picture... Not sure if it does support page viewing.
The second jQuery might be to difficult for me as I am not to familiar with jQuery. Do you have a hint where to start in the code? Maybe here: $(document).ready(function()?
Is there a way to do this with the colorbox plugin or does this have the same impact on the hitcount? Does colorbox support page viewing?
All the "box" popup image scripts work the same way. So for Colorbox it is the same. I can at least say that calling a page is possible with the Colorbox.(not familiar with Fancybox but probably it can do that as well).
Quote:The first variant would be to call a page with the embedded image in the fancybox I assume.
No, actually I am talking about a custom theme page (see the theming tutorialI) you will have to pass the album a nd image name and call the image on. It is not that complicated but not that easy if you are not familar with such things generally and Zenphoto specifically.
acrylian, you wrote:
Quote:Calling the image directly involves certainly no Zenphoto script
How about $imageobject->getFullImage() which returns the URL of the image?
I think, it would be possible to add/modify the function getFullImage() so that the counter is considered. But of course this would mean to modify core files!
And the counter would add up every time the album is viewed, not the very image. It's inelegant.
Fancybox does support opening html pages instead of pictures, but I think, this is also very inelegant.
Wete
The method you cite just gives you the url to the full image. As said, to use the hitcounter the image must be on a theme page that is called or you have to use js/ajax on opening the "box" script. A direclty called images is just an image.
The best and easiest is to use a "custom theme page" for this. What that is is explained on the theming tutorial. You should also get familiar with the object model as you will need that to create the image object on that custom page.
I guess we should also point out that the Zenphoto hit counters all are associated with [b]pages[/b] not specific content that might be on that page. So there is a hitcounter for the image.php page that displays your image like there is a hitcounter for the album page that displays the album but not for sub-pages of the album.
If you want to count hits for when the image is viewed via a "box" script you will have to incorporate that into how the box script displays the image. Presumably that means having a script that causes the display and also counts the hit. Or at least a script for counting the hit that can be ajaxed from the box handler when it displays the image. Both are possible, but do require implementation.
I am thinking at the moment of some approaches to increment the hitcounter. But for this I need to know how the increment of the image hitcounter is called in the "normal way".
Can you tell me, how the function call of the image counter increment is called? After studying the different image.php examples I am not sure where to look.
I assume it is in the zp_apply_filter(), but have not found that function yet...
I was going to ask the same questions here but acrylian and sbillard fully covered me. Thnx a lot!
Thank you guys, I think to understand the solution.
When I have time, I will implement a custom page with arrows, which will be loaded in a box frame. That gives the user a similar feeling like having the box frame and I can use all the nice built in gimmicks from zenphoto.
Thanks again!