We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13428 ☆ A M B ☆
    • 1,031 Posts
    Is it possible to use [+maxigallery.picscount+] of galleryOuterTpl somehow in galleryPictureTpl?

    Reason: I have to detect the last image of a gallery and use a slightly different template there (no comma after this).
      • 7923
      • 4,213 Posts
      Unfortunately no.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 13428 ☆ A M B ☆
        • 1,031 Posts
        Could it be possible to patch any file to use it there?

        Did not look at the code quite now and don’t know where the TVs are set. Maybe the code is somehow expandable.
          • 7923
          • 4,213 Posts
          Yes, you could hack it into maxigallery.php.. the gallery overview is build at the bottom of the file.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 13428 ☆ A M B ☆
            • 1,031 Posts
            added line 1241:
            $pictureTplData['picscount'] = $limit;


            Works fine for me.

            Now it is possible to add a comma to all lines but the last in galleryPictureTpl by
            [+maxigallery.picnumber:ne=`[+maxigallery.picscount+]`:then=`,`+]


            Maybe an enhancement for future versions. $limit should be the the number of the displayed pictures in the gallery at this moment. Maybe the placeholder should be called ’maxigallery.displaycount’.
              • 7923
              • 4,213 Posts
              Yep, I’ll try to remember and add this for next version, thanks!


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."