[ class tree: classes ] [ index: classes ] [ all elements ]

Class: Gallery

Source Location: /class-gallery.php

Class Gallery

Property Summary
mixed   $albumdir  
mixed   $albums  
mixed   $data  
mixed   $lastalbumsort  
mixed   $theme  
mixed   $themes  
mixed   $unprotected_pages  

[ Top ]
Method Summary
static void   clearCache()   Cleans out the cache folder
Gallery   __construct()   Creates an instance of a gallery
void   checkforGuest()   Checks if guest is loggedin for the album
void   commentClean()  
void   countHit()   counts visits to the object
bool   garbageCollect()   For every album in the gallery, look for its file. Delete from the database if the file does not exist. Do the same for images. Clean up comments that have been left orphaned.
void   get()  
Album   getAlbum()   Returns the a specific album in the array indicated by index.
string   getAlbumDir()   Returns the main albums directory
void   getAlbumPublish()  
array   getAlbums()   Get Albums will create our $albums array with a fully populated set of Album names in the correct order.
string   getAlbumSortKey()   Returns the DB field corresponding to the album sort type desired
void   getAlbumUseImagedate()   Option to update album date from date of new images
string   getBareTitle()   Returns a tag stripped title
array   getCodeblock()   Returns the codeblocks as an serialized array
string   getCurrentTheme()   Returns the foldername of the current theme.
string   getDesc()   Returns the gallery description
void   getGallerySession()   Option of for gallery sessions
int   getHitcounter()   Returns the hitcount
void   getImagePublish()  
int   getNumAlbums()   Returns the total number of TOPLEVEL albums in the gallery (does not include sub-albums)
array   getNumComments()   Returns the count of comments
int   getNumImages()   Returns the number of images in the gallery
void   getPassword()   Returns the hashed password for guest gallery access
string   getPasswordHint()   Returns the hind associated with the gallery password
void   getSecondLevelThumbs()   Option to show subalbum images in the thumbnail selector
void   getSecurity()   Option to allow only registered users view the site
void   getSortDirection()  
void   getSortType()  
array   getThemes()   Populates the theme array and returns it. The theme array contains information about all the currently available themes.
void   getThumbSelectImages()   Option to show images in the thumbnail selector
string   getTitle()   Returns the gallery title
void   getUser()  
void   getUserLogonField()   Option to expose the user field on logon forms
void   getWebsiteTitle()   Title to be used for the home (not Zenphoto gallery) WEBsite
void   getWebsiteURL()   The URL of the home (not Zenphoto gallery) WEBsite
void   isProtected()   returns true if there is any protection on the gallery
void   isUnprotectedPage()   Tests if a page is excluded from password protection
void   save()  
void   set()  
void   setAlbumPublish()  
void   setAlbumUseImagedate()  
void   setCodeblock()   set the codeblocks as an serialized array
void   setCurrentTheme()   Sets the current theme
void   setDesc()   Sets the gallery description
void   setGallerySession()  
void   setImagePublish()  
void   setPassword()  
void   setPasswordHint()  
void   setSecondLevelThumbs()  
void   setSecurity()  
void   setSortDirection()  
void   setSortType()  
void   setThumbSelectImages()  
void   setTitle()  
void   setUnprotectedPage()  
void   setUser()  
void   setUserLogonField()  
void   setWebsiteTitle()  
void   setWebsiteURL()  
array   sortAlbumArray()   Sort the album array based on either according to the sort key.
string   __toString()   "Magic" function to return a string identifying the object when it is treated as a string

[ Top ]
Properties
mixed   $albumdir = NULL [line 12]

[ Top ]
mixed   $albums = NULL [line 13]
API Tags:
Access:  protected


[ Top ]
mixed   $data = array() [line 17]
API Tags:
Access:  protected


[ Top ]
mixed   $lastalbumsort = NULL [line 16]
API Tags:
Access:  protected


[ Top ]
mixed   $theme [line 14]
API Tags:
Access:  protected


[ Top ]
mixed   $themes [line 15]
API Tags:
Access:  protected


[ Top ]
mixed   $unprotected_pages = array() [line 18]
API Tags:
Access:  protected


[ Top ]
Methods
static method clearCache  [line 696]

  static void clearCache( [string $cachefolder = NULL]  )

Cleans out the cache folder

Parameters:
string   $cachefolder:  the sub-folder to clean


[ Top ]
Constructor __construct  [line 25]

  Gallery __construct( )

Creates an instance of a gallery



[ Top ]
checkforGuest  [line 952]

  void checkforGuest( [ &$hint = NULL], [ &$show = NULL], unknown_type $hint, unknown_type $show  )

Checks if guest is loggedin for the album

Parameters:
unknown_type   $hint: 
unknown_type   $show: 
   &$hint: 
   &$show: 


[ Top ]
commentClean  [line 664]

  void commentClean( $table  )

Parameters:
   $table: 


[ Top ]
countHit  [line 803]

  void countHit( )

counts visits to the object



[ Top ]
garbageCollect  [line 404]

  bool garbageCollect( [bool $cascade = true], [bool $complete = false], [int $restart = '']  )

For every album in the gallery, look for its file. Delete from the database if the file does not exist. Do the same for images. Clean up comments that have been left orphaned.

Returns true if the operation was interrupted because it was taking too long

Parameters:
bool   $cascade:  garbage collect every image and album in the gallery.
bool   $complete:  garbage collect every image and album in the *database* - completely cleans the database.
int   $restart:  Image ID to restart scan from


[ Top ]
get  [line 972]

  void get( $field  )

Parameters:
   $field: 


[ Top ]
getAlbum  [line 232]

  Album getAlbum( int $index  )

Returns the a specific album in the array indicated by index.

Takes care of bounds checking, no need to check input.

Parameters:
int   $index:  the index of the album sought


[ Top ]
getAlbumDir  [line 132]

  string getAlbumDir( )

Returns the main albums directory



[ Top ]
getAlbumPublish  [line 915]

  void getAlbumPublish( )



[ Top ]
getAlbums  [line 173]

  array getAlbums( [int $page = 0], [string $sorttype = null], [string $direction = null], [bool $care = true], [bool $mine = NULL]  )

Get Albums will create our $albums array with a fully populated set of Album names in the correct order.

Returns an array of albums (a pages worth if $page is not zero)

Parameters:
int   $page:  An option parameter that can be used to return a slice of the array.
string   $sorttype:  the kind of sort desired
string   $direction:  set to a direction to override the default option
bool   $care:  set to false if the order of the albums does not matter
bool   $mine:  set true/false to override ownership


[ Top ]
getAlbumSortKey  [line 140]

  string getAlbumSortKey( [string $sorttype = null]  )

Returns the DB field corresponding to the album sort type desired

Parameters:
string   $sorttype:  the desired sort


[ Top ]
getAlbumUseImagedate  [line 856]

  void getAlbumUseImagedate( )

Option to update album date from date of new images



[ Top ]
getBareTitle  [line 58]

  string getBareTitle( [string $locale = NULL]  )

Returns a tag stripped title

Parameters:
string   $locale: 


[ Top ]
getCodeblock  [line 934]

  array getCodeblock( )

Returns the codeblocks as an serialized array



[ Top ]
getCurrentTheme  [line 300]

  string getCurrentTheme( )

Returns the foldername of the current theme.

if no theme is set, returns "default".



[ Top ]
getDesc  [line 71]

  string getDesc( [ $locale = NULL]  )

Returns the gallery description

Parameters:
   $locale: 


[ Top ]
getGallerySession  [line 886]

  void getGallerySession( )

Option of for gallery sessions



[ Top ]
getHitcounter  [line 796]

  int getHitcounter( )

Returns the hitcount



[ Top ]
getImagePublish  [line 922]

  void getImagePublish( )



[ Top ]
getNumAlbums  [line 248]

  int getNumAlbums( [bool $db = false], [bool $publishedOnly = false]  )

Returns the total number of TOPLEVEL albums in the gallery (does not include sub-albums)

Parameters:
bool   $db:  whether or not to use the database (includes ALL detected albums) or the directories
bool   $publishedOnly:  set to true to exclude un-published albums


[ Top ]
getNumComments  [line 385]

  array getNumComments( [bool $moderated = false]  )

Returns the count of comments

Parameters:
bool   $moderated:  set true if you want to see moderated comments


[ Top ]
getNumImages  [line 332]

  int getNumImages( [int $what = 0]  )

Returns the number of images in the gallery

Parameters:
int   $what:  0: all images from the database 1: published images from the database 2: "viewable" images via the object model


[ Top ]
getPassword  [line 92]

  void getPassword( )

Returns the hashed password for guest gallery access



[ Top ]
getPasswordHint  [line 108]

  string getPasswordHint( [ $locale = NULL]  )

Returns the hind associated with the gallery password

Parameters:
   $locale: 


[ Top ]
getSecondLevelThumbs  [line 876]

  void getSecondLevelThumbs( )

Option to show subalbum images in the thumbnail selector



[ Top ]
getSecurity  [line 836]

  void getSecurity( )

Option to allow only registered users view the site



[ Top ]
getSortDirection  [line 145]

  void getSortDirection( )



[ Top ]
getSortType  [line 151]

  void getSortType( )



[ Top ]
getThemes  [line 269]

  array getThemes( )

Populates the theme array and returns it. The theme array contains information about all the currently available themes.



[ Top ]
getThumbSelectImages  [line 866]

  void getThumbSelectImages( )

Option to show images in the thumbnail selector



[ Top ]
getTitle  [line 44]

  string getTitle( [ $locale = NULL]  )

Returns the gallery title

Parameters:
   $locale: 


[ Top ]
getUser  [line 120]

  void getUser( )



[ Top ]
getUserLogonField  [line 846]

  void getUserLogonField( )

Option to expose the user field on logon forms



[ Top ]
getWebsiteTitle  [line 811]

  void getWebsiteTitle( [ $locale = NULL]  )

Title to be used for the home (not Zenphoto gallery) WEBsite

Parameters:
   $locale: 


[ Top ]
getWebsiteURL  [line 826]

  void getWebsiteURL( )

The URL of the home (not Zenphoto gallery) WEBsite



[ Top ]
isProtected  [line 968]

  void isProtected( )

returns true if there is any protection on the gallery



[ Top ]
isUnprotectedPage  [line 899]

  void isUnprotectedPage( $page $page  )

Tests if a page is excluded from password protection

Parameters:
$page   $page: 


[ Top ]
save  [line 983]

  void save( )



[ Top ]
set  [line 979]

  void set( $field, $value  )

Parameters:
   $field: 
   $value: 


[ Top ]
setAlbumPublish  [line 918]

  void setAlbumPublish( $v  )

Parameters:
   $v: 


[ Top ]
setAlbumUseImagedate  [line 859]

  void setAlbumUseImagedate( $value  )

Parameters:
   $value: 


[ Top ]
setCodeblock  [line 942]

  void setCodeblock( $cb  )

set the codeblocks as an serialized array

Parameters:
   $cb: 


[ Top ]
setCurrentTheme  [line 320]

  void setCurrentTheme( string $theme  )

Sets the current theme

Parameters:
string   $theme:  the name of the current theme


[ Top ]
setDesc  [line 83]

  void setDesc( string $desc  )

Sets the gallery description

Parameters:
string   $desc: 


[ Top ]
setGallerySession  [line 889]

  void setGallerySession( $value  )

Parameters:
   $value: 


[ Top ]
setImagePublish  [line 925]

  void setImagePublish( $v  )

Parameters:
   $v: 


[ Top ]
setPassword  [line 99]

  void setPassword( $value  )

Parameters:
   $value: 


[ Top ]
setPasswordHint  [line 116]

  void setPasswordHint( $value  )

Parameters:
   $value: 


[ Top ]
setSecondLevelThumbs  [line 879]

  void setSecondLevelThumbs( $value  )

Parameters:
   $value: 


[ Top ]
setSecurity  [line 839]

  void setSecurity( $value  )

Parameters:
   $value: 


[ Top ]
setSortDirection  [line 148]

  void setSortDirection( $value  )

Parameters:
   $value: 


[ Top ]
setSortType  [line 155]

  void setSortType( $value  )

Parameters:
   $value: 


[ Top ]
setThumbSelectImages  [line 869]

  void setThumbSelectImages( $value  )

Parameters:
   $value: 


[ Top ]
setTitle  [line 62]

  void setTitle( $title  )

Parameters:
   $title: 


[ Top ]
setUnprotectedPage  [line 902]

  void setUnprotectedPage( $page, $on  )

Parameters:
   $page: 
   $on: 


[ Top ]
setUser  [line 123]

  void setUser( $value  )

Parameters:
   $value: 


[ Top ]
setUserLogonField  [line 849]

  void setUserLogonField( $value  )

Parameters:
   $value: 


[ Top ]
setWebsiteTitle  [line 819]

  void setWebsiteTitle( $value  )

Parameters:
   $value: 


[ Top ]
setWebsiteURL  [line 829]

  void setWebsiteURL( $value  )

Parameters:
   $value: 


[ Top ]
sortAlbumArray  [line 719]

  array sortAlbumArray( $parentalbum, array $albums, [string $sortkey = '`sort_order`'], [string $sortdirection = NULL], [bool $mine = NULL]  )

Sort the album array based on either according to the sort key.

Default is to sort on the `sort_order` field.

Returns an array with the albums in the desired sort order

Parameters:
array   $albums:  array of album names
string   $sortkey:  the sorting scheme
string   $sortdirection: 
bool   $mine:  set true/false to override ownership
   $parentalbum: 

Information Tags:
Author:  Todd Papaioannou (lucky@luckyspin.org)
Since:  1.0.0

[ Top ]
__toString  [line 998]

  string __toString( )

"Magic" function to return a string identifying the object when it is treated as a string


API Tags:
Access:  public


[ Top ]

Documentation generated on Sat, 05 Jan 2013 15:51:02 +0100 by phpDocumentor 1.4.3