iPAP: Photo Album Publisher

iPAP Old Tags—anything below may no longer be of relevance

Listed below are old tags for version 0.7 and are no longer suggested for use in the current templates. Please refer to the included template “default” for any customisations you desire to implement. The following are tags you can use in your templates. Since version 0.7, iPAP has adopted a PHP–based templating engine, instead of complicating things with other complex template engines that use another syntax to learn. Basically, if you know how to use PHP’s echo() function, you’re all set.

Important note: Some changes will probably be added later to simplify usage of these tags, but I will try to keep old tags and templates working properly, except for the 0.61 preview that used an entirely different template engine.

Global Tags

These tags can be used anywhere in ipap-gallery.tpl.php and ipap-album.tpl.php.

<?php echo $site_name; ?>
The name of your main site.
<?php echo $site_url; ?>
The URI of your main site.
<?php echo $gallery_name; ?>
The name of your gallery/photos section, name of your iPAP install.
<?php echo $gallery_url; ?>
The URI of your gallery/photos section, name of your iPAP install.
<?php echo $thumbnail_size; ?>
Width/height of thumbnails, as set in ipap-config.php.
<?php echo $ipap_info; ?>
Defaults to “iPAP: Photo Album Publisher”.
<?php echo $ipap_version; ?>
Displays iPAP version, like “iPAP 0.7”.
<?php echo $timestamp; ?>
Displays current GMT timestamp. Useful for tagging cache files.

Album Listing Tags

These tags can be used anywhere in ipap-gallery.tpl.php and ipap-album.tpl.php. As long as it is within the
<?php if ($albums) { foreach ($albums as $album) { // begin albums loop ?>

<?php } } // end albums loop ?>

<?php echo $album['id']; ?>
The ID of the album.
<?php echo $album['title']; ?>
The title of the album. Processed with texturize().
<?php echo $album['title_raw']; ?>
The title of the album as typed, without any text processing.
<?php echo $album['title_nohtml']; ?>
The title of the album. Processed with texturize() but with HTML stripped.
<?php echo $album['description']; ?>
The description of the album. Processed with texturize() and autop().
<?php echo $album['description_raw']; ?>
The description of the album as typed, without any text processing.
<?php echo $album['description_nohtml']; ?>
The description of the album. Processed with texturize() and autop() but with HTML stripped.
<?php echo $album['description_excerpt_nohtml']; ?>
The description of the album. Processed with texturize() and autop() but with HTML stripped, and trimmed to approximately 80 characters.
<?php echo $album['slug']; ?>
The sanitize_title() of the album. Processed with sanitize_title().
<?php echo $album['sanitized_name']; ?>
Same as above, this is deprecated.
<?php echo $album['date_created']; ?>
Date when album was created. Formatted by PHP’s date(), according to $gallery_date_format in ipap-config.php.
<?php echo $album['date_edited']; ?>
Date when album was last edited. Formatted by PHP’s date(), according to $gallery_date_format in ipap-config.php.
<?php echo $album['cover_image']; ?>
Path to album’s cover image, as used in the src attribute in <img /> tags.
<?php echo $album['cover_image_thumbnail']; ?>
Path to the thumbnail of the album’s cover image, as used in the src attribute in <img /> tags.
<?php echo $album['link']; ?>
Link to the album.
<?php echo $album['photo_count']; ?>
Number of photos in the given album.

Album Details Tags

These tags can be used anywhere in ipap-album.tpl.php.

