Class Shashin

Description

The main class - directs traffic for all incoming requests.

  • author: Michael Toppa

Located in /Shashin.php (line 88)


	
			
Method Summary
 static void bootstrap ()
 static void getAdminHeadTags ()
 static void getAdminMenu ()
 static string getAlbum (int $album_key, [string $location_yn = null], [string $pubdate_yn = null], [string $float = null], [string $clear = null])
 static string getAlbumList (string $album_key, [string $info_yn = null], [boolean $force_picasa = true])
 static string getAlbumThumbs (string $album_key, int $max_cols, [string $location_yn = null], [string $pubdate_yn = null], [string $float = null], [string $clear = null], [boolean $force_picasa = true])
 static void getHeadTags ()
 static string getNewest (int $album_key, int $max_size, int $max_cols, int $how_many, [string $caption_yn = null], [string $float = null], [string $clear = null])
 static void getOptionsMenu ()
 static string getRandom (int $album_key, int $max_size, int $max_cols, int $how_many, [string $caption_yn = null], [string $float = null], [string $clear = null])
 static string getSingle (int $photo_key, int $max_size, [string $caption_yn = null], [string $float = null], [string $clear = null])
 static string getThumbs (string $photo_key, int $max_size, int $max_cols, [string $caption_yn = null], [string $float = null], [string $clear = null], int $how_many)
 static void initAdminMenus ()
 static void install ()
 static void parseContent (string $content)
 static void scheduledUpdate ()
 static boolean uninstall ()
 static void unscheduleUpdate ()
 static void _htmlentities ( &$string, mixed $key, string $string)
 static void _strtolower ( &$string, mixed $key, string $string)
 static void _trim ( &$string, mixed $key, string $string)
Methods
static bootstrap (line 101)

Called automatically (after the end of the class) to register hooks and add the actions and filters.

void bootstrap ()
static getAdminHeadTags (line 727)

Gets the Shashin Admin CSS file, for inclusion on the widget management page and the Shashin admin pages.

  • access: public
void getAdminHeadTags ()
static getAdminMenu (line 342)

Performs the requested admin action, based on the value of $_REQUEST['shashin_action'] values.

void getAdminMenu ()
static getAlbum (line 933)

Wrapper for ShashinAlbum->getAlbumMarkup()

string getAlbum (int $album_key, [string $location_yn = null], [string $pubdate_yn = null], [string $float = null], [string $clear = null])
  • int $album_key: (required): a Shashin album_key (not the Picasa album ID)
  • string $location_yn: (optional): y or n to show the location of the image, with a link to Google Maps.
  • string $pubdate_yn: (optional): y or n to show the pub date of the album
  • string $float: (optional): a css float value (left, right, or none) (no default)
  • string $clear: (optional): a css clear value (left, right, or both) (no default)
static getAlbumList (line 952)

Wrapper for ShashinAlbum->getAlbumListMarkup()

string getAlbumList (string $album_key, [string $info_yn = null], [boolean $force_picasa = true])
  • string $album_key: (required): Shashin album keys (not the Picasa album ID), or a column name to order by
  • string $info_yn: (optional): y or n to show the album location, pub date, and number of pictures.
  • boolean $force_picasa: (optional): force the album link to point to Picasa (default: true)
static getAlbumThumbs (line 1017)

Wrapper for ShashinAlbum->getAlbumThumbsMarkup()

string getAlbumThumbs (string $album_key, int $max_cols, [string $location_yn = null], [string $pubdate_yn = null], [string $float = null], [string $clear = null], [boolean $force_picasa = true])
  • string $album_key: (required): Shashin album keys (not the Picasa album ID), or a column name to order by
  • int $max_cols: (required): how many columns the table will have
  • string $location_yn: (optional): y or n to show the location of the image, with a link to Google Maps.
  • string $pubdate_yn: (optional): y or n to show the pub date of the album
  • string $float: (optional): a css float value (left, right, or none) (no default)
  • string $clear: (optional): a css clear value (left, right, or both) (no default)
  • boolean $force_picasa: (optional): force the album link to point to Picasa (default: true)
static getHeadTags (line 682)

Gets the Shashin CSS file, and the optional Highslide CSS and JS, for inclusion in the document head. Will get a copy of shashin.css from your theme directory if you put a custom one there.

void getHeadTags ()
static getNewest (line 995)

Wrapper for ShashinPhoto::getNewestMarkup()

string getNewest (int $album_key, int $max_size, int $max_cols, int $how_many, [string $caption_yn = null], [string $float = null], [string $clear = null])
  • int $album_key: (required): a Shashin album_key (not the Picasa album ID)
  • int $max_size: (required): the desired max dimension. Note Picasa allows only certain sizes.
  • int $max_cols: (required): how many columns the table will have
  • int $how_many: (required): how many random pictures to show
  • string $caption_yn: (optional): y or n to show the image description as a caption (defaults to n)
  • string $float: (optional): a css float value (left, right, or none) (no default)
  • string $clear: (optional): a css clear value (left, right, or both) (no default)
static getOptionsMenu (line 595)

Generates and echoes the HTML for the Shashin settings menu and sets Shashin options in WordPress.

