We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13425
    • 36 Posts
    I have MODx installed, and I have quite a few pictures in each page. I was just wondering, to make things tidier, is there any way I can use thumbnails instead of the larger pictures.

    For example, like what you have on this page.

    http://wiki.modxcms.com/index.php/MODx_0.9.5_in_screen_captures

    I have Maxigallery and I was wondering if there was any way to call the thumbnail from that?

    Thank you.

    John
      • 3749
      • 24,544 Posts
      Maxigallery will do just about anything you want. This snippet call will show just the thumbnails but clicking on any of them will show the larger picture (with previous and next buttons to browse through the larger pictures):

      <h3>Click on a photo to see a larger version</h3>
      <br/>
      <p>
      [!MaxiGallery? &display=`embedded` &embedtype=`slimbox` &pics_per_row=`3`  &max_thumb_size=`110` &admin_webgroups=`wugPhotoAdmins`  &manager_webgroups=`Photo Admins` &max_pic_size=`480` &thumb_use_dropshadow=`1`!]
      </p>


      Members of the two groups will see a "manage photos" button on each gallery page that will allow them to upload, delete, caption, and remove photos. This is a barebones MaxiGallery setup. You can do a lot more styling using tpl parameters.

      Remember that all the Maxigallery effects (e.g. dropshadow) and sizing take place on upload so when you change things, you have to re-upload the pictures to get the new effects. Remember, too, that the parameters are enclosed in backticks, not single quotes.


        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 13425
        • 36 Posts
        Hi Bob, thank you for your message.

        I am sorry, not sure if I have explained it properly or that I understand what you have posted. Here’s a page from my gallery, http://furrycritters.co.uk/index.php?id=94 it shows the thumbnails there. What I would like is to see if I can call a thumbnail to a page like this, http://furrycritters.co.uk/index.php?id=11that picture is in the gallery, but as it is, i can only find a way to call the picture in the large size, what i want to do is call the thumbnail instead from the gallery. Can that be done with MaxiGallery installed or does it need another snippet?

        Thank you.

        John
          • 3749
          • 24,544 Posts
          I think I get it now.

          This will show a single thumbnail (chosen at random from the galleries) with title and description as a hyperlink to its gallery:


          <a href="[~[+maxigallery.picture.gal_id+]~]">
          <img id="maxImage" src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail" alt="[+maxigallery.picture.title:htmlent+]" />
          </a>
          	<p id="maxTitle">[+maxigallery.picture.title:htmlent+]</p>
          	<p id="maxDescr">[+maxigallery.picture.descr:htmlent+]</p>


          If you want to show a specific picture, you need to add this parameter: &pic_query_ids=`n` (where n is the id number of the picture you want).

          If you don’t want the picture to be a link to the gallery, leave out the first and third lines. If you don’t want a title or description, leave out the last two. The id and class are for .css styling and you may not need them.

          BTW, I’m not really a MaxiGallery expert so someone else might know a better way to do this.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 13425
            • 36 Posts
            Hi, Thank you so much for the reply. I really appreciate the help. If I wanted to add &pic_query_ids=`n` where in the call would I add it. I want the specific thumbnail and picture to show up on the file.

            Thank you again.

            John.
              • 3749
              • 24,544 Posts
              Quote from: jakewc2 at May 13, 2008, 01:41 AM

              Hi, Thank you so much for the reply. I really appreciate the help. If I wanted to add &pic_query_ids=`n` where in the call would I add it. I want the specific thumbnail and picture to show up on the file.

              Thank you again.

              John.

              In MODx, the order of the parameters in a snippet call is (in theory) unimportant so you can put it anywhere. It’s up to the snippet author to make sure it doesn’t matter so there could be a case where it does. In all the snippets I’m familiar with, you can put parameters in any order.

              I’m afraid I don’t know what you mean by the last sentence. Do you want both the picture AND the thumbnail to appear in the same document (web page)?

              Bob
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting