We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27889
    • 415 Posts
    I’ve made somes small change to the snippet so it is valid:
    Line 53, encode <b>,</b> and
    replaced
    $returnstring .= "<a href=\"$file\" rel=\"lightbox[maxigallery]\" title=\"<b>".htmlentities(stripslashes($pic['title']))."</b><br />".htmlentities(stripslashes($pic['descr']))."\">";

    with:
    $returnstring .= "<a href=\"$file\" rel=\"lightbox[maxigallery]\" title=\"<b>".htmlentities(stripslashes($pic['title']))."</b><br />".htmlentities(stripslashes($pic['descr']))."\">";

    and line 59 added the alt attribute and closing img tag with "/ >"
    $returnstring .= ($i > $pics_to_show ? "" : "<img src=\"$tn_file\" class=\"thumbnail\">" ) . "</a>";

    with:
    $returnstring .= ($i > $pics_to_show ? "" : "<img src=\"$tn_file\" class=\"thumbnail\" alt=\"".htmlentities(stripslashes($pic['title']))."\" />" ) . "</a>";
      MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
      MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
      • 26435
      • 1,193 Posts
      ha! great job posting this. It is funny I was just doing this last night to get my site to validate. I am working on a quick fix for MaxiGallery right now, but doze says he will have templating in the next revision, so I am not going to put a lot of effort into this. thanks for posting this. should save some peoples some time with validation!

      -sD-
        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
        All of the above... in no specific order.


        I send pointless little messages
        • 27889
        • 415 Posts
        Trying to do the job, all clear, closing tag, adding fieldsets, encode few chars and removed [ and ] in rel attribute I attach the new file.
          MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
          MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
          • 27889
          • 415 Posts
          Hum sorry, replace form’s names with id isn’t a good choice, the edit form no longer function, but it is in manager pane so for users whom hasn’t right to modify the gallery, it stay valid with attribute name.
            MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
            MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
          • Sometimes I think the W3C standards body tends to be a little extreme, to the point of throwing out the baby with the bathwater.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org