Explorer Layout

Last post 03-01-2010, 10:24 PM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  02-28-2010, 10:50 PM 59048

    Explorer Layout

    Is it somehow possible to show a random image from inside the folder as the folder icon instead of the picture of a folder.  We want the images to be organized by category like you have in the Explorer view, but the picture of the folder is not great for the public side of the website.  Otherwise, the evaluation seems to be working great.
  •  03-01-2010, 4:13 AM 59051 in reply to 59048

    Re: Explorer Layout

    Hi wescomputer,
     
    1. Open file "CuteSoft_Client\Gallery\Layout\Explorer\Code.js".
     
    2. Find section below
     
    1. if(!this._selectedcategory)   
    2.     {   
    3.         this.dng_btn_up.style.display="none";   
    4.         this.Browser.FindElement("dng_path").innerHTML="/";   
    5.         var folderthumb=this.Browser.GetTheme("Images/directory-thumbnail.png");   
    6.         for(var i=0;i<this._categories.length;i++)   
    7.         {   
    8.             var c=this._categories[i];   
    9.             var div=this.CreateItemDiv(c,null,(c.Title||GalleryLocalize.DEFAULTCATEGORYNAME)+" ("+c.Photos.length+")",folderthumb,128,128);   
    10.             this.AttachItemEvent(container.appendChild(div));   
    11.         }   
    12.     }  
    3. Change to
    1. if(!this._selectedcategory)   
    2.     {   
    3.         this.dng_btn_up.style.display="none";   
    4.         this.Browser.FindElement("dng_path").innerHTML="/";   
    5.         for(var i=0;i<this._categories.length;i++)   
    6.         {   
    7.             var c=this._categories[i];   
    8.             var folderthumb=this.Browser.GetTheme("Images/directory-thumbnail.png");   
    9.                
    10.             if(c.Photos.length!=0)   
    11.             {   
    12.             var div=this.CreateItemDiv(c,null,(c.Title||GalleryLocalize.DEFAULTCATEGORYNAME)+" ("+c.Photos.length+")",c.Photos[0].Thumbnail.substr((c.Photos[0].Thumbnail.indexOf("/",2)+1),c.Photos[0].Thumbnail.length),128,128);   
    13.             }   
    14.             else  
    15.             {   
    16.             var div=this.CreateItemDiv(c,null,(c.Title||GalleryLocalize.DEFAULTCATEGORYNAME)+" ("+c.Photos.length+")",folderthumb,128,128);   
    17.             }   
    18.             this.AttachItemEvent(container.appendChild(div));   
    19.         }   
    20.     }  
    Regards,
     
    Ken
  •  03-01-2010, 9:19 AM 59057 in reply to 59051

    Re: Explorer Layout

    Thanks for the quick reply.  I implemented the above code and it showed a red x where the image should be.
     
    I tried to alter
     
    var div=this.CreateItemDiv(c,null,(c.Title||GalleryLocalize.DEFAULTCATEGORYNAME)+" ("+c.Photos.length+")",c.Photos[0].Thumbnail.substr((c.Photos[0].Thumbnail.indexOf("/",2)+1),c.Photos[0].Thumbnail.length),128,128);
     
    to
     
    var div=this.CreateItemDiv(c,null,(c.Title||GalleryLocalize.DEFAULTCATEGORYNAME)+" ("+c.Photos.length+")",c.Photos[0].Thumbnail,128,128);
     
    and now the image is showing up, but the scaling is not correct so the picture looks very weird.  I must not have the code right.
     
    Thanks for any additional help you can provide.
  •  03-01-2010, 10:24 PM 59093 in reply to 59057

    Re: Explorer Layout

    Hi wescomputer,
     
    You can change 128,128. It si the width and height setting.
     
    Regards,
     
    Ken
View as RSS news feed in XML