We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4099
    • 11 Posts
    I posted this originally in another topic, but felt it was more fair to start a new topic about this, since I saw nothing posted to answer this issue.


    I’m using the example to display a big image with thumbnails on the same page.

    I got it to upload a couple of images, and can see the pictures in the gallery when I’m logged into the manager..

    When I’m logged out of the manager and I go on the photo gallery page, all I get is a blank screen..

    All pages are published, site is in online status.

    This only happens to the page with the photo gallery, which I have it as uncached, the rest of the pages in the menu show up ok.

    I removed this


    [!MaxiGallery? &galleryPictureTpl=`mgGalleryPicture` &js=`mgJs`!]


    and then it loaded fine, so I guess the "mgJS" is giving the page problems to lead the css and html layout? The source code loads the html fine.

    Here’s a photo logged into the manager, and another photo of the same page when logged out..

    (attached)

    Any help? Thanks in advance!
      • 7923
      • 4,213 Posts
      Is the site online? Hard to figure anything out from those screencaptures.



        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 4099
        • 11 Posts
        Site is online, but isn’t quite ready yet, site start goes to unavailable page.

        You can check out the direct link to the page that’s not working

        http://hottrendsmakeup.com/make-up-photo-gallery

        thanks doze, let me know if you want me to pm you the login info in case you want to check out what’s going on.
          • 26931
          • 2,314 Posts
          hi there,

          you need to close your javascript call in the header, try it like this:

          <script type="text/javascript">
          //<![CDATA[
          function showPic(url,title,descr,width,height) {
                 var img = document.getElementById('maxImage');
                 var titleHolder = document.getElementById('maxTitle');
                 var descrHolder = document.getElementById('maxDescr');
          	   var newImg = new Image();
          	   newImg.onLoad = doImage(img,url,width,height);
                 if (titleHolder != null) {
                         for (var i = 0; i < titleHolder.childNodes.length; i++) {
                                 titleHolder.removeChild(titleHolder.childNodes[i]);
                         };
                         if (title != "") {
                                 var node=document.createTextNode(title);
                         }
                         else {
                                 var node=document.createTextNode("");
                         }
                         titleHolder.appendChild(node);
                 }
                 if (descrHolder != null) {
                         for (var i = 0; i < descrHolder.childNodes.length; i++) {
                                 descrHolder.removeChild(descrHolder.childNodes[i]);
                         };
                         if (descr != "") {
                                 var node=document.createTextNode(descr);
                         }
                         else {
                                 var node=document.createTextNode("");
                         }
                         descrHolder.appendChild(node);
                 }
          }
           
          function doImage(img,url,width,height) {
          img.src=url;
          }
          //]]>
          </script>

          if you followed the wiki tutorial, it would be the Chunk "mgJs"
            • 4099
            • 11 Posts
            LOL I can’t believe I didn’t notice that! laugh

            Thanks so much sharkbait, It’s been a couple of days that I had been dealing with this.
              • 26931
              • 2,314 Posts
              great smiley
              didn’t you get my PM?

              sorry, i checked...was someone else smiley
                • 4099
                • 11 Posts
                Does anyone know how to do this, I just set up the gallery with phpthumb to get square thumbs, and instead of Onclick, I have the images change onmouseover.

                Works fine, except the large image isn’t coming up square, now the onmouseover gives the gallery a crazy effect.

                Here’s the large image chunk I’m using,

                mgPicture
                <div class="picturecontainer">
                       <img id="maxImage"
                src="[*myimage:phpthumb=`h=300&w=300&zc=1#[+maxigallery.path_to_gal+][+maxigallery.picture.filename+]#1`*]"
                alt="[+maxigallery.picture.title:htmlent+]" />
                       <p id="maxTitle">[+maxigallery.picture.title:htmlent+]</p>
                       <p id="maxDescr">[+maxigallery.picture.descr:htmlent+]</p>
                </div>


                The result desired is similar to this:
                http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

                Any suggestions?
                  • 4099
                  • 11 Posts
                  Oops never mind - I just created a div with a fixed height and width in css; that did the trick.

                    • 7923
                    • 4,213 Posts
                    To get phpthumb to zoom crop the large image, you need to modify your javascript function what changes the picture. By default it just loads the image there, but you actually would want to pass the image to phpthumb and ask it to generate the zoom cropped image.


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 4099
                      • 11 Posts
                      Excellent advice thank you Doze