1.44 build 177
Please rate DAlbum at HotScripts.com
Please rate DAlbum at @ PHP-Resource.de
Rate DAlbum @ The PHP Resource Index
Script Rating:
Modify folder thumbnail graphics   

The purpose of this sample is customize graphics displayed around image and folder thumbnails on index page.

By default a yellow folder image is displayed for album folders and no graphics displayed around image thumbnails. This can be completely and easily customized as described below.

Please check demo for an example. You also can download example set of graphics files and code snippets used in this demo.

Instructions

1. Create your own folder graphics in a graphics editor and split it into nine separate files:

Save these files as i_nw.gif,i_n.gif, i_ne.gif, ... , s_se.gif, blank.gif into a folder.

2. Edit you custom.php and add the customGetFolderBorders function. Modify locations and resolutions of the produced images accordingly.

 function customGetFolderBorders(&$album,&$fg,$nThmX,$nThmY)
{
   global 
$g_sThumbnailXSize,$g_sThumbnailYSize;

   
// Images in format array('URL',width,height);
   
$fg['blank']=array('custimg/bluef/bf_blank.gif',30,8);
   
$fg['nw']=array('custimg/bluef/bf_nw.gif',69,25);
   
$fg['n']=array('custimg/bluef/bf_n.gif',5,25);
   
$fg['ne']=array('custimg/bluef/bf_ne.gif',18,25);
   
$fg['w']=array('custimg/bluef/bf_w.gif',8,8);
   
$fg['e']=array('custimg/bluef/bf_e.gif',12,8);
   
$fg['sw']=array('custimg/bluef/bf_sw.gif',20,14);
   
$fg['s']=array('custimg/bluef/bf_s.gif',6,14);
   
$fg['se']=array('custimg/bluef/bf_se.gif',16,14);

   
// border around image (defined in CSS as a.fldlink .folderthumb)
   
$fg['borderx']=1;
   
$fg['bordery']=1;

   
// ensure that all folders have the same size
   
$fg['sizex']=$g_sThumbnailXSize+35;
   
$fg['sizey']=$g_sThumbnailYSize+35;

   
// return true to force DAlbum to use specified images
   
return true;
}

3. Edit your custom.css and add the following style:

  a.fldlink .folderthumb
{
    border: 1px inset #003366;
}

4. Folder thumbnail is completed! Image thumbnails can be created following the same procedure. The only difference is that function name at step 2 will be customGetImageBorders, and style name at step 3 - a.imglink .imagethumb.