zenphoto forums » Plugins

Slideshow not showing up

(11 posts)
  1. kocho

    Senior
    Joined: May '11
    Posts: 64

    Hi guys,

    I'm trying to enable the slideshow in my gallery.

    I have added this in the <head>:
    <?php printSlideShowJS(); ?>

    This where I want it to display:
    <?php $albumobj = new Album($_zp_gallery, "ferrari"); printSlideShow(true,false,$albumobj, "", 600,400); ?>

    And added the 3 slideshow files to my themes folder.

    However, the slideshow doesn't want to display.

    Anyway, not that it works, but I don't want the ferrari folder's images displayed. I'd like the album of the current page to be displayed.

    Any ideas?

    Posted 2 years ago #
  2. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 15,149

    I don't understand. If you don't want to use the "ferrari" album why do you set it specifically?

    The slideshow without a special setting uses the current album automatically by default. You also don't need to add the printSlideshowJS to any theme page if you use that. That is only needed if you wish to use the slideshow specifally independent of the context.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  3. kocho

    Senior
    Joined: May '11
    Posts: 64

    Hi acrylian,

    If I have the quotation marks without anything inside, I get this;

    Zenphoto encountered an error
    MySQL Query ( SELECT * FROM zp_images WHERE albumid= ) failed. MySQL returned the error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

    Posted 2 years ago #
  4. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 15,149

    Please look at how standard themes do it. The slideshow is always directed either to the slideshow page or displayed via a colorbox.

    If you want to use the slideshow directly on the album.hpp theme page you need to use the global object variable of the current album. Please see the object model tutorial then.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  5. kocho

    Senior
    Joined: May '11
    Posts: 64

    Ok, so the global object variable page says that if I want to create a new album object I should use:
    $albumobject = new Album($galleryobject,"");

    So does that mean the line of code now becomes;
    <?php $albumobject = new Album($galleryobject,""); printSlideShow(true,false,$albumobject, "", 600,400); ?>

    Posted 2 years ago #
  6. sbillard

    Contributor
    Joined: May '07
    Posts: 10,455

    So, what is this global object variable page? Surely it does not say what you quote as that will certainly fail.

    You should read the zenphoto object model docs and also the functions guide.

    Posted 2 years ago #
  7. kocho

    Senior
    Joined: May '11
    Posts: 64

    This page here is the one I'm referring to: http://www.zenphoto.org/news/zenphotos-object-model-framework

    Posted 2 years ago #
  8. Zenphoto development team
    fretzl

    Moderator
    Joined: Sep '08
    Posts: 722

    You're right. Something got lost somehow.

    The code in your first post is basically correct.

    Please explain what you want to do and where.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  9. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 15,149

    $albumobject = new Album($galleryobject,"");

    So does that mean the line of code now becomes;
    <?php $albumobject = new Album($galleryobject,""); printSlideShow(true,false,$albumobject, "", 600,400); ?>

    That code is completly wrong.

    First, did you set up $galleryobject? If not that is empty. Generally the gallery object is availble on theme pages already.

    Secondly. $albumobject = new Album($galleryobject,"") this does not create any album because you don'T pass an album name... The current album has also a global var that is setup on album.php and image.php.

    Btw, you didn't answer my question above. For the standard slideshow usage see the standard themes. If you want to call it directly on a theme page you probably really should re-read the object model tutorial.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  10. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 15,149

    Turns out the object model tutorial lost some details that probably confused you. We had an encoding issue a while back so some code examples got lost. It should now be fixed and more clear.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  11. kocho

    Senior
    Joined: May '11
    Posts: 64

    I'm so confused. I'll ask one of you for some paid assistance. Thanks everyone!

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.