WordPress.org

Forums

File Gallery
new template concept (7 posts)

  1. electrolund
    Member
    Posted 3 years ago #

    Hey fellow File Gallery users, I have a new gallery template idea in mind that I want to bounce off you all.

    In my opinion, I think it would be a good use of my blog's screen real estate to not take up valuable vertical space with a bunch of thumbnails, even if those thumbnails are small.

    Instead, I think it might be neat to have a single thumbnail at the bottom of a post, with intro text like "Full Project Gallery:"

    Then this single thumbnail fires a Highslide (or pick your favorite javascript library) popup with thumbnail slider/toolbar.

    I'm currently experimenting with the Highslide framework, since it seems to have the best support for integrated thumbnail sliders.

    So that leaves me with the question of how to "hide" all but the first of the thumbnails from the WordPress gallery shortcode. It would seem to me that a File Gallery template here could do the trick.

    I did some Googling and found a very good suggestion on a Drupal forum. Basically amounts to two different CSS classes, the second taking advantage of the visibility:hidden or display:none properties.

    Sounds like a template could handle this.

    http://wordpress.org/extend/plugins/file-gallery/

  2. electrolund
    Member
    Posted 3 years ago #

    I'm making some good progress with this template idea. One hurdle that I'm having a hard time with is how to make the File Gallery plugin allow me to insert the first image of the WordPress attached image with one style tag, and then subsequent images with a different style tag.

    For instance, this is the required output HTML for a sample highslide-ready gallery:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    Is this possible? So far, my tests have been not quite successful. I'm not sure where the looping happens through the WordPress attachments. I'm assuming that it is happening inside the File Gallery plugin.

  3. electrolund
    Member
    Posted 3 years ago #

    Oops, my code paste was too long. Here's the code at pastebin.

  4. electrolund
    Member
    Posted 3 years ago #

    Ok, RTFM for me. The variable $file_gallery_this_template_counter is a wonderful thing! And the example in the Simple template does exactly what I'm wanting, actually, processing the first image differently than the rest.

    I'm very encouraged. So far so good.

  5. electrolund
    Member
    Posted 3 years ago #

    I have my template working nicely now. I'll write something up about it soon. Here's an example of it working:

    http://www.electrolund.com/2008/11/cammate-tally-light-indicator-prototype/

  6. electrolund
    Member
    Posted 3 years ago #

    I have my templates available for download here:

    http://www.electrolund.com/2012/04/blogging-challenge-part-2/

  7. Li-An
    Member
    Posted 3 years ago #

    Nice work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • File Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic