This page lists some of the functions that you can use in you FAlbum-enabled website. The first two are particularly helpful in setting up sidebar photo groups, while another use is to place a group of tagged photos in a single post (using the help of a plugin like [[http://priyadi.net/archives/2005/03/02/wordpress-php-exec-plugin/|PHP Exec]]). ====== Functions ====== In order to use FAlbum calls within other pages, the '''Enable globally''' option must be set to '''true'''. This will setup the $falbum object and include the FAlbum style information on every call. Then for each page that you want to use a FAlbum method, add the following line before the first call: ===== $falbum->create_url ===== **$falbum->create_url($parms)** parameters: * parms *Ex. "show/recent" The parameter list is a slash-separated list with the names and values of the required UQL querystring. For example, the string "A/B/C/D" will produce A=B&C=D. The supported parameters are: * album: the value is an album number. * photo: the value is a photo number. * page: the value is the desired page in a paged view. * tags: the value is a list of desired tags. * show: can be 'tags' for showing the tags or 'recent' for showing the most recent photos. Example: Will display a linked '''title''' to the most recent photos.

Recent Photos

Example: Will display a single photo.

Picture of mine

===== $falbum->get_page_title ===== **$falbum->get_page_title($sep)** parameters: * sep = '»' Example: is_album_page()) { ?> <?php echo $falbum->get_page_title(); ?> <?php wp_title(''); ?> <?php if (is_author()) { echo $author_name; } ?> <?php if ( !(is_404()) && (is_single()) or (is_page()) or (is_archive()) ) { ?> at <? } ?> <?php bloginfo('name'); ?> ===== $falbum->show_random ===== **$falbum->show_random($num, $tags, $style, $size)** parameters: * $num * $tags * $style = 0 - style to use * 0 * 1 * $size = FALBUM_THUMBNAIL_SIZE - size of thumbs * SQ * T * S * M * L * O *********[edited by d.casey] errata to above: use lowercase letter for size params. Using uppercase will cause flickr to say "size is currently unavailable". The letters are: s = square (75x75) t = thumbnail (100x75) m =small (240x180) [- = medium 500x375, though I cannot get this to work at all] b = large (1024x?) o = original (whatever you uploaded) see documentation here: http://www.flickr.com/services/api/misc.urls.html ******** Example: Will display 2 random photos with the two tags. show_random($num=2, $tags='tag1','tag2'); ?> Example: Will display 4 random thumbnails. show_random(4); ?> Example by [[http://italo.com.mx|italo]]: Will display 4 random photos with 1 tag, using the style as set in the Falbum control panel and the small size. show_random(4,'tag1',1,'s');?> explanation: 4 is the number of random photos, tag1 is te name of the tag,1 is the style, and "s" is the small size. Note: in this format, 1 tag is the only correct, 2 tags and more is incorrect. Example by [[http://italo.com.mx|italo]]: Will display a random photos with the same tags. show_random(4,'tag1,tag2,tag3',1,'s');?> ===== $falbum->show_recent ===== **$falbum->show_recent($num, $style, $size)** parameters: * $num = 5, number of thumbnails to show * $style = 0, style to use * 0 * 1 * $size = FALBUM_THUMBNAIL_SIZE * SQ * T * S * M * L * O Example: Will display 3 photos on one line. show_recent(3, 1); ?> Example: Will display 5 photos (using the album settings as set in the Falbum control panel). show_recent(5); ?> Example: Will display 4 thumbnails using the style as set in the Falbum control panel. show_recent($num = 4, $style = 1); ?>