void getOptionsMenu ()
static getRandom (line 912)

Wrapper for ShashinPhoto::getRandomMarkup()

string getRandom (int $album_key, int $max_size, int $max_cols, int $how_many, [string $caption_yn = null], [string $float = null], [string $clear = null])
  • int $album_key: (required): a Shashin album_key (not the Picasa album ID) or "any" for pictures from any album
  • int $max_size: (required): the desired max dimension. Note Picasa allows only certain sizes.
  • int $max_cols: (required): how many columns the table will have
  • int $how_many: (required): how many random pictures to show
  • string $caption_yn: (optional): y or n to show the image description as a caption (defaults to n)
  • string $float: (optional): a css float value (left, right, or none) (no default)
  • string $clear: (optional): a css clear value (left, right, or both) (no default)
static getSingle (line 889)

Wrapper for ShashinPhoto->getPhotoMarkup()

string getSingle (int $photo_key, int $max_size, [string $caption_yn = null], [string $float = null], [string $clear = null])
  • int $photo_key: (required): the Shashin photo_key (not the Picasa image ID)
  • int $max_size: (required): the desired max dimension. Note Picasa allows only certain sizes.
  • string $caption_yn: (optional): y or n to show the image description as a caption (defaults to n)
  • string $float: (optional): a css float value (left, right, or none) (no default)
  • string $clear: (optional): a css clear value (left, right, or both) (no default)
static getThumbs (line 973)

Wrapper for ShashinPhoto::getThumbsMarkup()

string getThumbs (string $photo_key, int $max_size, int $max_cols, [string $caption_yn = null], [string $float = null], [string $clear = null], int $how_many)
  • string $photo_key: (required): Shashin photo keys, pipe delimited (not the Picasa image IDs)
  • int $max_size: (required): the desired max dimension. Note Picasa allows only certain sizes.
  • int $max_cols: (required): how many columns the table will have
  • int $how_many: (required): how many columns the table will have
  • string $caption_yn: (optional): y or n to show the image description as a caption (defaults to n)
  • string $float: (optional): a css float value (left, right, or none) (no default)
  • string $clear: (optional): a css clear value (left, right, or both) (no default)
static initAdminMenus (line 316)

Adds the Shashin management and option pages.

void initAdminMenus ()
static install (line 150)

Updates Shashin options and creates the Shashin tables if they don't already exist.

void install ()
static parseContent (line 767)

Replaces Shashin tags in posts and pages with XHTML displaying the requested images.

Supported Shashin tags:

  • [simage=photo_key,max_size,caption_yn,float,clear]
  • [srandom=album_key1|album_key2|etc,max_size,max_cols,how_many,caption_yn,float,clear]
  • DEPRECATED - [salbum=album_key,location_yn,pubdate_yn,float,clear]
  • [sthumbs=photo_key1|photo_key2|etc,max_size,max_cols,caption_yn,float,clear]
  • [snewest=album_key1|album_key2|etc,max_size,max_cols,how_many,caption_yn,float,clear]
  • [salbumthumbs=album_key1|album_key2|etc,max_cols,location_yn,pubdate_yn,float,clear]
  • [salbumphotos=album_key,max_size,max_cols,caption_yn,description_yn,order_by,float,clear]
  • [salbumlist=album_key1|album_key2|etc,info_yn]
For srandom and snewest tags, you can use the word "any" instead of an album key to get photos from any album. For salbum, salbumthumbs, and salbumlist, note that the thumbnail size is fixed by Picasa at 160x160. For salbumthumbs and salbumlist, if you want to view all the albums, you can substitute a column name to order by for the keys.

void parseContent (string $content)
  • string $content: The content of the page or post
static scheduledUpdate (line 280)

Updates all albums once per day.

void scheduledUpdate ()
static uninstall (line 257)

Deletes the Shashin tables and Shashin option setttings. This is irrevocable!

  • return: true: uninstall successful; false: uninstall failed
  • access: public
  • usedby: Shashin::bootstrap()
boolean uninstall ()
static unscheduleUpdate (line 304)

Removes the hook for scheduled album syncing.

  • access: public
void unscheduleUpdate ()
static _htmlentities (line 1031)

array_walk callback method for htmlentities()

  • access: private
void _htmlentities ( &$string, mixed $key, string $string)
  • string $string: (required): the string to update
  • mixed $key: (ignored): the array key of the string (not needed but passed automatically by array_walk)
  • &$string
static _strtolower (line 1055)

array_walk callback method for strtolower()

  • access: private
void _strtolower ( &$string, mixed $key, string $string)
  • string $string: (required): the string to update
  • mixed $key: (ignored): the array key of the string (not needed but passed automatically by array_walk)
  • &$string
static _trim (line 1043)

array_walk callback method for trim()

  • access: private
void _trim ( &$string, mixed $key, string $string)
  • string $string: (required): the string to update
  • mixed $key: (ignored): the array key of the string (not needed but passed automatically by array_walk)
  • &$string

Documentation generated on Wed, 01 Jul 2009 07:48:17 -0400 by phpDocumentor 1.4.2