<?php echo current_album['id']; ?>
The ID of the current album.
<?php echo current_album['title']; ?>
The title of the current album. Processed with texturize().
<?php echo current_album['title_raw']; ?>
The title of the current album as typed, without any text processing.
<?php echo current_album['title_nohtml']; ?>
The title of the current album. Processed with texturize() but with HTML stripped.
<?php echo current_album['description']; ?>
The description of the current album. Processed with texturize() and autop().
<?php echo current_album['description_raw']; ?>
The description of the current album as typed, without any text processing.
<?php echo current_album['description_nohtml']; ?>
The description of the current album. Processed with texturize() and autop() but with HTML stripped.
<?php echo current_album['description_excerpt_nohtml']; ?>
The description of the current album. Processed with texturize() and autop() but with HTML stripped, and trimmed to approximately 80 characters.
<?php echo current_album['slug']; ?>
The sanitize_title() of the current album. Processed with sanitize_title().
<?php echo current_album['sanitized_name']; ?>
Same as above, this is deprecated.
<?php echo current_album['date_created']; ?>
Date when current album was created. Formatted by PHP’s date(), according to $gallery_date_format in ipap-config.php.
<?php echo current_album['date_edited']; ?>
Date when current album was last edited. Formatted by PHP’s date(), according to $gallery_date_format in ipap-config.php.
<?php echo current_album['cover_image']; ?>
Path to current album’s cover image, as used in the src attribute in <img /> tags.
<?php echo current_album['cover_image_thumbnail']; ?>
Path to the thumbnail of the current album’s cover image, as used in the src attribute in <img /> tags.
<?php echo current_album['link']; ?>
Link to the current album.
<?php echo current_album['permalink']; ?>
Link to the current album.
<?php echo current_album['photo_count']; ?>
Number of photos in the given current album.

Thumbnail Listing Tags

These tags can be used anywhere in ipap-album.tpl.php. As long as it is within the
<?php if ($thumbnails) { foreach ($thumbnails as $thumbnail) { // begin thumbnails loop ?>

<?php } } // end thumbnails loop ?>

<?php echo thumbnail['id']; ?>
The ID of the current thumbnailed photo.
<?php echo thumbnail['title']; ?>
The title of the thumbnailed photo. Processed with texturize().
<?php echo thumbnail['title_raw']; ?>
The title of the thumbnailed photo as typed, without any text processing.
<?php echo thumbnail['title_nohtml']; ?>
The title of the thumbnailed photo. Processed with texturize() but with HTML stripped.
<?php echo thumbnail['caption']; ?>
The caption of the thumbnailed photo. Processed with texturize() and autop().
<?php echo thumbnail['caption_raw']; ?>
The caption of the thumbnailed photo as typed, without any text processing.
<?php echo thumbnail['caption_nohtml']; ?>
The caption of the thumbnailed photo. Processed with texturize() and autop() but with HTML stripped.
<?php echo thumbnail['caption_excerpt_nohtml']; ?>
The caption of the thumbnailed photo. Processed with texturize() and autop() but with HTML stripped, and trimmed to approximately 80 characters.
<?php echo thumbnail['date_created']; ?>
Date when thumbnailed photo was created. Formatted by PHP’s date(), according to $gallery_date_format in ipap-config.php.
<?php echo thumbnail['date_edited']; ?>
Date when thumbnailed photo was last edited. Formatted by PHP’s date(), according to $gallery_date_format in ipap-config.php.
<?php echo thumbnail['date_taken']; ?>
Date when thumbnailed photo was taken, extracted from EXIF data if available. Formatted by PHP’s date(), according to $gallery_date_format in ipap-config.php.
<?php echo thumbnail['location']; ?>
Location where photo was taken, if available.
<?php echo thumbnail['image']; ?>
Path to the thumbnail of the current thumbnailed photo, as used in the src attribute in <img /> tags.
<?php echo thumbnail['link']; ?>
Link to the current thumbnailed photo.

Current Photo Tags

These tags can be used anywhere in ipap-album.tpl.php.

