Slideshow and hitcounter

Further to the use of the slideshow, I noticed that the hitcounter didn't work with the plugin.

I thus implemented him(it) in the plugin. If it you want , you will find modified file on this url:
http://www.titou.biz/slideshow-hitcounter.zip.

I have simply create a file " slideshow-counter.php " on "plugins/slideshow" which allows to make "update" in base, and modify the file "plugins/slideshow" (1.0.6.5) to add ajax function ($.get()).

So now, my hitcounter is working with the slideshow.
It would be a great idea to add this function on the next version of zenphoto !
(maybe with a better implementation.... ;-) )

All modification on slideshow.php begin by comment:
//start antoine -

The function works just for jquery !

Comments

  • acrylian Administrator, Developer
    Good idea, seems to makes sense to have a hitcounter on the slideshow indeed. jQuery is our default js lib so that is just fitting. We will take a look. Thanks.
  • very good hack !
    I just find it and try it, and it works well !
    It will be a good idea to integrate it on next version !
    good job titou !
  • def, worth putting into the default code, good idea.
  • Hello,
    I am having an issue with the slideshow. I have a gallery with 94 albums. The picture size for each image is 800 x 600. I have pre-cached the images. The first 90 plus albums worked just fine and individual "sets" of images work, but the last new albums I have added won't display the slideshow. I didn't change any settings. When I select view slideshow it takes a long time to load and then I receive a "fatal error" message (functions db.php )and Search: undefined (NaN/0). I am using jsquery and I have mod rewrite selected. And as I said the majority of the albums will display the slideshow.
    This plugin is a very important part of my gallery. Any suggestions would be much appreciated.
    Thank-you!
  • acrylian Administrator, Developer
    The slideshow needs to generate cached images before it can display them like Zenphoto does for thumbs and sized images. If you have quite big images dimensionwise the slideshow does not catch up with that generation and mitght run out of images.
  • The 2 albums I have just added have between 11 and 14 images each. Each image is 800 x 600 pixels.

    They have been cached through the admin panel. The slideshow for the albums that will display are similar.

    I'm not quite sure what you mean that the slideshow might run out of images.

    Does that mean that the slideshow for the new albums and future albums may not function?

    Thank-you!
  • acrylian Administrator, Developer
    The slideshow might use a different size of images that the sized image on the image page therefore those slideshow images need to be cached as well. Best you run throught the slideshow once to be sure they are. I am of course assuming you are using the latest Zenphoto since you did not mention that.
  • Hello again,

    I am using version 1.2.6 [4335](Official Build).

    I ran the complete slideshow (1086 images) and they all loaded. The image size for the slides is 800 x 600 pixels. I have narrowed the problem down to 1 slideshow function. This error ONLY occurs with the last two albums I have created.

    The slideshow will run from the home page gallery or if I select a specific page number containing one of the two albums, but if I specifically "search for" either album and go to the image gallery for that album the slideshow will not run and I get the following errors.

    Maximum execution time of 30 seconds exceeded in on line

    Fatal Errors:

    lib-utf8 or functions-basic.php and class-album.php

    I tried running the slideshow while logged in to admin and logged out. Same results.

    Does it have anything to do with "Cache Control" or "Pragma" selections?

    Thank-you for your time!
  • Version 1.2.6 is ancient history (from a software evolution view.) I know that there have been changes to the slideshow since then. I do not know if they would have impact on what you are seeing, but I suggest you try the current release. Certainly if there is a problem with the scripts they will be fixed only against the current release.
  • Thank-you for your reply. I was concerned about upgrading to the new version because I didn't want to loose any data. When I upgraded the first time, I only had test data in the database. I have backed up my files.

    Are there usually any issues with an upgrade harming the databases used with the previous version?

    Thank-you!
  • There are generally no problems, but backups are always a good idea.
  • Will the upgrade void all my settings in the current version?
    Thank-you!
  • Hello,

    I have reviewed all the pages of my gallery and tested the slideshow function. It seems that ALL the albums will NOT display the images for the slideshow when I try to "view slideshow" directly from the albums (galley page). Ex: /mysite/testpage/. I noticed on the pages that the slideshow DOES function the following line IS included in the slideshow form.:

    ``

    This line is missing in the form on the pages that the slideshow will not function.

    I am using version 1.2.6 for now.

    I thought if I added this line to the form for that page it may make a difference, but I don't know where to find the form to edit it. Could you let me know if I am on the right track?

    Thank-you again for your time!
  • acrylian Administrator, Developer
    The slideshow is called via a form POST. You really should try 1.2.8....
  • MarS Member
    I don't know whether I should start a new thread, but I'd like to respond to the thread starter. I tried his changes, but they didn't work (the whole slideshow stops working). The slideshow plugin that comes with Zenphoto also doesn't increase the hits.

    How can I achieve this? More important than Zenphoto's counters would be that the slideshow "calls" Piwik (http://piwik.org/). Piwik works well an all other pages of my gallery.
  • acrylian Administrator, Developer
    The slideshow is pure JS using the jQuery plugin Cycle. This there is no page loaded on change and the hitcounter not called. You will have to modify the plugin itself to achieve this using ajax calls.

    I am not familiar with Piwik but I think it uses JS to call as well. So you will have to incorporate that as and probably rebind it after the slideshow change. This of course requires to make a custom slideshow plugin as well.
Sign In or Register to comment.