We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27889
    • 415 Posts
    Hi, I have an error with smoothgallery, MaxiGallery version 0.5.2, Firebug tell me that I have an error at line 418:
    missing : after property id
    [Break on this error] slideInfoZoneOpacity: 0,7, \n
    
    401
    402 <script type="text/javascript">
    403 function startGallery() {
    404 var myGallery = new gallery($('myGallery27'), {
    405 showArrows: true,
    406 showCarousel: true,
    407 showInfopane: true,
    408 thumbHeight: 75,
    409 thumbWidth: 100,
    410 thumbSpacing: 10,
    411 embedLinks: true,
    412 fadeDuration: 500,
    413 timed: false,
    414 delay: 9000,
    415 preloader: true,
    416 slideInfoZoneOpacity: 0,7,
    417 carouselMinimizedOpacity: 0,4,
    418 carouselMinimizedHeight: 20,
    419 carouselMaximizedOpacity: 0,7,
    420 textShowCarousel: 'Pictures'
    421 });
    422 }
    423 window.onDomReady(startGallery);
    424 </script>
    425</body>
    

    The call is:
    [!MaxiGallery? &debug=`1` &gal_query_ids=`260` &display=`embedded` &embedtype=`smoothgallery`!]

    don’t know where it come from, the script seems to be ok with all ":"
    Edit tested with mootools V1 and V1.11, the same problem occurs.
      MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
      MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
      • 7923
      • 4,213 Posts
      Smoothgallery is meant to be used with mootools 1.0.

      The problem is that those slideInfoZoneOpacity, carouselMinimizedOpacity and carouselMaximizedOpacity values are defined with commas, eg 0,7. The values should be with dot’s 0.7.

      If you haven’t changed anything, open maxigallery.class.php and change:

      $mgconfig['smoothgallery_slideInfoZoneOpacity'] = (isset($smoothgallery_slideInfoZoneOpacity)) ? $smoothgallery_slideInfoZoneOpacity : 0.7; // [ number ]
      $mgconfig['smoothgallery_carouselMinimizedOpacity'] = (isset($smoothgallery_carouselMinimizedOpacity)) ? $smoothgallery_carouselMinimizedOpacity : 0.4; // [ number ]
      $mgconfig['smoothgallery_carouselMinimizedHeight'] = (isset($smoothgallery_carouselMinimizedHeight)) ? $smoothgallery_carouselMinimizedHeight : 20; // [ number ]
      $mgconfig['smoothgallery_carouselMaximizedOpacity'] = (isset($smoothgallery_carouselMaximizedOpacity)) ? $smoothgallery_carouselMaximizedOpacity : 0.7; // [ number ]
      


      to:

      $mgconfig['smoothgallery_slideInfoZoneOpacity'] = (isset($smoothgallery_slideInfoZoneOpacity)) ? $smoothgallery_slideInfoZoneOpacity : "0.7"; // [ number ]
      $mgconfig['smoothgallery_carouselMinimizedOpacity'] = (isset($smoothgallery_carouselMinimizedOpacity)) ? $smoothgallery_carouselMinimizedOpacity : "0.4"; // [ number ]
      $mgconfig['smoothgallery_carouselMinimizedHeight'] = (isset($smoothgallery_carouselMinimizedHeight)) ? $smoothgallery_carouselMinimizedHeight : 20; // [ number ]
      $mgconfig['smoothgallery_carouselMaximizedOpacity'] = (isset($smoothgallery_carouselMaximizedOpacity)) ? $smoothgallery_carouselMaximizedOpacity : "0.7"; // [ number ]
      


      Eg. Make the non integer values be string. They are used as string anyways so it’s the right way. I’ll fix it to next release.

      It seems that some environments outputs non integer numbers with commas.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 27889
        • 415 Posts
        Thanks a lot Doze, now it works like a charm.
        My locale is set to FR, perhaps it’s the reason for non integer numbers with comma.
          MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
          MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]