<?php echo current_photo['id']; ?>
The ID of the current photo.
<?php echo current_photo['title']; ?>
The title of the thumbnailed photo. Processed with texturize().
<?php echo current_photo['title_raw']; ?>
The title of the thumbnailed photo as typed, without any text processing.
<?php echo current_photo['title_nohtml']; ?>
The title of the thumbnailed photo. Processed with texturize() but with HTML stripped.
<?php echo current_photo['caption']; ?>
The caption of the thumbnailed photo. Processed with texturize() and autop().
<?php echo current_photo['caption_raw']; ?>
The caption of the thumbnailed photo as typed, without any text processing.
<?php echo current_photo['caption_nohtml']; ?>
The caption of the thumbnailed photo. Processed with texturize() and autop() but with HTML stripped.
<?php echo current_photo['caption_excerpt_nohtml']; ?>
The caption of the thumbnailed photo. Processed with texturize() and autop() but with HTML stripped, and trimmed to approximately 80 characters.
<?php echo current_photo['date_created']; ?>
Date when thumbnailed photo was created. Formatted by PHP’s date(), according to $gallery_date_format in ipap-config.php.
<?php echo current_photo['date_edited']; ?>
Date when thumbnailed photo was last edited. Formatted by PHP’s date(), according to $gallery_date_format in ipap-config.php.
<?php echo current_photo['date_taken']; ?>
Date when thumbnailed photo was taken, extracted from EXIF data if available. Formatted by PHP’s date(), according to $gallery_date_format in ipap-config.php.
<?php echo current_photo['location']; ?>
Location where photo was taken, if available.
<?php echo current_photo['width']; ?>
The width of the current photo.
<?php echo current_photo['height']; ?>
The height of the current photo.
<?php echo current_photo['image']; ?>
Path to the thumbnail of the current thumbnailed photo, as used in the src attribute in <img /> tags.
<?php echo current_photo['link']; ?>
Link to the current thumbnailed photo.
<?php echo current_photo['permalink']; ?>
Link to the current thumbnailed photo.
<?php echo current_photo['filesize_kb']; ?>
The filesize of the current photo.
<?php echo current_photo['next_link']; ?>
The link to the next photo, if available.
<?php echo current_photo['next_image_thumbnail']; ?>
Path to the thumbnail of the next photo, as used in the src attribute in <img /> tags.
<?php echo current_photo['next_title_raw']; ?>
The title of the next photo as typed, without any text processing.
<?php echo current_photo['next_title_nohtml']; ?>
The title of the next photo. Processed with texturize() but with HTML stripped.
<?php echo current_photo['next_title']; ?>
The title of the next photo. Processed with texturize().
<?php echo current_photo['next_caption_excerpt_nohtml']; ?>
The caption of the next photo. Processed with texturize() and autop() but with HTML stripped, and trimmed to approximately 80 characters.
<?php echo current_photo['next_caption_raw']; ?>
The caption of the next photo as typed, without any text processing.
<?php echo current_photo['next_caption_nohtml']; ?>
The caption of the next photo. Processed with texturize() and autop() but with HTML stripped.
<?php echo current_photo['next_caption']; ?>
The caption of the next photo. Processed with texturize() and autop() but with HTML stripped.
<?php echo current_photo['prev_link']; ?>
The link to the previous photo, if available.
<?php echo current_photo['prev_image_thumbnail']; ?>
Path to the thumbnail of the previous photo, as used in the src attribute in <img /> tags.
<?php echo current_photo['prev_title_raw']; ?>
The title of the previous photo as typed, without any text processing.
<?php echo current_photo['prev_title_nohtml']; ?>
The title of the previous photo. Processed with texturize() but with HTML stripped.
<?php echo current_photo['prev_title']; ?>
The title of the previous photo. Processed with texturize().
<?php echo current_photo['prev_caption_excerpt_nohtml']; ?>
The caption of the previous photo. Processed with texturize() and autop() but with HTML stripped, and trimmed to approximately 80 characters.
<?php echo current_photo['prev_caption_raw']; ?>
The caption of the previous photo as typed, without any text processing.
<?php echo current_photo['prev_caption_nohtml']; ?>
The caption of the previous photo. Processed with texturize() and autop() but with HTML stripped.
<?php echo current_photo['prev_caption']; ?>
The caption of the previous photo. Processed with texturize() and autop() but with HTML stripped.

Filters

texturize()
Converts quotes and double quotes for snappy punctuations. Taken from WordPress.
autop()
Converts linebreaks and paragraphs. Taken from WordPress.
sanitize_title()
Cleans text for use in permalinks. Taken from WordPress.

More details and additions on template filters next time.