We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5091
    • 332 Posts
    Notice that MaxiGallery’s templates (childgallerypicturetpl and gallerypicturetpl) don’t have the ’alt’ attribute for the img tag.

    I fixed that in my copy using "[+maxigallery.picture.title:htmlent+]" place holder however I am curious if there is a better way we can control which content (title, document name or summary) for alt attribute via MaxiGallery’s parameter.

    Thanks!
      • 10076
      • 1,024 Posts
      Hi,

      how did you do that. I am interested in having an alt showing up.
      Where did you put that placeholder, allway has been a strugle for me them placeholders,

      thanks.
        • 5091
        • 332 Posts
        Sorry, I don’t remember exactly which file (or two files) I added the alt text, but my guess is it’s "gallerypicturetpl.html" located in the ’assets/snippets/maxigallery/templates/’.

        You may want to check out the ’childgallerypicturetpl.html" file.

        Below are the codes from my "gallerypicturetpl.html" file from line #1 to line #9. Look for the two placeholders in the alt attribute.


        [+maxigallery.embedtype:is=`smoothgallery`:then=`
        <div class="imageElement">
        <h3>[+maxigallery.picture.title:htmlent+]</h3>
        <p>[+maxigallery.picture.descr:htmlent+]</p>
        <a href="[+maxigallery.picture_link_url+]" title="[+maxigallery.strings.click_to_zoom+]" class="open"></a>
        <img src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" class="full" alt="[+maxigallery.picture.title:htmlent+] - [+maxigallery.picture.descr:htmlent+]" />
        <img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail" alt="[+maxigallery.picture.title:htmlent+] - [+maxigallery.picture.descr:htmlent+]" />
        </div>
        `+]
          • 10076
          • 1,024 Posts
          ediited both those files and the source of that page gives this:
             <div class="imageElement">
          
             <h3>sundown01</h3>
             <p>Cerro 14-6-09</p>
             <a href="/Work.html?pic=57" title=" » Click to zoom ->" class="open"></a>
             <img src="/assets/galleries/1/image08.jpg" class="full" alt="sundown01 - Cerro 14-6-09" />
             <img src="/assets/galleries/1/tn_image08.jpg" class="thumbnail" alt="sundown01 - Cerro 14-6-09" />
             </div>
             <div class="imageElement">


          So alt seems to be there but no alt on hovering, strange no?
            • 5091
            • 332 Posts
            Hi Frank, I think hover uses title tag. If you show me your page I can take a look and compare it with mine.
              • 10076
              • 1,024 Posts
              okay, here it is, and thanks for your trouble,

              http://italianartists.eu/index.php?id=1
                • 5091
                • 332 Posts
                Here are what I have:

                image document:
                [!MaxiGallery? &display=`embedded` &embedtype=`smoothgallery` &childgalleries_order_by=`createdon` &max_thumb_size=`110` &max_pic_size=`570` &order_by=`random` &keep_bigimg=`1!]

                In the "Manage Picture" area, image description is entered in ’Title’, and it’s pulled from <h3>[+maxigallery.picture.title:htmlent+]</h3> in "gallerypicturetpl.html" on line #3.

                In your page he title text do show up in every photo in the source code, but only the first one is showed from screen.
                I see something isn’t right from your source code though, on the very top you have this:
                <?xml version="1.0"?>

                Will this be the culprit?


                  • 10076
                  • 1,024 Posts
                  Hi,

                  took that odd piece out of the template:

                  here s my call

                  [!MaxiGallery? &display=`embedded` &embedtype=`smoothgallery`&keep_bigimg=`1` &smoothgallery_carouselElement=`carousel` &smoothgallery_useExternalCarousel=`true`  &smoothgallery_width=`623` &max_pic_size=`623` &smoothgallery_showCarouselLabel=`false` &smoothgallery_showArrows=`false` &smoothgallery_showInfoPane=`false` &smoothgallery_thumbHeight=`120` &smoothgallery_thumbWidth=`140`&max_thumb_size=`140x120` &smoothgallery_embedLinks=`true` &smoothgallery_slideInfoZoneSlide=`false` &smoothgallery_thumbSpacing=`2`!]


                  Still no change, maybe due to the 0.6 test version of MG?

                    • 7923
                    • 4,213 Posts
                    SmoothGallery doesn’t use those image tags to display the images.. It creates a div for each image and sets the image as the div background. So the alt and title attributes do not get set to the actual pictures that you see on the page.

                    Use Webdeveloper toolbar in Firefox and select View Source -> View Generated Source to see the html source that smoothgallery script generates.


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 10076
                      • 1,024 Posts
                      Thanks Doze,

                      will check that.