Alkaline offers full customization of the look-and-feel of your image library. The various elements that make up your Web site’s style: typefaces, colors, sizes, images, and so forth collectively are a theme. By changing your Alkaline theme, you instantly alter all of these elements.
You can download additional themes at the Alkaline Lounge. You can install most themes by dragging an extension’s folder to your /themes/ folder, choosing Configuration > Themes, and clicking Install Themes. Once your new theme is listed, you can change your theme by choosing Configuration > Settings.
Note: Familiarity with HTML and CSS is required to design your own theme. You will only be able to create a theme as complex as your mastery of these markup languages.
First, take a look at a theme in your /themes/ folder. Basic themes, including the default theme that ships with Alkaline, are a series of HTML files as well as a CSS and XML file. The HTML files contain the basic layout of the page. The CSS file contains all of the font, color, and positioning rules. The XML file contains information Alkaline needs to import your theme—ignore it for now.
Most themes are made up of three files. For example, your theme’s home page:
Your header.html and footer.html files span across your entire library and are a good place to start.
Insertions are the most basic component of your theme. They tell Alkaline where to insert data, and are found between curved brackets, like so: {Insertion}. You can optionally specify and if/else statement if the data is unavailable. For example:
{if:Image_Title}
{Image_Title}
{else:Image_Title}
This image has no title.
{/if:Image_Title}
Filters modify the data to be inserted and are appear after the insertion, followed by a pipe, like so: {Insertion|Filter}. You can apply multiple filters to a single tag like so: {Insertion|Filter1|Filter2}. Here are the current filters:
alpha — convert number to words (for example, 2 to “two”) (U.S. English only)alpha0 — convert number to words, except zerofit50 — cut to 50 charactersfit100 — cut to 100 charactersfit250 — cut to 250 characterfit500 — cut to 500 charactersfit1000 — cut to 1,000 charactersreltime — convert time to a relative time (for example, “3 days ago”) (U.S. English only)sterilize — strip HTML and PHP tagsupperfirst — capitalize first wordupperwords — capitalize all wordsurlencode — encodes content for placement in a URIurlize — applies slashes to all non-alphanumeric characters for placement in a URIBlocks display a series of data in a loop. There are seven major blocks in Alkaline: Comments, Images, Pages, Posts, Sets, Sizes, and Tags. For example:
{block:Images}
{Image_Title}
{/block:Images}
You can count blocks outside the loop by like so: {count:Block}.
You can access PHP constants (created using define()) within templates like so {define:Constant}. Alkaline will search for case-matching constants first, then all-uppercase, then all-lowercase.
Alkaline lets you include arbitrary HTML, PHP, or other data, like so: {include:Filename}.
Hooks tell Alkaline when to execute extensions. Alkaline extension developers can use this functionality to call their extension and execute code, like so: {hook:Hookname}.
The standard slideshow can be operated by keyboard shortcuts; use your keyboard’s arrow keys to move back and forth and press the P key to play or pause the automatic rotation. Additionally, you can add buttons or links to navigate your slideshow by adding classes like so: <a href="" class="slideshow_next">Next image</a>.
These are the pre-installed CSS classes:
.slideshow_play.slideshow_stop.slideshow_next.slideshow_prev.slideshow_pause (toggles play and stop)There are nearly a hundred built-in insertions. Themes, extensions, and additional programming can add any number more.
comment_idcomment_createdcomment_statuscomment_textcomment_text_rawcomment_markupcomment_author_namecomment_author_uricomment_author_emailcomment_author_ipcomment_author_avatarpage_idpage_titlepage_title_urlpage_textpage_text_rawpage_markuppage_imagespage_viewspage_wordspage_createdpage_created_formatpage_modifiedpage_modified_formatimage_idimage_extimage_mimeimage_titleimage_descriptionimage_description_rawimage_markupimage_privacyimage_nameimage_color_rimage_color_gimage_color_bimage_color_himage_color_simage_color_limage_takenimage_taken_formatimage_uploadedimage_uploaded_formatimage_publishedimage_published_formatimage_updatedimage_updated_formatimage_geoimage_geo_latimage_geo_longimage_viewsimage_comment_countimage_heightimage_widthThese insertions are not available on all of your templates.
image_colorkeyimage_tags — comma-separated tags (or use {block:Tags} instead)image_tag_countuser_iduser_useruser_nameuser_emailuser_last_loginuser_createduser_image_countright_idright_titleright_uriright_imageright_descriptionright_description_rawright_markupright_modifiedright_modified_formatright_image_countEXIF values vary by image (use Show EXIF Data to reveal your options), but can be inserted like so:
image_exif_model (e.g., Nikon D200)image_exif_software (e.g., Adobe Imageshop CS5 Macintosh)post_idpost_titlepost_title_urlpost_textpost_text_rawpost_markuppost_imagespost_viewspost_wordspost_createdpost_created_formatpost_publishedpost_published_formatpost_modifiedpost_modified_formatpost_comment_countpost_comment_disabledset_idset_titleset_title_urlset_typeset_descriptionset_description_rawset_markupset_imagesset_viewsset_image_countset_callset_modifiedset_modified_formatset_createdset_created_formatsize_idsize_srcsize_heightsize_widthsize_modifiedtag_idtag_name