Image order

edited February 2013 in Slideshow Gallery plugin
Hello,

I'm using your gallery plugin on a real estate site, via a shortcode; and it works really well - thanks! There's just one problem I have - I would like to display the images in reverse order (I won't bore you with the details as to why, but there's a good reason), is this possible?

Thanks.

Comments

  • 9 Comments sorted by
  • Vote Up0Vote Down
    edited February 2013
    Hi mogs,

    The Slideshow Gallery plugin uses a drag-and-drop system to determine the sort order of the slides.

    So you could simply use one of the following methods to order them to your requirements:
    • If you use the simple shortcode [slideshow], then slides should be ordered under Slideshow > Manage Slides
    • If you use the shortcode [slideshow gallery_id="x"], then slides should be ordered under Slideshow > Manage Galleries by clicking on the "Order Slides" link for a gallery: http://screencast.com/t/eTrRRY5442W7
    I hope that helps?

    Kind regards,

    Phil
  • Vote Up0Vote Down
    Hi Phil,

    Thanks very much for taking the time to reply.

    The problem is that I don't have any slides or galleries! I import images via an XML feed and they are attached to a property - a custom post type - I then display them using:

    <pre lang="php">
    <?php if (function_exists('slideshow')) {
        slideshow(
        $output = true,
        $gallery_id = false,
        $post_id = $post,
        $params = array(
            'orderby' => "asc",
            'shownav' => false
        )); } ?>
    </pre>

    I tried ordering by 'desc', but that didn't do anything. Is there another parameter I can apply which would help?

    Thanks a lot.

    mogs
  • Vote Up0Vote Down
    I'm doing something similar, managing the images with the WP media manager instead of creating slides/galleries. I was wondering what the default order is, and how to rearrange slideshows created with the shortcode, e.g.

    [slideshow post_id="18"]

    is it filename, or some ID that can me managed within WP?

  • Vote Up0Vote Down
    Hi mogs and option8,

    In both your cases you might be able to order the slides by going to the specific post/custom post, clicking the "Add Media" button to open the post's media gallery, and then drag/drop the images into the order you want them to be in the slideshow.

    I hope this helps?

    Best regards,

    Phil
  • Vote Up0Vote Down
    Phil - 

    that's what i've done to add them in the first place. i'm working with a client, and i'm trying to make things as simple for her as possible. telling her "drag the images into the media upload window in the order you want them" unfortunately results in the images displaying in the opposite order - most recent upload (and presumably highest ID) first.

    here is a page i just uploaded images to:

    if you dig into the thumbnails, you'll see they're in reverse order, though i uploaded them in order, and the IDs in the media library are in the proper order as well.


    where in the plugin code can i go to change this?
  • Vote Up0Vote Down
    Hi option8,

    If you would be so kind as to submit a support ticket at http://tribulant.com/support/ with your WordPress admin login details and FTP access, we'll be happy to investigate for you. Is that all right?

    I look forward to your reply.

    Kind regards,

    Phil
  • Vote Up0Vote Down
    as this is a client's site, and not my own, i can't give out access. could you point me to where that order is established in the plugin files, so i can change the order ASC to DESC  or vice versa?
  • Vote Up0Vote Down
    after some more digging - it looks like there's a problem in line 194 in slideshow-gallery.php:
    if ($attachments = get_children("post_parent=" . $post -> ID . "&post_type=attachment&post_mime_type=image&orderby=" . ((!empty($orderby) && $orderby == "random") ? "rand" : "menu_order ASC, ID ASC"))) {


    i've changed it to 
    if ($attachments = get_children("post_parent=" . $post -> ID . "&post_type=attachment&post_mime_type=image&order=ASC")) {


    anyhow, it works for me.
  • Vote Up0Vote Down
    Hi option8,

    That should be fine... you simply changed the dynamic order/orderby to static values, and if it works for you that's great.

    Best regards,

    Phil
Sign In or Register to comment.