We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8790
    • 526 Posts
    Hi,

    I’m trying for the first time to deal with
    http://wiki.modxcms.com/index.php/MaxiGallery#Picture_and_thumbnails_on_same_page

    I did step by step the wiki things there, and I have got the list of thumb coming up correctly BUT I can’t make them SMALLER than the 130 default width size.
    Here’s the call:
    [!MaxiGallery? &galleryPictureTpl=`tpl-mg-projet-thumb` &pics_per_row=`3` &max_thumb_size=`80` &thumb_use_dropshadow=`1`  &js=`mgJs`!]     


    Looks like there’s a size which under the thumb can’t be created (???)
    I tried to add
    width="[+maxigallery.picture_width_thumb+]"
    but it does nothing more.

    <li>
           <a href="javascript:void(0);"
    onClick="javascript:showPic('[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]','[+maxigallery.picture.title:htmlent+]','[+maxigallery.picture.descr:htmlent+]',[+maxigallery.picture_width_normal+],[+maxigallery.picture_height_normal+]);return
    false;">
     <img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]"
    class="thumbnail" title="[+maxigallery.picture.title:htmlent+]"
    alt="[+maxigallery.picture.title:htmlent+]" width="[+maxigallery.picture_width_thumb+]" />
           </a>
    </li>


    There’s also another issue, but I’ll post later about it.

    SO is this the way to use the width given through the MG call or what ?

    Thank you
      Schtroumpf Grognon - Grouchy Smurf
      ---------------------------------
      Faites pas attention.. - Don&#39;t pay attention
      http://www.dzi-neo.net
      • 7923
      • 4,213 Posts
      There isn’t any limit how small the thumbnails are allowed to be resized..

      Did you upload the images again after you changed the thumbnail size snippet parameter?


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 8790
        • 526 Posts
        No I just can’t figure out I had to .....

        did I ?

        Thank you

          Schtroumpf Grognon - Grouchy Smurf
          ---------------------------------
          Faites pas attention.. - Don&#39;t pay attention
          http://www.dzi-neo.net
          • 8790
          • 526 Posts
          You are right the thumb size is accurate only at upload.

          I still have issue with http://modxcms.com/forums/index.php?topic=26677.0

          did you have a sample of code for the phx modifier ?

          thx
            Schtroumpf Grognon - Grouchy Smurf
            ---------------------------------
            Faites pas attention.. - Don&#39;t pay attention
            http://www.dzi-neo.net
            • 3749
            • 24,544 Posts
            Quote from: elz64 at Aug 08, 2008, 02:38 AM

            You are right the thumb size is accurate only at upload.

            In MaxiGallery, all sizing of pics and thumbs, plus dropshadow and masks do their work during upload. If you change any of them, you have to re-upload the images.
              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
              • 7923
              • 4,213 Posts
              Quote from: elz64 at Aug 08, 2008, 02:38 AM

              did you have a sample of code for the phx modifier ?
              No. PHx modifiers are pretty simple to do though. Just create a new snippet with name "phx:mymodifier"

              and the code for the modifier should be something like:
              return addslashes(htmlentities($output));
              


              Then replace :htmlent in the mgGalleryPicture chunk in the onClick attribute value with :mymodifier


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 8790
                • 526 Posts
                thank you
                I’ll check with someone who know about php
                  Schtroumpf Grognon - Grouchy Smurf
                  ---------------------------------
                  Faites pas attention.. - Don&#39;t pay attention
                  http://www.dzi-neo.net
                  • 7923
                  • 4,213 Posts
                  You don’t have to know any php, just try that what I said in my post.


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                    • 8790
                    • 526 Posts
                    hi again.

                    Here’s something that could help more people.
                    Some languages uses ’ caracter more than other (like French for instance) and doing in the same stuff the CR/LF issue is better :
                    so here’s the snippet for the phx modifier suggest to add to the Wiki example if some find it worth for it.

                    Looks like doing the job.

                    <?php
                    //$out = addslashes(htmlentities($output)); not enought
                    // some addition by A.Castan for E.Lacomblez Nëo-tekk
                    //
                    $out = str_replace("'","\'",$output);
                    $out = str_replace('"',"\'",$out);
                    $out = str_replace("\r\n"," ",$out);
                    $out = str_replace("\n"," ",$out);
                    return $out;
                    ?>
                      Schtroumpf Grognon - Grouchy Smurf
                      ---------------------------------
                      Faites pas attention.. - Don&#39;t pay attention
                      http://www.dzi-neo.net