Chameleon skin jAlbum Tutorials

A favorites album, and using slide comments to point to other albums

A large JAlbum with hundreds or thousands of image can overwhelm a visitor. Often, only parts of it are of interest to a specific set of viewers, ie Family or Friends sub-albums. One’s artistic images may well be missed by the casual browser!

In a prominent place (say, at the top, so it’s seen first), place a “Favourites“, “Best Of” or “My Selection” album …. a group of say 40-50 images that give a flavour of the site, something to whet the appetite and entice a visitor to explore further. To facilitate this, a slide comment link can be used to take the user directly to the folder where the image in question resides.

Comments handle embedded HTML links fairly well. If the albums are located in the folder structure,, etc, and the Favourites album is another sub-folder,, then the slide comments will exist in the Favourites’ slides folder,

If the comment is of the form:

<a href="../../Places/Malta/index.html">A Maltese Boat</a> 

where the ../../ points two levels up ( then these relative paths will work both locally, on the PC and on the uploaded album.

Clicking the comment will take the viewer to the relevant album, as required.

Unfortunately, there is a catch … using the “../../” construct will work from the Slide page but not from the Index page, which requires a “../” construct. The issue is that JAlbum does not allow the opportunity to have different comments for both the Index & Slide pages at the same time. A possible solution for an uploaded site is to use the form

<a href= "/xyz.html" > 

ie start from the root folder by using the “/” construct and work down … but that breaks the connection with the local album, which will likely have a different folder levels.

Different Comments for Index & Slide pages

In trying A Favourites Album, and Using Slide Comments to Point to other Albums the use of relative links has a problem …. the slide page comments are in the sub-folder slides html files, while the index page comments are in the parent folder html files. The “../../ ” works for the slides but not the index page (ie the thumbnails).

There are other occasions when it might be desirable to have different comments …maybe short ones for the index page, longer ones for the slide page.

A workaround to achieve, for example :

  • Linked comments from a “Favourites ” album, both for the Index and Slide pages, short & long ones respectively.
  • The “Favourites” album is intended to entice/encourage viewers to explore further, so it’s important to make that process relatively easy.

The method is to multi-pass (ie 2 album builds), once with Slide comments and once with Index comments , saving the relevant Slides output folder in-between. This folder then replaces the last build’s folder. A more efficient process is to process the “Favourites” album first . The outline is:

  1. Make the “Favourites” album. Use the normal project file, but point the input & output at the relevant location. The “Favourites” file contains the Slide (long) comments of the form:
    abc.jpg=<a href= "../../Folder 1/index.html" >
    Click to go the folder containing this image
  2. Rename the “Favourites” Slide folder in the output
  3. Build the entire album with the normal project file (which by default points at the top-level input & output folders), using a different “Favourites” file, containing the Index (short) comments of the form:
    abc.jpg=<a href= "../Folder 1/index.html" >Image Folder</a> 
  4. Delete the last created “Favourites” Slide folder in the output and replace with the saved/renamed version.

All this is best done via a command file using Console Mode . The technique is much the same as that shown in Hidden or Private Folders, except that the 2 items are the “Favourites” file and the output Slides folder.

The .cmd file has the code :

java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "xxx.jap" -directory "D:\Mark's JAlbum\Input\Album\Favourites" -outputDirectory " D:\Mark's JAlbum\Output\Album \Favourites" -appendImages -subdirs false
	XCOPY "D:\Mark's JAlbum\Output\Album\Favourites\slides\*.*" "D:\Mark's JAlbum\Output\Album\Favourites\first_slides\" /s/y/q

	RENAME "D:\Mark's JAlbum\Input\Album\Favourites\"
	RENAME "D:\Mark's JAlbum\Input\Album\Favourites\"

	java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "xxx.jap" -appendImages

	RENAME "D:\Mark's JAlbum\Input\Album\Favourites\"
	RENAME "D:\Mark's JAlbum\Input\Album\Favourites\"

	RMDIR /s/q "D:\Mark's JAlbum\Output\Album\Favourites\slides\"

	XCOPY "D:\Mark's JAlbum\Output\Album\Favourites\first_slides\*.*" "D:\Mark's JAlbum\Output\Album\Favourites\slides\" /s/h/q

	RMDIR /s/q "D:\Mark's JAlbum\Output\Album\Favourites\first_slides\"