How do I add text below the gallery thumbs?
  • Browser: FireFox v3.0.4
    Minishowcase: v09b92
    Demo URL: http://www.about-daniel.com/minishowcase/ (Note: There is slight nudity as the client is a photographer.)

    I noticed that my gallery descriptions were incredibly long; so long that the user would have to scroll down to even see the gallery thumbs, which is not ideal. I decided to create a hack to try to enable text to appear below the gallery thumbs (in addition to above). I made the following changes:
    settings.php

    /* gallery information file (top)
    * VALUES: [ <filename> ] */
    $settings['info_file_top'] = '_info_top.txt'; //Added "_top" for text below thumbs hack 11/19 -ds

    // ******ADDED BY DANIEL 11/19******
    /* gallery information file (bottom)
    * VALUES: [ <filename> ] */
    $settings['info_file_bottom'] = '_info_bottom.txt';
    // *************END ADD************

    I then renamed all '_info.txt' files to '_info_top.txt' and added a couple of '_info_bottom.txt' files for galleries where I wanted text to appear below the thumbs.

    index.php

    <div id="gallery_description_top"> //Added "_top" for text below thumbs hack 11/19 -ds
    <?php
    if (file_exists("galleries/".$settings['info_file_top'])) {
    echo get_include_contents("galleries/".$settings['info_file_top']);
    }
    ?></div>

    and

    <!-- BOTTOM gallery description div --> //Added for text below thumbs hack 11/19 -ds
    <div id="gallery_description_bottom">
    <?php
    if (file_exists("galleries/".$settings['info_file_bottom'])) {
    echo get_include_contents("galleries/".$settings['info_file_bottom']);
    }
    ?></div>

    Without getting too involved, I then had to do some problem solving. I updated all #gallery_descriptions styles to #gallery_descriptions_top and I created identical style attributes for _bottom. I updated the gallery_description div to gallery_description_top and added a _bottom div below the thumbs_div. After these changes, I was still getting some weird formatting issues. After toying with the styles, I found out that there are many references to gallery_descriptions in the ajax.functions.js, so I began a campaign to refactor those areas to include the _bottom hack. While all of my changes are easily reversible, I'm not getting any closer to achieving my goal. Now the div position and layering of the thumbs vs. the bottom text is all messed up. I'm not looking for someone to help me figure that part out, I'm sure I can work everything out once I fully understand the functions in the ajax.functions.js file. However, I do feel like I've awakened a beast with these changes. So my question is is there a better, easier, or more intuitive way to incorporate text below the gallery thumbs?
  • i would advice to include some divider (like
    --DIVIDER--
    ) into the
    _info.txt
    file between the top text and the bottom text, and divide the parsed text into two chunks to be sent to different divs, so you just have to change the text changing function.
  • Duh...that sounds very intuitive. :-) Thank you!