This tutorial will teach you how to create your very own jAlbum skin, but you will also learn how to:
Contents |
---|
Before you get started it's recommended that you learn the basics of jAlbum skin development by checking out the skin introduction tutorial.
When creating a new skin for jAlbum you usually never start from scratch, instead you take an existing skin and base your new skin on that. The jAlbum application has a built in feature that let's you create a new skin based on the "Minimal" skin. To find this feature select "Tools", "Skin developer" and "Create new skin" from the menu.
In this tutorial we will however not use this feature. Instead we will base our new skin on a sample skin called "MyFirstSkin". Click this link to download the skin and choose to open the file (do not choose to "Save on computer"). jAlbum will then notify you that it will install the skin.
In the skin introduction tutorial you learned how to edit an existing skin, but in case you forgot, this is how you start the jAlbum Skin editor:
Make sure that you have select "MyFirstSkin" in the skin selection box. Then from the menu, select "Tools", "Skin developer" and "Edit skin files". This will open the relevant skin files for editing.
Remember that these files are basically HTML files containing some special jAlbum variables and tags. You are about to learn how to use some of these available variables and tags in a skin.
You can also use the keyboard shortcut Ctrl+Shift+E (or Cmd+Shift+E if you're on a Mac) to launch the Skin editor.
Start by selecting the window showing the "index.htt" file. As you can see this template is rather empty, so let's fill it up with some images!
It's time to get aquainted with two of jAlbum's special "iterator tags" <ja:rowiterator> and <ja:coliterator>. These tags repeat their content for each row or column that is to be created.
Now, let's write some code! In the body section of the index template insert the following snippet:
<pre> <table> <ja:rowiterator> <tr> <ja:coliterator> <td> <a href="${closeupPath}"> <img src="${thumbPath}" style="width:${thumbWidth}px; height:${thumbHeight}px;"/> </a> </td> </ja:coliterator> </tr> </ja:rowiterator> </table> </pre>
The iterator tags will create a HTML table with all the thumbnails in neat rows and columns.
The thumbnail image tag has a couple of attributes that we're going to take a closer look at.
In the code snippet above we also link the thumbnail images to the corresponding slide page. This is done using another jAlbum variable, ${closeupPath}, in the href attribute of the anchor tag containing the image tag.
${variableName} is the naming convention for all jAlbum variables.
Save your changes and close the editing windows. It's time to make your first album with your new skin!
Make sure that you have added some images to the jAlbum application and that "MyFirstSkin" is still selected in the skin selector box. Now hit the "Make jAlbum" and sit back as jAlbum lets your skin work its magic. When the album has been built, hit "Preview". The result should look something like this: