By default theme image support is disabled, to enable it you need to provide a string variable called ‘folderImageSize’ with width and height dimension i.e. Store like this:Ĭurrent.put("variableName", variableData) Īnd get this data back for printing on a slide page like thisįrom jAlbum 15 skins can easily create theme images for any folder, see explore/folder properties pane. Within an iterator of an index page (parsed before slides) you have access to the "current" variable, which is a Map object where you can store image specific variables and later retrieve them in the slides. Saving and getting object custom variables This is simple to do with the following scriptlet: Some people wonder if it is possible to have jAlbum insert the contents of a text file having the same base name as an image but with ".txt" extension, for example "hiking.jpg" will get text from "hiking.txt". Reading captions/comments from separate text files Note that the start tag has an exclamation mark after the percent symbol, this ensures the scripted method is only evaluated once making it faster and more memory efficient. Copy and paste the scriptlet below for this effect: In this case it helps a lot to have all folder names displayed like this: animals » mamals » cats (being in the "cats" folder), with links to each parent folder. You might have an album with many nested folders (animals/mamals/cats.). Later in slide.htt, to display the new image: It will generate extra images with image bounds of 400px, the extra images also have any filters applied as would the slide image. If you want to offer additional sized images, such as for HTML’s srcset then this example code shows you how. Modify 'originalslide.htt' as required, such as the image src path so it points to the original instead of the slide image. Now, make the following simple adjustment to the "slide.htt" file and it will make sure that the "originalslide.htt" file gets processed if needed. To address this issue duplicate your skin's 'slide.htt' file and rename it 'originalslide.htt'. The downside of this is that the surroundings for the image doesn't match the skin (usually displayed on white background) and you have to use the back navigation button to return. When clicking on an image in a slide show, you may get to the original image, but it is not displayed in a html page of its own. We set a boolean to true, so the default is to add thumbnails as normal, but we set that variable to false if a folder is empty or has only empty subfolders. If it is then we need to see how many non-folder files are included in it and all of its subfolders. Within the iterator we need to check if the current file is a folder or not. Note, the empty folder and its contents are still made, it is just that they do not appear on index pages with content.Įxample is based on a version of Minimal skin's index page thumbnail generation. Instead of having links to empty folders the album will only show thumbnails for folders with some content, even if it is in a further subfolder. This can prove useful if you start a project by making the folder structure first, and then in subsequent builds add files to those folders. The categories you can get counts for are audio, image, video, webPage, webLocation, folder and otherĮxclude from index pages folders that are empty or have only empty subfolders You can write code to first collect counters for all categories in one count operation and then obtain the number of items for each category by using the count categories utility. Put the script just after the body tag of a slide.htt file. This script will make JAlbum look for these wav files and insert a BGSOUND tag if there is an annotation. The camera usually puts a wav file next to the image bearing the same base name as the image. Many digital cameras allow you to add voice annotations to images.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |