Slideshow setup help

It might just be too late a night but I am not having any luck getting a slideshow to work.

OK I am trying to put a slideshow of size 400 x 300 on the index.php page. I have added `<?php printSlideShowJS() ?>` to the head area of the page and I have added the following to where I want the slideshow displayed `<?php printSlideShow(true,false,'','',400,300); ?>` but I get an error 'Invalid linking to the slideshow page' and could not find any documents on that error to find out what I did wrong.

The slideshow.php, css and the png files are in the themes folder. I am probably just calling it wrong, please guide me :)

Cheers

Comments

  • acrylian Administrator, Developer
    You should read the doc carefully. If you want to use it directly on index.php you need to pass the object of the album as the 3rd parameter.
    b) Calling directly via printSlideShow() function (jQuery mode recommended) Call printSlideShowJS() function in the head section of the theme page you want to use the slideshow on. Them place the printSlideShow() function where you want the slideshow to appear and set $albumobj and if needed $imageobj. The controls are disabled automatically.
    http://www.zenphoto.org/documentation/plugins/_plugins---slideshow.php.html#functionprintSlideShow

    You need to create that album object first of course.
    http://www.zenphoto.org/documentation/classes/Album.html#methodAlbum
  • gwmbox Member
    Ok, I must be a tad slow - any chance you can walk me through the steps, I have read the info but it does not make a lot of sense to me - maybe I am just being a bit slow today :(

    If I try and follow, probably incorrectly, the docs I get an 'Call to undefined function album()' error...

    I assume this is because I am trying to call it on a non-album/gallery page. It is an image.php page based on the page.php page from ZenPage
  • acrylian Administrator, Developer
    `
    $albumobj = new Album($_zp_gallery, "");
    $imageobj = newImage($albumobj, ""); // this is optional
    printSlideShow(true,false,$albumobj, $imageobj, 400,400); // if you don't need a start image replace $imageobj with ""
    `
  • gwmbox Member
    Thanks, this is VERY much appreciated :)
  • acrylian Administrator, Developer
    Btw, if you are on an standard image.php page the album object is of course already setup. Use the global $_zp_current_album then (also the current image is available from $_zp_current_image). See the article about global variables on our user guide.
  • I've been getting the same "Invalid linking" error as gwmbox. I have all the correct files in place and I've tried adding your code, but I'm still getting the same results. 2 questions:

    I'm on version 1.2.2 and I'm wondering if that is the problem?
    Do I need to set the `$_zp_gallery` variable or is that set in the framework of zenphoto?
  • acrylian Administrator, Developer
    1. Yes, you need 1.2.5
    2. If you are on a standard Zenphoto theme page that is normally set.
  • Okay, I've done all this and I can get the first image to display, but the slideshow is completely static (i.e., the first image just sits there and no other image gets displayed).

    I've added this to ``:
    `<?php printSlideShowJS(); ?>`

    And this is in the ``:
    `<?php $albumobj = new Album($_zp_gallery, "Featured.alb"); printSlideShow(true,false,$albumobj, "", 600,400); ?>`

    Error message is:
    TypeError: Result of expression '$(document).ready' [undefined] is not a function.

    What is wrong?
    Site here
    Running ZP 1.2.6_RC1 [4264] (Official Build)
  • acrylian Administrator, Developer
    Pllease try the official 1.2.6 release or even better a current nightly. We fixed something with the slideshow and dynamic albums recently but I do not remember correctly when right now. Note that this is theoretically possible and not been tried to my knowledge.
  • With 1.2.6 and the nightlies, I get the following error whenever I try to access an admin/back end page:

    Dangerously writable: [/<path>/zp-core/admin.php]
    FIXED


    When I reload the page it loads, but inevitably another page will give me the same error, and the front end never loads, with error:

    500 Server Error
    A misconfiguration on the server caused a hiccup. Check the server logs, fix the problem, then try again.
    URL: http://www.bnporter.com/


    What's up?
  • acrylian Administrator, Developer
    If I follow that link I get an "image object not found" error. That is because of a wrong file name in the url. Check also if the htaccess file is setup correctly.

    btw, nice site. You should submit to the showcase later..;-)
  • Thanks; hopefully when I'm done with it...

    So, once I got through all the "Dangerously writable" errors (it seems my server prefers 644 over 664), the site was back up and running as before, but I still haven't been successful with getting the slideshow to run - it's still just a static first image. Is this now considered a bug that needs more attention, or have you got a trick up your sleeve?
  • acrylian Administrator, Developer
    I will try to test that myself later today.
  • Hi there! Writing again to see what the status of showing a slideshow with a dynamic album is.

    Thanks
  • acrylian Administrator, Developer
    Have you tried the 1.2.9 release or a nighty? It should really work as with other albums, too.

    If with those version still an issue exists for you please open a ticket with the exact description what you are doing, which errors you exactly get and at best also a link to look at.
  • Yep, I'm up to date with 1.2.9. I'll open up a ticket.

    Here's the site: http://www.bnporter.com/

    To recap, I've got this code on index.php:

    `

    ...
    <?php printSlideShowJS(); ?>


    ...
    <?php $albumobj = new Album($_zp_gallery, "featured.alb"); printSlideShow(true,false,$albumobj, "", 600,400); ?>
    ...

    `
    and the featured.alb first picture loads with the caption Featured: 3499678547_a246d75cf5 (1/2), but remains static (i.e., doesn't function like a slideshow).

    Peace
Sign In or Register to comment.