[ 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   $table  
mixed   $theme  
mixed   $themes  
mixed   $unprotected_pages  

[ Top ]
Method Summary
static void   addAlbumHandler()  
static void   addImageHandler()  
static void   clearCache()   Cleans out the cache folder
static bool   validImage()   Returns true if the file is an image
static bool   validImageAlt()   Returns true if the file is handled by an image handler plugin object
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 14]
API Tags:
Access:  protected


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


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


[ Top ]
mixed   $table = 'gallery' [line 13]

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


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


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


[ Top ]
Methods
static method addAlbumHandler  [line 1068]

  static void addAlbumHandler( $suffix, $objectName  )

Parameters:
   $suffix: 
   $objectName: 


[ Top ]
static method addImageHandler  [line 1035]

  static void addImageHandler( $suffix, $objectName  )

Parameters:
   $suffix: 
   $objectName: 


[ Top ]
static method clearCache  [line 721]

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

Cleans out the cache folder

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


[ Top ]
static method validImage  [line 1046]

  static bool validImage( string $filename  )

Returns true if the file is an image

Parameters:
string   $filename:  the name of the target


[ Top ]
static method validImageAlt  [line 1057]

  static bool validImageAlt( string $filename  )

Returns true if the file is handled by an image handler plugin object

Parameters:
string   $filename: 


[ Top ]
Constructor __construct  [line 26]

  Gallery __construct( )

Creates an instance of a gallery



[ Top ]
checkforGuest  [line 985]

  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 690]

  void commentClean( $table  )

Parameters:
   $table: 


[ Top ]
countHit  [line 827]

  void countHit( )

counts visits to the object



[ Top ]
garbageCollect  [line 408]

  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 1005]

  void get( $field  )

Parameters:
   $field: 


[ Top ]
getAlbum  [line 242]

  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 138]

  string getAlbumDir( )

Returns the main albums directory



[ Top ]
getAlbumPublish  [line 947]

  void getAlbumPublish( )



[ Top ]
getAlbums  [line 186]

  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 148]

  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 884]

  void getAlbumUseImagedate( )

Option to update album date from date of new images



[ Top ]
getBareTitle  [line 59]

  string getBareTitle( [string $locale = NULL]  )

Returns a tag stripped title

Parameters:
string   $locale: 


[ Top ]
getCodeblock  [line 968]

  array getCodeblock( )

Returns the codeblocks as an serialized array



[ Top ]
getCurrentTheme  [line 307]

  string getCurrentTheme( )

Returns the foldername of the current theme.

if no theme is set, picks the "first" theme.



[ Top ]
getDesc  [line 72]

  string getDesc( [ $locale = NULL]  )

Returns the gallery description

Parameters:
   $locale: 


[ Top ]
getGallerySession  [line 917]

  void getGallerySession( )

Option of for gallery sessions



[ Top ]
getHitcounter  [line 820]

  int getHitcounter( )

Returns the hitcount



[ Top ]
getImagePublish  [line 955]

  void getImagePublish( )



[ Top ]
getNumAlbums  [line 257]

  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 389]

  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 337]

  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 95]

  void getPassword( )

Returns the hashed password for guest gallery access



[ Top ]
getPasswordHint  [line 112]

  string getPasswordHint( [ $locale = NULL]  )

Returns the hind associated with the gallery password

Parameters:
   $locale: 


[ Top ]
getSecondLevelThumbs  [line 906]

  void getSecondLevelThumbs( )

Option to show subalbum images in the thumbnail selector



[ Top ]
getSecurity  [line 862]

  void getSecurity( )

Option to allow only registered users view the site



[ Top ]
getSortDirection  [line 155]

  void getSortDirection( )



[ Top ]
getSortType  [line 163]

  void getSortType( )



[ Top ]
getThemes  [line 277]

  array getThemes( )

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



[ Top ]
getThumbSelectImages  [line 895]

  void getThumbSelectImages( )

Option to show images in the thumbnail selector



[ Top ]
getTitle  [line 45]

  string getTitle( [ $locale = NULL]  )

Returns the gallery title

Parameters:
   $locale: 


[ Top ]
getUser  [line 125]

  void getUser( )



[ Top ]
getUserLogonField  [line 873]

  void getUserLogonField( )

Option to expose the user field on logon forms



[ Top ]
getWebsiteTitle  [line 835]

  void getWebsiteTitle( [ $locale = NULL]  )

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

Parameters:
   $locale: 


[ Top ]
getWebsiteURL  [line 851]

  void getWebsiteURL( )

The URL of the home (not Zenphoto gallery) WEBsite



[ Top ]
isProtected  [line 1001]

  void isProtected( )

returns true if there is any protection on the gallery



[ Top ]
isUnprotectedPage  [line 930]

  void isUnprotectedPage( $page $page  )

Tests if a page is excluded from password protection

Parameters:
$page   $page: 


[ Top ]
save  [line 1016]

  void save( )



[ Top ]
set  [line 1012]

  void set( $field, $value  )

Parameters:
   $field: 
   $value: 


[ Top ]
setAlbumPublish  [line 951]

  void setAlbumPublish( $v  )

Parameters:
   $v: 


[ Top ]
setAlbumUseImagedate  [line 888]

  void setAlbumUseImagedate( $value  )

Parameters:
   $value: 


[ Top ]
setCodeblock  [line 976]

  void setCodeblock( $cb  )

set the codeblocks as an serialized array

Parameters:
   $cb: 


[ Top ]
setCurrentTheme  [line 326]

  void setCurrentTheme( string $theme  )

Sets the current theme

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


[ Top ]
setDesc  [line 86]

  void setDesc( string $desc  )

Sets the gallery description

Parameters:
string   $desc: 


[ Top ]
setGallerySession  [line 921]

  void setGallerySession( $value  )

Parameters:
   $value: 


[ Top ]
setImagePublish  [line 959]

  void setImagePublish( $v  )

Parameters:
   $v: 


[ Top ]
setPassword  [line 103]

  void setPassword( $value  )

Parameters:
   $value: 


[ Top ]
setPasswordHint  [line 121]

  void setPasswordHint( $value  )

Parameters:
   $value: 


[ Top ]
setSecondLevelThumbs  [line 910]

  void setSecondLevelThumbs( $value  )

Parameters:
   $value: 


[ Top ]
setSecurity  [line 866]

  void setSecurity( $value  )

Parameters:
   $value: 


[ Top ]
setSortDirection  [line 159]

  void setSortDirection( $value  )

Parameters:
   $value: 


[ Top ]
setSortType  [line 168]

  void setSortType( $value  )

Parameters:
   $value: 


[ Top ]
setThumbSelectImages  [line 899]

  void setThumbSelectImages( $value  )

Parameters:
   $value: 


[ Top ]
setTitle  [line 63]

  void setTitle( $title  )

Parameters:
   $title: 


[ Top ]
setUnprotectedPage  [line 934]

  void setUnprotectedPage( $page, $on  )

Parameters:
   $page: 
   $on: 


[ Top ]
setUser  [line 129]

  void setUser( $value  )

Parameters:
   $value: 


[ Top ]
setUserLogonField  [line 877]

  void setUserLogonField( $value  )

Parameters:
   $value: 


[ Top ]
setWebsiteTitle  [line 844]

  void setWebsiteTitle( $value  )

Parameters:
   $value: 


[ Top ]
setWebsiteURL  [line 855]

  void setWebsiteURL( $value  )

Parameters:
   $value: 


[ Top ]
sortAlbumArray  [line 743]

  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 1025]

  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, 07 Jun 2014 18:03:16 +0200 by phpDocumentor 1.4.3