smughack: bulk zoom thumbnail (super deluxe version)

191012141526

Comments

  • Mike LaneMike Lane Registered Users Posts: 7,106 Major grins
    edited January 11, 2007
    Allen wrote:
    Oh oh, better go check.:D
    Check what? Your theme specifies the .title to be black. Since the h3 has the title class it was black. All your other title declarations were too specific to affect it. If someone had the plain jane smugmug gradient style, they'd see green thumb.gif

    As long as it specified as #bulkzoom_toolbox h3 it should not effect other h3's, am I correct?
    Al

    No other h3's that are not children of the div#bulkzoom_toolbox will be affected.
    Y'all don't want to hear me, you just want to dance.

    http://photos.mikelanestudios.com/
  • AllenAllen Registered Users Posts: 10,013 Major grins
    edited January 11, 2007
    Mike Lane wrote:
    Check what? Your theme specifies the .title to be black. Since the h3 has the title class it was black. All your other title declarations were too specific to affect it. If someone had the plain jane smugmug gradient style, they'd see green thumb.gif

    No other h3's that are not children of the div#bulkzoom_toolbox will be affected.
    :bash A little slow today. Brain not connected to the keyboard.:D
    Thanks Mike
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 11, 2007
    Mike Lane wrote:
    I hope you don't mind Dev :D
    Hey Mike,

    No problem at all. I am happy for you to make the non-table version the standard one if you want, to save having two pages.

    Also, I have point the main thread to the wiki instead of my server.

    Thanks mate,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • cmasoncmason Registered Users Posts: 2,506 Major grins
    edited January 21, 2007
    not working for me....
    OK...I hate to do this, but I have read thru this thead (yes all of it), visited the Wiki, and followed what I think are the instructions (still not dummy clear).

    OK so I used the code from the Wiki, and have stuck with the tables version just to try to get something to work. CSS code in CSS box, Javascript in Javascript box, and Header text in the header box.

    Annndddd......nothing. not a durn thing. Doesn't matter what gallery, protected or not, originals on or not: I get nothing...not box or button or anything called zoom thumbnail.

    Any suggestions?
  • DavidTODavidTO Registered Users, Retired Mod Posts: 19,160 Major grins
    edited January 21, 2007
    The code in the wiki is temporarily b0rked, I don't know why. It'll be fixed, but for now, you can use this code:
    /*============================*/
    /*== Bulk Zoom thumbnail v2.4 ==*/
    /*============================*/
    var thumbnailArray = new Array();
    var thumbnailCount;
    var thumbnailItem;
    var thumbnailEXIFArray = new Array();
    var reqIncrement = 0;
    
    addEvent(window, "load", addBulkThumbnail);
    
    function addBulkThumbnail()
    {
      if (isClass("galleryPage"))
      {
        if ((isClass("traditional")) || (isClass("allthumbs")) ||  (isClass("smugmug_small")) ||  (isClass("smugmug")))
        {
          if (isClass("loggedIn"))
          {
            onStartBulk();
    
            divTag = document.getElementById("photoTools");
    
            document.getElementById("bulkSave").disabled = true;
    
            objSpan = document.createElement("span");
            objSpan.className = "foreground";
            divTag.appendChild(objSpan);
    
            objButton = document.createElement("input");
            objButton.type = "checkbox";
            objButton.id = "bulkzoom";
            objSpan.appendChild(objButton);
            addEvent(objButton, "click", toggleBulkZoom);
    
            objText = document.createTextNode(' bulk zoom thumbnail');
            objSpan.appendChild(objText);
          }
        }
      }
    }
    
    function toggleBulkZoom()
    {
      if (document.getElementById('bulkzoom').checked)
        processThumbnails();
      else
        window.location = window.location;
    }
    
    function processThumbnails()
    {
      document.getElementById("ajaxWorking").innerHTML = "<strong><strong>Loading...</strong></strong>"
      toggleDIV('ajaxWorking','','block');
    
      document.getElementById("bulkzoom_toolbox").style.display = "";
      thumbnailEXIFArray = imageIDs.slice(0);
      getThumbnailEXIF();
    }
    
    function maskThumbnails(objThumbnail, j)
    {
      re1 = /\/gallery\/\d+\/\d+\/(\d+)/
      re2 = /javascript\:openLB\(([0-9]+),/;
    
      divTag = document.getElementById("thumbnails") ? document.getElementById("thumbnails") : document.getElementById("photos");
    
      if (divTag)
      {
        divTags = divTag.getElementsByTagName("div");
    
        for (i=0; i<divTags.length; i++)
        {
          if (divTags[i].className == "photo")
          {
            if (re1.test(divTags[i].innerHTML))
              re1.exec(divTags[i].innerHTML);
            else
            {
              if (re2.test(divTags[i].innerHTML))
                re2.exec(divTags[i].innerHTML);
              else
                continue;
            }
    
            thumbnailId = RegExp.$1;
            aTags = divTags[i].getElementsByTagName("a");
            imgTags = aTags[0].getElementsByTagName("img");
    
            if (objThumbnail.thumbnailId == thumbnailId)
            {
              maskedDiv = document.createElement("div");
              maskedDiv.id = thumbnailId + "_masked";
              maskedDiv.className = j;
              maskedDiv.style.cssText = "position: relative; background: transparent url('" + webServer+"/photos/toolthumbs.mg?tool=cropmask&Size=Small&ImageID="+ thumbnailId + "') no-repeat; width: " + objThumbnail.imgWidth + "px; height: " + objThumbnail.imgHeight + "px; z-index: 1; margin:0px auto; text-align:left;";
    
              clearedDiv = document.createElement("div");
              clearedDiv.id = thumbnailId + "_cleared";
              clearedDiv.className = j;
              clearedDiv.style.cssText = "position: absolute; background: url('" + webServer+"/photos/"+ thumbnailId + "-S" + objThumbnail.modifier + ".jpg') no-repeat; width: " + objThumbnail.imgWidth + "px; height: " + objThumbnail.imgHeight + "px; z-index: 2; clip:rect(0px," + objThumbnail.imgWidth + "px," + objThumbnail.imgHeight + "px,0px);";
    
              maskedDiv.appendChild(clearedDiv);
    
              cropboxDiv = document.createElement("div");
              cropboxDiv.id = thumbnailId + "_cropbox";
              cropboxDiv.className = j;
              cropboxDiv.style.cssText = "position: absolute; left: 0px; top: 0px; width: " + (objThumbnail.imgWidth-4) + "px; height: " + (objThumbnail.imgHeight-4) + "px; border: solid 2px blue; z-index: 3; cursor: move";
              addEvent(cropboxDiv, "mousedown", testMouseBulk);
              clearedDiv.appendChild(cropboxDiv);
    
              ratioboxDiv = document.createElement("div");
              ratioboxDiv.id = thumbnailId + "_ratiobox";
              ratioboxDiv.className = j;
              ratioboxDiv.style.cssText = "position: absolute; bottom: 0px; right: 0px; width: 25px; height: 25px; border-top: solid 2px blue; border-left: solid 2px blue;  cursor: pointer; cursor: hand; z-index: 4;";
              addEvent(ratioboxDiv, "mousedown", testZoomBulk); 
              cropboxDiv.appendChild(ratioboxDiv);
              
              divTags[i].replaceChild(maskedDiv, aTags[0]);
              divTags[i].style.width = objThumbnail.imgWidth + "px";
              divTags[i].style.height = objThumbnail.imgHeight + "px";
            }
          }
        }
      } 
    }
    
    function getThumbnailEXIF()
    {
      var thumbnail = thumbnailEXIFArray.pop();
    
      if (thumbnail)
      {
        postArray = new Array();
        postArray['tool'] = 'lightBoxImage';
        postArray['ImageID'] = thumbnail;
        postArray['size'] = 'Original';
        postArray['pageType'] = pageType;
        postArray['pageTypeDetails'] = pageTypeDetails;
        postArray['siteUser'] = siteUser;
        ajax_query(processThumbnailEXIF, webServer+'/hack/RPC/gallery.mg', postArray, true);
        window.setTimeout(getThumbnailEXIF, 100);
      }
      else
      {
        toggleDIV('','ajaxWorking','block');
    
        if (isClass("loggedIn"))
          document.getElementById("bulkSave").disabled = false;
      }
    
    }
    
    function processThumbnailEXIF(response)
    {
      re = /\/photos\/(\d+)\-(O|L|M|S)(\-\d+)?\.jpg[\s\S]+,(\d+),(\d+),(false|true)/;
    
      response = URLDecode(response);
      re.exec(response);
    
      if (RegExp.$2 != "O")
      {
        toggleDIV('','ajaxWorking','block');
        alert("Error: bulk zoom thumbnail requires access to originals.\n\"" + RegExp.$1 + "\" \"" + RegExp.$2 + "\" \"" + RegExp.$4 + "\" \"" + RegExp.$5 + "\"");
        return;
      }
      sThumbnailId = RegExp.$1;
      sThumbnailModifier = RegExp.$3;
      imgWidth = parseInt(RegExp.$4);
      imgHeight = parseInt(RegExp.$5);
    
      temp = new Array();
      thumbnailArray[thumbnailArray.length] = temp;
      thumbnailArray[thumbnailArray.length-1].thumbnailId = sThumbnailId;
      thumbnailArray[thumbnailArray.length-1].modifier = sThumbnailModifier;
    
      if (imgWidth < imgHeight)
      {
        thumbnailArray[thumbnailArray.length-1].imgHeight = 300;
        thumbnailArray[thumbnailArray.length-1].imgWidth = Math.round((imgWidth / imgHeight) * 300);
      }
      else
      {
        thumbnailArray[thumbnailArray.length-1].imgWidth = 400;
        thumbnailArray[thumbnailArray.length-1].imgHeight = Math.round((imgHeight / imgWidth) * 400);
      }
    
      thumbnailArray[thumbnailArray.length-1].ratio = 0;
      thumbnailArray[thumbnailArray.length-1].invRatio = 0;
      thumbnailArray[thumbnailArray.length-1].marginTop = 0;
      thumbnailArray[thumbnailArray.length-1].marginLeft = 0;
      thumbnailArray[thumbnailArray.length-1].cropHeight = thumbnailArray[thumbnailArray.length-1].imgHeight;
      thumbnailArray[thumbnailArray.length-1].cropWidth = thumbnailArray[thumbnailArray.length-1].imgWidth;
      thumbnailArray[thumbnailArray.length-1].oRatio = (imgWidth / thumbnailArray[thumbnailArray.length-1].imgWidth);
      thumbnailArray[thumbnailArray.length-1].cropDiff = 0;
    
      maskThumbnails(thumbnailArray[thumbnailArray.length-1], thumbnailArray.length-1);
      //getThumbnailEXIF();
    }
    
    function zoomThumbnails()
    {
      if (!thumbnailItem)
      {
        thumbnailItem = 0;
        thumbnailCount = thumbnailArray.length;
      }
    
      var thumbnail = thumbnailArray.pop();
      
      if (thumbnail)
      {
        thumbnailItem++; 
    
        postArray = new Array();
        postArray['tool'] = 'newthumb';
        postArray['ImageID'] = thumbnail.thumbnailId;
        postArray['action'] = "doit";
        postArray['crop_h'] = Math.round(parseInt(thumbnail.cropHeight) * parseFloat(thumbnail.oRatio));
        postArray['crop_w'] = Math.round(parseInt(thumbnail.cropWidth) * parseFloat(thumbnail.oRatio));
        postArray['crop_x'] = Math.round(parseInt(thumbnail.marginLeft) * parseFloat(thumbnail.oRatio));
        postArray['crop_y'] = Math.round(parseInt(thumbnail.marginTop) * parseFloat(thumbnail.oRatio));
    
        reqIncrement ++;
        updateAjaxStatus();
        window.setTimeout('ajax_query(thumbReqHandler, webServer+\'\/photos\/tools.mg\', postArray, true, true);', 10);
        window.setTimeout(zoomThumbnails, 50);
      } 
    }
    
    
    function thumbReqHandler() {
      updateAjaxStatus();
    
      reqIncrement--;
    
      if (thumbnailArray.length == 0 && reqIncrement == 0) {
          window.location = window.location;
      }
    }
    
    function updateAjaxStatus(sStr) {
    var ajx = document.getElementById("ajaxWorking");
    
      if (thumbnailArray.length == 0)
        ajx.innerHTML =  'Processing thumbnail ' + (thumbnailCount - reqIncrement + 1) + ' of ' + thumbnailCount;
      else
        ajx.innerHTML = 'Sending request ' + reqIncrement + ' of ' + thumbnailCount;
    
    
      if (sStr) {
        ajx.innerHTML = ajx.innerHTML + sStr;
      }
    
      toggleDIV('ajaxWorking','','block');
    }
    
    var smallestBulk = 75;   
    var mouseXBulk = 0;
    var mouseYBulk = 0;
    var mouseToolBulk = "move";
    var hideRatioBulk = false;    
    var scaleBulk = 1;
    var pageLoadedBulk = false;
    
    function onStartBulk()
    {
      pageLoadedBulk = true;
    }        
    
    function moveBulk(X,Y,e)
    {
      if (pageLoadedBulk == true)
      {
        try
        {
          var objClass;
    
          if (e.srcElement)
            objClass = e.srcElement.className
          else
            objClass = e.target.className
    
          X = X*scaleBulk;
          Y = Y*scaleBulk;
          newLeft = thumbnailArray[objClass].marginLeft+X;
          newTop = thumbnailArray[objClass].marginTop+Y;                                
          stopX = thumbnailArray[objClass].imgWidth-thumbnailArray[objClass].cropWidth;
          stopY = thumbnailArray[objClass].imgHeight-thumbnailArray[objClass].cropHeight;
    
          if (newLeft < 0)
            newLeft = 0;
    
          if (newLeft > stopX)
            newLeft = stopX;
    
          if (newTop < 0)
            newTop = 0;
    
          if (newTop > stopY)
            newTop = stopY;
    
          thumbnailArray[objClass].marginLeft = newLeft;
          thumbnailArray[objClass].marginTop = newTop;
          if (e.srcElement)
            objNode = e.srcElement;
          else
            objNode = e.target;
          while (objNode.id != thumbnailArray[objClass].thumbnailId + "_cropbox")
            objNode = objNode.parentNode;
    
          updateCropBulk(objNode);
        }
        catch(e) {}
      }
      else
      {
        window.alert("Page loading, please wait.");
      }
    }        
    
    function zoomBulk(X,Y,e)
    {
      if (pageLoadedBulk == true)
      {
        try
        {
          var objClass;
    
          if (e.srcElement)
            objClass = e.srcElement.className
          else
            objClass = e.target.className                
    
          if (thumbnailArray[objClass].ratio == 0)
          {
            Xadj = thumbnailArray[objClass].cropWidth+(X*scaleBulk);
            Yadj = thumbnailArray[objClass].cropHeight+(Y*scaleBulk);
          }
          else
          {
            Xadj = 0;
            Yadj = 0;
          }
    
          newWidth = thumbnailArray[objClass].cropWidth+(X*scaleBulk);
          newHeight = Math.round(newWidth*thumbnailArray[objClass].ratio)+Yadj;
    
          if (newWidth < smallestBulk)
          {
            newWidth = smallestBulk;
            newHeight = Math.round(newWidth*thumbnailArray[objClass].ratio)+Yadj;
          }
    
          if (newHeight < smallestBulk)
          {
            newHeight = smallestBulk;
            newWidth = Math.round(newHeight*thumbnailArray[objClass].invRatio)+Xadj;
          } 
    
          if (newWidth+thumbnailArray[objClass].marginLeft > thumbnailArray[objClass].imgWidth)
          {
            newWidth = thumbnailArray[objClass].imgWidth-thumbnailArray[objClass].marginLeft;
            newHeight = Math.round(newWidth*thumbnailArray[objClass].ratio)+Yadj;
          } 
    
          if (newHeight+thumbnailArray[objClass].marginTop > thumbnailArray[objClass].imgHeight)
          {
            newHeight = thumbnailArray[objClass].imgHeight-thumbnailArray[objClass].marginTop;
            newWidth = Math.round(newHeight*thumbnailArray[objClass].invRatio)+Xadj;
          }                
    
          thumbnailArray[objClass].cropWidth = newWidth;
          thumbnailArray[objClass].cropHeight = newHeight;
     
          if (e.srcElement)
            objNode = e.srcElement;
          else
            objNode = e.target;
    
          while (objNode.id != thumbnailArray[objClass].thumbnailId + "_cropbox")
            objNode = objNode.parentNode;
    
          updateCropBulk(objNode);
        }
        catch(e) {}
        
      }
      else
      {
        window.alert("Page loading, please wait.");
      }
    }        
    
    function changeRatioBulk(newRatios)
    {
      if (pageLoadedBulk == true)
      {
        newRatio = newRatios.split(",");
    
        for (i=0; i<thumbnailArray.length; i++)
        {
          if (thumbnailArray[i].imgHeight > thumbnailArray[i].imgWidth)
          {
            thumbnailArray[i].ratio = newRatio[1];
            thumbnailArray[i].invRatio = newRatio[0];
          }
          else
          {
            thumbnailArray[i].ratio = newRatio[0];
            thumbnailArray[i].invRatio = newRatio[1];
          }
    
          if (thumbnailArray[i].ratio == 0)
          {
            document.getElementById('customRatio').style.display = "none";
            thumbnailArray[i].marginTop = 0;
            thumbnailArray[i].marginLeft = 0;
            thumbnailArray[i].cropHeight = thumbnailArray[i].imgHeight;
            thumbnailArray[i].cropWidth = thumbnailArray[i].imgWidth;
          }
          else
          {
            if (newRatios == "custom")
            {
              thumbnailArray[i].ratio = document.cropTool.ratioH.value/document.cropTool.ratioW.value;
              thumbnailArray[i].invRatio = document.cropTool.ratioW.value/document.cropTool.ratioH.value;
              document.getElementById('customRatio').style.display = "block";
            }
            else
              document.getElementById('customRatio').style.display = "none";
    
            thumbnailArray[i].cropWidth = Math.round(1*thumbnailArray[i].imgWidth);
    
            thumbnailArray[i].cropHeight = Math.round(thumbnailArray[i].cropWidth*thumbnailArray[i].ratio);        
    
            if ((thumbnailArray[i].cropHeight > thumbnailArray[i].imgHeight)||(thumbnailArray[i].cropWidth > thumbnailArray[i].imgWidth))
            {
              thumbnailArray[i].cropHeight = thumbnailArray[i].imgHeight;  
              thumbnailArray[i].cropWidth = Math.round(thumbnailArray[i].cropHeight*thumbnailArray[i].invRatio);
            }   
    
            thumbnailArray[i].marginTop = ((thumbnailArray[i].imgHeight-thumbnailArray[i].cropHeight)/2);
            thumbnailArray[i].marginLeft = ((thumbnailArray[i].imgWidth-thumbnailArray[i].cropWidth)/2);
          }
    
          updateCropBulk(document.getElementById(thumbnailArray[i].thumbnailId + "_cropbox"));
        }
      }
      else
      {
         window.alert("Page loading, please wait.");
      }
    }        
    
    function rotateBulk()
    {
      if (pageLoadedBulk == true)
      {
        for (i=0; i<thumbnailArray.length; i++)
        {
          if (thumbnailArray[objClass].ratio == 0)
          {
            Xadj = thumbnailArray[i].cropHeight;
            Yadj = thumbnailArray[i].cropWidth;
          }
          else
          {
            Xadj = 0;
            Yadj = 0;
          }
    
          temp = thumbnailArray[objClass].invRatio;
          thumbnailArray[objClass].invRatio = thumbnailArray[objClass].ratio;
          thumbnailArray[objClass].ratio = temp;
          temp = thumbnailArray[i].cropWidth;
          thumbnailArray[i].cropWidth = thumbnailArray[i].cropHeight;
          thumbnailArray[i].cropHeight = temp;  
    
          if (thumbnailArray[i].cropWidth+thumbnailArray[i].marginLeft > thumbnailArray[i].imgWidth)
          {
            thumbnailArray[i].marginLeft = thumbnailArray[i].imgWidth-thumbnailArray[i].cropWidth;
    
            if (thumbnailArray[i].marginLeft < 0)
            {
              thumbnailArray[i].marginLeft = 0;
              thumbnailArray[i].cropWidth = thumbnailArray[i].imgWidth-thumbnailArray[i].marginLeft;
              thumbnailArray[i].cropHeight = Math.round(thumbnailArray[i].cropWidth*thumbnailArray[objClass].ratio)+Yadj;                        
            }
          } 
    
          if (thumbnailArray[i].cropHeight+thumbnailArray[i].marginTop > thumbnailArray[i].imgHeight)
          {
            thumbnailArray[i].marginTop = thumbnailArray[i].imgHeight-thumbnailArray[i].cropHeight;
    
            if (thumbnailArray[i].marginTop < 0)
            {
              thumbnailArray[i].marginTop = 0;
              thumbnailArray[i].cropHeight = thumbnailArray[i].imgHeight-thumbnailArray[i].marginTop;
              thumbnailArray[i].cropWidth = Math.round(thumbnailArray[i].cropHeight*thumbnailArray[objClass].invRatio)+Xadj;
            }
          }
    
          if (hideRatioBulk != true)
          {
            //temp = document.cropTool.ratioH.value
            //document.cropTool.ratioH.value = document.cropTool.ratioW.value;
            //document.cropTool.ratioW.value = temp;
          }
    
          updateCropBulk(document.getElementById(thumbnailArray[i].thumbnailId + "_cropbox"));
        }
      }
      else
    
        window.alert("Page loading, please wait.");
    }        
    
    function updateCropBulk(e)
    {
      objClass = e.className;
      e.parentNode.style.clip = "rect("+thumbnailArray[objClass].marginTop+"px "+(thumbnailArray[objClass].marginLeft+thumbnailArray[objClass].cropWidth)+"px "+(thumbnailArray[objClass].marginTop+thumbnailArray[objClass].cropHeight)+"px "+thumbnailArray[objClass].marginLeft+"px)";
      e.style.top = thumbnailArray[objClass].marginTop+"px";
      e.style.left = thumbnailArray[objClass].marginLeft+"px";
      e.style.width = thumbnailArray[objClass].cropWidth-thumbnailArray[objClass].cropDiff+"px";
      e.style.height = thumbnailArray[objClass].cropHeight-thumbnailArray[objClass].cropDiff+"px";
    }        
    
    function mouseMoveBulk(e)
    {
      if (!e) var e = window.event;
    
      var objClass
    
      if (e.srcElement)
          objClass = e.srcElement.className;
        else
          objClass = e.target.className;
    
      if (lookMouse)
      {
        tempX = mouseXBulk;
        tempY = mouseYBulk;
        mouseXBulk = e.clientX;
        mouseYBulk = e.clientY;
        x = mouseXBulk-tempX;
        y = mouseYBulk-tempY;
    
        if (mouseToolBulk == "zoom")
        {
          if (thumbnailArray[objClass].ratio == 0)
            zoomBulk(x,y,e);
          else
            zoomBulk(x,0,e);
        }
        else
          moveBulk(x,y,e)
      }
    }
    
    function testMouseBulk(e)
    {
      state = true;
      if (!e) var e = window.event;
    
      if (mouseToolBulk != "zoom")
      {
        lookMouse = state;
    
        if (state == true)
        {
          mouseToolBulk = "move";
          mouseXBulk = e.clientX;
          mouseYBulk = e.clientY;
          document.onmousemove = mouseMoveBulk;
        }
      }
    }
    
    function testZoomBulk(e)
    {
      state=true;
      if (!e) var e = window.event;
    
      lookMouse = state;
      if (state == true)
      {	            
        mouseToolBulk = "zoom"
        mouseXBulk = e.clientX;
        mouseYBulk = e.clientY;
        document.onmousemove = mouseMoveBulk;
      }
    }
    
    function cancelMouse()
    {
      mouseToolBulk = "move";
      lookMouse = false;
    }
    
    document.onmouseup = cancelMouse;
    
    function isClass(sClass) {
      sClassName = document.body.className;
    
      re = new RegExp(sClass + "( |$)") 
    
      if (!sClassName)
        return false;
      return re.test(sClassName);
    }
    
    
    Moderator Emeritus
    Dgrin FAQ | Me | Workshops
  • cmasoncmason Registered Users Posts: 2,506 Major grins
    edited January 21, 2007
    Thanks, DavidTO. I replaced the code in the Javascript box with that above...but still no Bulk zoom thumbnail button or whatever.

    Exactly *what* am I looking for? Is it a button, or a check box, or something on the pull down menu? It isn't really clear how I get this to *work*. The regular zoom thumbnail is a selection on the 'photo tools' pull down...am I supposed to choose that?
  • DavidTODavidTO Registered Users, Retired Mod Posts: 19,160 Major grins
    edited January 21, 2007
    cmason wrote:
    Thanks, DavidTO. I replaced the code in the Javascript box with that above...but still no Bulk zoom thumbnail button or whatever.

    Exactly *what* am I looking for? Is it a button, or a check box, or something on the pull down menu? It isn't really clear how I get this to *work*. The regular zoom thumbnail is a selection on the 'photo tools' pull down...am I supposed to choose that?
    <divtags.length; i=""><thumbnailarray.length; i=""><thumbnailarray.length; i=""> </thumbnailarray.length;></thumbnailarray.length;></divtags.length;>


    It'll be next to the arrange check box.
    Moderator Emeritus
    Dgrin FAQ | Me | Workshops
  • cmasoncmason Registered Users Posts: 2,506 Major grins
    edited January 21, 2007
    Thanks! I understand...and I have only the 'arrange box". Checked in FF and IE6...no dice.

    Thanks for your help!
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 21, 2007
    cmason wrote:
    Thanks! I understand...and I have only the 'arrange box". Checked in FF and IE6...no dice.

    Thanks for your help!

    check the original post, i have included a link back to my server while the code on the wiki is still borked,
    David Parry
    SmugMug API Developer
    My Photos
  • cmasoncmason Registered Users Posts: 2,506 Major grins
    edited January 21, 2007
    devbobo wrote:
    check the original post, i have included a link back to my server while the code on the wiki is still borked,

    That was the trick...Thanks Guys!!!
  • greenpeagreenpea Registered Users Posts: 880 Major grins
    edited January 23, 2007
    The new version of smugmug seems to have killed the bulk zoom thumbnailer for me.

    I was trying to use it on this gallery http://initialphotography.smugmug.com/gallery/2384672

    I get the little bulk zoom thumbnail control box in the upper left hand corner, then it says its loading, loading disapears, but my images pop up for setting the thumbnail.

    The comments in my javascript say that I'm using v2.4.

    EDIT:
    Oh, and I was using IE7. I will try with FF.

    EDIT EDIT:
    No luck with FF either.
    Andrew
    initialphotography.smugmug.com

    "The camera is an instrument that teaches people how to see without a camera" - Dorothea Lange
  • DoctorItDoctorIt Administrators Posts: 11,951 moderator
    edited January 23, 2007
    greenpea wrote:
    The new version of smugmug seems to have killed the bulk zoom thumbnailer for me.
    there must be something more to it than just the new hotness - I was using it just fine last night. ne_nau.gif
    Erik
    moderator of: The Flea Market [ guidelines ]


  • DavidTODavidTO Registered Users, Retired Mod Posts: 19,160 Major grins
    edited January 23, 2007
    greenpea wrote:
    The new version of smugmug seems to have killed the bulk zoom thumbnailer for me.

    I was trying to use it on this gallery http://initialphotography.smugmug.com/gallery/2384672

    I get the little bulk zoom thumbnail control box in the upper left hand corner, then it says its loading, loading disapears, but my images pop up for setting the thumbnail.

    The comments in my javascript say that I'm using v2.4.

    EDIT:
    Oh, and I was using IE7. I will try with FF.

    EDIT EDIT:
    No luck with FF either.

    Was it working before on your site? The code on the Wiki is not working for some weird, arcane, technical reason.
    Moderator Emeritus
    Dgrin FAQ | Me | Workshops
  • DoctorItDoctorIt Administrators Posts: 11,951 moderator
    edited January 23, 2007
    DavidTO wrote:
    Was it working before on your site? The code on the Wiki is not working for some weird, arcane, technical reason.
    the b0rk on the wiki is different from what gp is describing on his site. at least for me, it wouldn't load at all and b0rked other things.
    Erik
    moderator of: The Flea Market [ guidelines ]


  • greenpeagreenpea Registered Users Posts: 880 Major grins
    edited January 23, 2007
    DavidTO wrote:
    Was it working before on your site? The code on the Wiki is not working for some weird, arcane, technical reason.

    I am using some pretty old (pre-wiki) code. It says v2.4 which appears to be the latest and greatest version #.

    BTW. I manually zoom thumbnailed the gallery I referred to in my original post...and now I REALLY miss the BZT.

    But, just to be clear, no one else is having problems with the BZT since the big upgrade? If that's the case, I'll do a diff on my code vs. the latest (non-wiki code) just to make sure I'm up to date with the rest of the crowd.
    Andrew
    initialphotography.smugmug.com

    "The camera is an instrument that teaches people how to see without a camera" - Dorothea Lange
  • cmasoncmason Registered Users Posts: 2,506 Major grins
    edited January 23, 2007
    Just checked Greenpea, and my BZT works just fine post update. Note that I had to use the code posted on devbobo's own server, referenced in the first post.
  • greenpeagreenpea Registered Users Posts: 880 Major grins
    edited January 23, 2007
    I confirmed that the code I have is exactly (letter for letter) the same as the code that is here http://hacks.introversion.com.au/smugmug/bulkzoomthumbs/

    I also tested it out on another gallery...and still no luck.

    I've had the BZT fail on me before, but that was usually when I had originals turned off, however I've never had the BZT fail on me like this, where I don't get an error message or anything.
    Andrew
    initialphotography.smugmug.com

    "The camera is an instrument that teaches people how to see without a camera" - Dorothea Lange
  • digitalpinsdigitalpins Registered Users Posts: 448 Major grins
    edited January 23, 2007
    same problem here since the new update the bulk zoom does not work at all. I cannot get the images to load once I click bulkzoom

    I even recopied and pasted in the bulkzoom code again and still does not work
    www.lamontphotography.com
    Canon 60D
    Canon Rebel XTi (400)
    Canon 10-22mm, Canon 50mm f/1.8 II
    MacBook, MacPro
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 23, 2007
    Hey Guys,

    I will check it out and report back when i get a chance.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • PezpixPezpix Registered Users Posts: 391 Major grins
    edited January 23, 2007
    I am also experiencing errors in the bulk zoom. It hasnt been working since the new interface change in my FF and IE6 (I dont have IE7 installed).
    Professional Ancient Smugmug Shutter Geek
    Master Of Sushi Noms
    Amateur CSS Dork
  • brandofamilybrandofamily Registered Users Posts: 2,013 Major grins
    edited January 24, 2007
    here's a little ray of hope... My BZT works fine...clap.gif version 2.4
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 28, 2007
    Released v2.5, works for smugmug, traditional, all thumbs
    David Parry
    SmugMug API Developer
    My Photos
  • greenpeagreenpea Registered Users Posts: 880 Major grins
    edited January 28, 2007
    devbobo wrote:
    Released v2.5, works for smugmug, traditional, all thumbs

    Fix confirmed!!! David YOU ROCK!!! clap.gifclap.gifclap.gif

    I didn't realize how much I had come to rely on your hack until it stopped working for me. It is really tedious zoom thumbnailing 100 images in a gallery. rolleyes1.gif

    Thank you! wings.gif
    Andrew
    initialphotography.smugmug.com

    "The camera is an instrument that teaches people how to see without a camera" - Dorothea Lange
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 29, 2007
    greenpea wrote:
    Fix confirmed!!! David YOU ROCK!!! clap.gifclap.gifclap.gif

    I didn't realize how much I had come to rely on your hack until it stopped working for me. It is really tedious zoom thumbnailing 100 images in a gallery. rolleyes1.gif

    Thank you! wings.gif

    well, sounds like it's your shout at the shootout then :D

    beer.gif
    David Parry
    SmugMug API Developer
    My Photos
  • greenpeagreenpea Registered Users Posts: 880 Major grins
    edited January 29, 2007
    devbobo wrote:
    well, sounds like it's your shout at the shootout then :D

    beer.gif

    You definately got a round on me!
    Andrew
    initialphotography.smugmug.com

    "The camera is an instrument that teaches people how to see without a camera" - Dorothea Lange
  • PezpixPezpix Registered Users Posts: 391 Major grins
    edited January 29, 2007
    Thanks Dev! Have a cookie for the fantastic fix!

    attachment.php?attachmentid=13710&stc=1&d=1152558860


    I do still have a bit of an issue with a couple of galleries not working with the code though. Any suggestions on what it could possibly be? Could it be that some existing galleries end up with a bug in their individual page code?

    Anyway, mucho gracias for the fix bro!
    Professional Ancient Smugmug Shutter Geek
    Master Of Sushi Noms
    Amateur CSS Dork
  • PezpixPezpix Registered Users Posts: 391 Major grins
    edited January 29, 2007
    Ack! Still having some issues with this. I've upgraded all the code, but its still wishy-washy on some of my pages. It seems to run just fine on the first page of my thumbnails under the Smugmug style, but the following pages after that arent working with it? Ack!
    Professional Ancient Smugmug Shutter Geek
    Master Of Sushi Noms
    Amateur CSS Dork
  • greenpeagreenpea Registered Users Posts: 880 Major grins
    edited January 29, 2007
    Pezpix wrote:
    Ack! Still having some issues with this. I've upgraded all the code, but its still wishy-washy on some of my pages. It seems to run just fine on the first page of my thumbnails under the Smugmug style, but the following pages after that arent working with it? Ack!

    I ran into the same problem, but I think I know why its happening, and I found a work around.

    In the old smugmug you would go to a gallery and see a URL like this
    http://initialphotography.smugmug.com/gallery/1934760

    then if you went though different pages in that gallery it would tack the page number to the end of your URL like this...
    http://initialphotography.smugmug.com/gallery/1934760/2
    http://initialphotography.smugmug.com/gallery/1934760/3
    ...and so on

    Now if you visit the various ajax-edified pages your URL changes like this
    http://initialphotography.smugmug.com/gallery/1934760#P-2-15
    http://initialphotography.smugmug.com/gallery/1934760#P-3-15
    http://initialphotography.smugmug.com/gallery/1934760#P-4-15
    (note that the page number is defined by the #P- bit at the end of the URL, I think that is causing the BZT problems).

    Now for the workaround (at least it worked for me): Use the old URL style, which is still supported. If you want to use the BZT on the second page of a gallery physically change the URL in your address bar from this...
    http://initialphotography.smugmug.com/gallery/1934760#P-2-15

    to this...
    http://initialphotography.smugmug.com/gallery/1934760/2

    and the BZT will work. Its a little extra work, but a lot less work that manually zoom thumbnailing your pics.
    Andrew
    initialphotography.smugmug.com

    "The camera is an instrument that teaches people how to see without a camera" - Dorothea Lange
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 29, 2007
    Pezpix wrote:
    Ack! Still having some issues with this. I've upgraded all the code, but its still wishy-washy on some of my pages. It seems to run just fine on the first page of my thumbnails under the Smugmug style, but the following pages after that arent working with it? Ack!
    yeah it looks like a minor oversight on my part...sorry :D
    I should be pretty straightforward to fix.

    Thanks for the detail post, GreenPea thumb.gif
    David Parry
    SmugMug API Developer
    My Photos
  • brandofamilybrandofamily Registered Users Posts: 2,013 Major grins
    edited January 29, 2007
    devbobo wrote:
    yeah it looks like a minor oversight on my part...sorry :D
    I should be pretty straightforward to fix.

    Thanks for the detail post, GreenPea thumb.gif
    problems... tried adding new version (not sure why since old code was working) and I lost the slide show(s) and I have 2 BZT in my nav bar...
    Help...
This discussion has been closed.