jAlbum is equipped with BeanShell, a very powerful Java-like scripting language. Scripting gives you the ability to add any imaginable features to generated albums. Within special <% scriptlets %> you can construct just about any expression you like that is also valid Java. Scriptlets can be embedded into the template files of jAlbum skins (index.htt and slide.htt) or inside style sheet files of skins.
Here are some examples. Copy and paste them into a skin to have them executed during album creation.
Ordinary calculations: <%= 5*(3+2) %> --> 25 Access variables too: <%= thumbWidth*2 %> Warn for large images and use variables in strings easily: <% if (fileSize > 1500000) out.print("Original file is large ($fileSize bytes)."); %> Produce fast Google-like numbered links to other index pages: <% if (totalIndexes == void) return; // totalIndexes only exist if several index pages for (i=1; i<=totalIndexes; i++) { if (i == indexNum) out.print(" <b>" + i + "</b>"); // Emphasize current index page else { out.print("<a href=\"" + engine.getIndexPageName() + (i==1?"":i) + engine.getPageExtension() + "\">" + " " + i + "</a>"); } } %>
Scripting can be performed in four syntaxes:
Ordinary scriptlet: <% ... %> Value of this scriptlet is outputted to the page: <%= ... %> Old syntax for the above: <eval> ... </eval> Function definition scriptlet (only evaluated once): <%! ... %>
Use scripting to construct advanced skins containing cool dynamic image borders etc. You have access to the full power and class hierarchy of java + there are also a number of practical ["implicit objects"] to assist you.