MyJavascripts : Multiple Picture Album Browser

Description:
Using only two pages this script allows you to display hundreds of thumbnail-albums with thousands of fullsize-pictures.


Action:
  • To see a live working version with pictures & download files, surf to 3DDable.
  • save both files (my_album.htm & my_foto.htm) on your drive and have a look at the source.
    You will see how to set the links to change to another album or another year.
Some rules -sine qua non-:
  1. you must use structured filenames for the pictures and the thumbnails: AA2001-12.jpg, LC2000-103.gif
  2. if using frames, both pages will/must load in the same frame
Instructions:
  1. The filenames you will use for both files should be set at the top of both scripts, you can use copy-paste except maybe for the PageOnError -if you leave ErrorHandling on-.
  2. With PathImg you set the path to the image folder (can be relativ or absolute).
  3. The fullsize pictures should be saved as for example AA2000-1.gif and its thumbnail as AA2000-1t.gif.
    So : two letters (for the happening/album) followed by the year then a minus sign then the serial number of that picture, 1 and not 001. There is no limit to the serial number.
  4. The first picture for happening AB from 2000 should be AB2000-1.jpg/gif and not AB2000-0.jpg/gif and it doesn't have to be a multiple of the amount of thumbnails on one page.
  5. If all the thumbnails are the same size set it with ThumbWidth and ThumbHeight, if you are using various size (which looks messy and unprofessional) set them as "" (empty not null or undefined). No size-settings for the fullsize pictures.
  6. The amount of thumbnails shown on one page is determined by ThumbRows and ThumbCols.
  7. In switch (curPageType) the amount of pictures for each seperate happening and each seperate year (if several years for one certain happening) are set. These settings in the PageAlbum-file can be copied to the PageOneFoto-file. If you add a happening/album you must adjust the variables on both pages. If adding a year or pictures (CurFotoCnt) to an existing happening/album only the PageAlbum-file setting must be adjusted.
  8. With lastYear I refer to the most recent year you have pictures for album AA, that is the default album.
  9. If you need more then 676 albums (676 = 26 x 26)there are some changes to make.
    Let's say you need 1000 albums -so you must save with 3 letters: AAB2000-1.jpg, allowing 26x26x26 = 17576 albums- then you add up 1 to each number, except the zero.
    This applies to the following variables:
    var curPageType = curPageIndex.substring(0,2);
    var curPageYear = curPageIndex.substring(2,6);
    var curPageNr = eval(curPageIndex.substring(7,curPageIndex.length));
    and also replace the AA by AAA as such:
    if ( curPageIndex == "" || curPageIndex.length <8 ) curPageIndex = "AAA" + lastYear + "-0";
  10. Use of the 'pageindex' (the letters) is free, no order is needed. But AA (or AAA if using 3 letters) must exist.
  11. errorHandling is on. To turn it off simply kill the following lines as shown :
    // location = PageOnError;
    // return true; //no error message

Your life has just been made easier by Guinness