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

Procedural File: template-functions.php

Source Location: /template-functions.php

Page Details

Functions used to display content in themes.

Includes
require_once (dirname(__FILE__).'/functions-image.php') [line 11]
[ Top ]

require_once (dirname(__FILE__).'/functions.php') [line 10]
[ Top ]


Constants
ALBUM  [line 4129]

ALBUM = 2

[ Top ]

IMAGE  [line 4128]

IMAGE = 1

[ Top ]


Functions
albumNumber  [line 862]

Gets the 'n' for n of m albums


int albumNumber( )

[ Top ]
checkForGuest  [line 4272]

returns the auth type of a guest login

Parameters:
string   $hint: 
string   $show: 
   &$hint: 
   &$show: 


string checkForGuest( &$hint, &$show, string $hint, string $show  )

[ Top ]
checkforPassword  [line 4338]

Checks to see if a password is needed displays a password form if log-on is required

Returns true if a login form has been displayed

The password protection is hereditary. This normally only impacts direct url access to an album or image since if you are going down the tree you will be stopped at the first place a password is required.

If the gallery is password protected then every album & image will require that password.

If an album is password protected then all subalbums and images treed below that album will require the password. If there are multiple passwords in the tree and you direct link, the password that is required will be that of the nearest parent that has a password. (The gallery is the ur-parrent to all albums.)

Parameters:
string   $hint:  the password hint
bool   $show:  whether there is a user associated with the password.
   &$hint: 
   &$show: 

Information Tags:
Since:  1.1.3

bool checkforPassword( &$hint, &$show, string $hint, bool $show  )

[ Top ]
exposeZenPhotoInformations  [line 4536]

Expose some informations in a HTML comment

Parameters:
string   $obj:  the path to the page being loaded
array   $plugins:  list of activated plugins
string   $theme:  The theme being used
string   $filters:  list of the activated filters


void exposeZenPhotoInformations( [string $obj = ''], [array $plugins = ''], [string $theme = ''], [string $filters = '']  )

[ Top ]
generateCaptcha  [line 4443]

Shell for calling the installed captcha generator.

Returns a captcha string and captcha image URI

Parameters:
string   $img:  the captcha image URI
   &$img: 


string generateCaptcha( &$img, string $img  )

[ Top ]
getAlbumCustomData  [line 1227]

Returns the custom_data field of the current album


string getAlbumCustomData( )

[ Top ]
getAlbumData  [line 1265]

A composit for getting album data

Parameters:
string   $field:  which field you want


string getAlbumData( string $field  )

[ Top ]
getAlbumDate  [line 1045]

Returns the formatted date field of the album

Parameters:
string   $format:  optional format string for the date


string getAlbumDate( [string $format = null]  )

[ Top ]
getAlbumDesc  [line 1116]

Returns the raw description of the current album.


string getAlbumDesc( )

[ Top ]
getAlbumId  [line 3767]

Returns the record number of the album in the database


int getAlbumId( )

[ Top ]
getAlbumLinkURL  [line 1323]

Returns the album link url of the current album.

Parameters:
object   $album:  optional album object


string getAlbumLinkURL( [object $album = NULL]  )

[ Top ]
getAlbumLocation  [line 1091]

Returns the Location of the album.


string getAlbumLocation( )

[ Top ]
getAlbumPage  [line 1296]

Returns the album page number of the current image

Parameters:
object   $album:  optional album object


integer getAlbumPage( [object $album = NULL]  )

[ Top ]
getAlbumThumb  [line 1355]

Returns the name of the defined album thumbnail image.


string getAlbumThumb( )

[ Top ]
getAlbumTitle  [line 808]

Returns the raw title of the current album.


string getAlbumTitle( )

[ Top ]
getAllAlbums  [line 515]

Returns a list of all albums decendent from an album

Parameters:
object   $album:  optional album. If absent the current album is used


array getAllAlbums( [object $album = NULL]  )

[ Top ]
getAllDates  [line 3626]

Retrieves a list of all unique years & months from the images in the gallery

Parameters:
string   $order:  set to 'desc' for the list to be in descending order


array getAllDates( [string $order = 'asc']  )

[ Top ]
getAnnotatedAlbumTitle  [line 828]

Returns an album title taged with of Not visible or password protected status


string; getAnnotatedAlbumTitle( )

[ Top ]
getAnnotatedImageTitle  [line 1813]

Returns the image title taged with not visible annotation.


string getAnnotatedImageTitle( )

[ Top ]
getBareAlbumDesc  [line 1127]

Returns a text-only description of the current album.


string getBareAlbumDesc( )

[ Top ]
getBareAlbumTitle  [line 819]

Returns a text-only title of the current album.


string getBareAlbumTitle( )

[ Top ]
getBareGalleryDesc  [line 355]

Returns a text-only description of the gallery.


string getBareGalleryDesc( )

[ Top ]
getBareGalleryTitle  [line 329]

Returns a text-only title of the gallery.


string getBareGalleryTitle( )

[ Top ]
getBareImageDesc  [line 1984]

Returns a text-only description of the current image.


string getBareImageDesc( )

[ Top ]
getBareImageTitle  [line 1804]

Returns a text-only title of the current image.


string getBareImageTitle( )

[ Top ]
getCommentAuthorEmail  [line 3003]

Returns the comment author's email


string getCommentAuthorEmail( )

[ Top ]
getCommentAuthorName  [line 2996]

Returns the comment author's name


string getCommentAuthorName( )

[ Top ]
getCommentAuthorSite  [line 3009]

Returns the comment author's website


string getCommentAuthorSite( )

[ Top ]
getCommentBody  [line 3057]

Returns the body of the current comment


string getCommentBody( )

[ Top ]
getCommentCount  [line 2896]

Retuns the count of comments on the current image


int getCommentCount( )

[ Top ]
getCommentDateTime  [line 3044]

Returns a formatted date and time for the comment.

Uses the "date_format" option for the formatting unless a format string is passed.

Parameters:
string   $format:  'strftime' date/time format


string getCommentDateTime( [string $format = NULL]  )

[ Top ]
getCommentsAllowed  [line 2920]

Returns true if neither the album nor the image have comments closed


bool getCommentsAllowed( )

[ Top ]
getCommentStored  [line 2976]

Returns the data from the last comment posted

Parameters:
bool   $numeric:  Set to true for old themes to get 0->6 indices rather than descriptive ones


array getCommentStored( [bool $numeric = false]  )

[ Top ]
getCurrentPage  [line 504]

Returns the number of albums without printing it.


int getCurrentPage( )

[ Top ]
getCurrentTheme  [line 442]

Returns the name of the currently active theme


string getCurrentTheme( )

[ Top ]
getCustomAlbumThumb  [line 1437]

Returns a link to a custom sized thumbnail of the current album

Parameters:
int   $size:  the size of the image to have
int   $width:  width
int   $height:  height
int   $cropw:  crop width
int   $croph:  crop height
int   $cropx:  crop part x axis
int   $cropy:  crop part y axis
bool   $gray:  set true to force grayscale


string getCustomAlbumThumb( int $size, [int $width = NULL], [int $height = NULL], [int $cropw = NULL], [int $croph = NULL], [int $cropx = NULL], [int $cropy = null], [bool $gray = false]  )

[ Top ]
getCustomAlbumThumbMaxSpace  [line 1550]

Returns a link to a un-cropped custom sized version of the current album thumb within the given height and width dimensions.

Parameters:
int   $width:  width
int   $height:  height


string getCustomAlbumThumbMaxSpace( int $width, int $height  )

[ Top ]
getCustomImageURL  [line 2749]

Returns the url to the image in that dimensions you define with this function.

$size, $width, and $height are used in determining the final image size. At least one of these must be provided. If $size is provided, $width and $height are ignored. If both $width and $height are provided, the image will have those dimensions regardless of the original image height/width ratio. (Yes, this means that the image may be distorted!) The $crop* parameters determine the portion of the original image that will be incorporated into the final image. $cropw and $croph "sizes" are typically proportional. That is you can set them to values that reflect the ration of width to height that you want for the final image. Typically you would set them to the fincal height and width. These values will always be adjusted so that they are not larger than the original image dimensions. The $cropx and $cropy values represent the offset of the crop from the top left corner of the image. If these values are provided, the $croph and $cropw parameters are treated as absolute pixels not proportions of the image. If cropx and cropy are not provided, the crop will be "centered" in the image. When $corpx and $cropy are not provided the crop is offset from the top left proportionally to the ratio of the final image size and the crop size. Some typical croppings: $size=200, $width=NULL, $height=NULL, $cropw=200, $croph=100, $cropx=NULL, $cropy=NULL produces an image cropped to a 2x1 ratio which will fit in a 200x200 pixel frame. $size=NUL, $width=200, $height=NULL, $cropw=200, $croph=100, $cropx=100, $cropy=10 will will take a 200x100 pixel slice from (10,100) of the picture and create a 200x100 image $size=NUL, $width=200, $height=100, $cropw=200, $croph=120, $cropx=NULL, $cropy=NULL will produce a (distorted) image 200x100 pixels from a 1x0.6 crop of the image. $size=NUL, $width=200, $height=NULL, $cropw=180, $croph=120, $cropx=NULL, $cropy=NULL will produce an image that is 200x133 from a 1.5x1 crop that is 5% from the left and 15% from the top of the image.

Parameters:
int   $size:  the size of the image to have
int   $width:  width
int   $height:  height
int   $cropw:  cropwidth
int   $croph:  crop height
int   $cropx:  crop part x axis
int   $cropy:  crop part y axis
bool   $thumbStandin:  set true to inhibit watermarking
bool   $gray:  set true to force to grayscale


string getCustomImageURL( int $size, [int $width = NULL], [int $height = NULL], [int $cropw = NULL], [int $croph = NULL], [int $cropx = NULL], [int $cropy = NULL], [bool $thumbStandin = false], [bool $gray = false]  )

[ Top ]
getCustomPageURL  [line 3714]

Produces the url to a custom page (e.g. one that is not album.php, image.php, or index.php)

Parameters:
string   $linktext:  Text for the URL
string   $page:  page name to include in URL
string   $q:  query string to add to url
string   $album:  optional album for the page


string getCustomPageURL( string $page, [string $q = ''], [string $album = ''], string $linktext  )

[ Top ]
getCustomSizedImageMaxSpace  [line 2822]

Returns a link to a un-cropped custom sized version of the current image within the given height and width dimensions.

Use for sized images.

Parameters:
int   $width:  width
int   $height:  height


string getCustomSizedImageMaxSpace( int $width, int $height  )

[ Top ]
getCustomSizedImageThumbMaxSpace  [line 2837]

Returns a link to a un-cropped custom sized version of the current image within the given height and width dimensions.

Use for sized thumbnails.

Parameters:
int   $width:  width
int   $height:  height


string getCustomSizedImageThumbMaxSpace( int $width, int $height  )

[ Top ]
getDefaultHeight  [line 2447]

Returns the height of the default-sized image (in printDefaultSizedImage)

Parameters:
int   $size:  override the 'image_zize' option


int getDefaultHeight( [int $size = NULL]  )

[ Top ]
getDefaultSizedImage  [line 2489]

Returns the url to the default sized image.


string getDefaultSizedImage( )

[ Top ]
getDefaultWidth  [line 2435]

The width of the default-sized image (in printDefaultSizedImage)

Parameters:
int   $size:  override the 'image_zize' option


int getDefaultWidth( [int $size = NULL]  )

[ Top ]
getFirstImageURL  [line 2162]

Returns the url of the first image in current album.

Information Tags:
Author:  gerben

string getFirstImageURL( )

[ Top ]
getFullHeight  [line 2468]

Returns the height of the original image


int getFullHeight( )

[ Top ]
getFullImageURL  [line 2600]

Returns the url to original image.

It will return a protected image is the option "protect_full_image" is set


string getFullImageURL( )

[ Top ]
getFullWidth  [line 2457]

Returns the width of the original image


int getFullWidth( )

[ Top ]
getGalleryDesc  [line 345]

Returns the raw description of the gallery.


string getGalleryDesc( )

[ Top ]
getGalleryIndexURL  [line 392]

Returns the URL of the main gallery page containing the current album

Parameters:
bool   $relative:  set to false to get the true index page


string getGalleryIndexURL( [bool $relative = true]  )

[ Top ]
getGalleryTitle  [line 319]

Returns the raw title of the gallery.


string getGalleryTitle( )

[ Top ]
getHitcounter  [line 3204]

returns the hitcounter for the current page or for the object passed

Parameters:
object   $obj:  the album or page object for which the hitcount is desired


string getHitcounter( [object $obj = NULL]  )

[ Top ]
getImageCity  [line 1939]

Returns the City field of the current image


string getImageCity( )

[ Top ]
getImageCountry  [line 1961]

Returns the Country field of the current image


string getImageCountry( )

[ Top ]
getImageCustomData  [line 2021]

Returns the custom_data field of the current image


string getImageCustomData( )

[ Top ]
getImageData  [line 2010]

A composit for getting image data

Parameters:
string   $field:  which field you want


string getImageData( string $field  )

[ Top ]
getImageDate  [line 1879]

Returns the image date of the current image in yyyy-mm-dd hh:mm:ss format.

Pass it a date format string for custom formatting

Parameters:
string   $format:  formatting string for the data


string getImageDate( [string $format = null]  )

[ Top ]
getImageDesc  [line 1973]

Returns the raw description of the current image.

new lines are replaced with
tags


string getImageDesc( )

[ Top ]
getImageID  [line 2073]

Get the unique ID of the current image.


int getImageID( )

[ Top ]
getImageLinkURL  [line 2235]

Returns the url of the current image.


string getImageLinkURL( )

[ Top ]
getImageLocation  [line 1928]

Returns the Location field of the current image


string getImageLocation( )

[ Top ]
getImageMetaData  [line 2278]

Returns the Metadata infromation from the current image

Parameters:
$image   $image:  optional image object


array getImageMetaData( [$image $image = NULL]  )

[ Top ]
getImageSortOrder  [line 2093]

Get the sort order of this image.


string getImageSortOrder( )

[ Top ]
getImageState  [line 1950]

Returns the State field of the current image


string getImageState( )

[ Top ]
getImageThumb  [line 2530]

Returns the url to the thumbnail of the current image.


string getImageThumb( )

[ Top ]
getImageTitle  [line 1793]

Returns the raw title of the current image.


string getImageTitle( )

[ Top ]
getLastImageURL  [line 2175]

Returns the url of the last image in current album.


string getLastImageURL( )

[ Top ]
getLatestComments  [line 3101]

Gets latest comments for images and albums

Parameters:
int   $number:  how many comments you want.
string   $type:  "all" for all latest comments of all images and albums "image" for the lastest comments of one specific image "album" for the latest comments of one specific album
int   $itemID:  the ID of the element to get the comments for if $type != "all"


void getLatestComments( int $number, [string $type = "all"], [int $itemID = ""]  )

[ Top ]
getMainSiteName  [line 372]

Returns the name of the main website as set by the "Website Title" option on the gallery options tab.


string getMainSiteName( )

[ Top ]
getMainSiteURL  [line 382]

Returns the URL of the main website as set by the "Website URL" option on the gallery options tab.


string getMainSiteURL( )

[ Top ]
getMaxSpaceContainer  [line 1507]

Called by ***MaxSpace functions to compute the parameters to be passed to xxCustomyyy functions.

Parameters:
int   $width:  maxspace width
int   $height:  maxspace height
object   $image:  the image in question
bool   $thumb:  true if for a thumbnail
   &$width: 
   &$height: 


void getMaxSpaceContainer( &$width, &$height, object $image, [bool $thumb = false], int $width, int $height  )

[ Top ]
getNextAlbum  [line 1580]

Returns the next album


object getNextAlbum( )

[ Top ]
getNextAlbumURL  [line 1602]

Get the URL of the next album in the gallery.


string getNextAlbumURL( )

[ Top ]
getNextImageThumb  [line 2222]

Returns the thumbnail of the next image.


string getNextImageThumb( )

[ Top ]
getNextImageURL  [line 2133]

Returns the url of the next image.


string getNextImageURL( )

[ Top ]
getNextPageURL  [line 635]

Returns the URL of the next page. Use within If or while loops for pagination.


string getNextPageURL( )

[ Top ]
getNumAlbums  [line 426]

Returns the number of albums.


int getNumAlbums( )

[ Top ]
getNumImages  [line 1679]

Returns the number of images in the album.


int getNumImages( )

[ Top ]
getPageRedirect  [line 4364]

Returns a redirection link for the password form


string getPageRedirect( )

[ Top ]
getPageURL  [line 580]

Returns the URL of the page number passed as a parameter

Parameters:
int   $page:  Which page is desired
int   $total:  How many pages there are.


int getPageURL( int $page, [int $total = null]  )

[ Top ]
getParentAlbums  [line 895]

Returns an array of the names of the parents of the current album.

Parameters:
object   $album:  optional album object to use inseted of the current album


array getParentAlbums( [object $album = null]  )

[ Top ]
getPasswordProtectImage  [line 1366]

Returns an img src link to the password protect thumb substitute

Parameters:
string   $extra:  extra stuff to put in the HTML


string getPasswordProtectImage( string $extra  )

[ Top ]
getPrevAlbum  [line 1616]

Returns the previous album


object getPrevAlbum( )

[ Top ]
getPrevAlbumURL  [line 1638]

Get the URL of the previous album in the gallery.


string getPrevAlbumURL( )

[ Top ]
getPrevImageThumb  [line 2209]

Returns the thumbnail of the previous image.


string getPrevImageThumb( )

[ Top ]
getPrevImageURL  [line 2147]

Returns the url of the previous image.


string getPrevImageURL( )

[ Top ]
getPrevPageURL  [line 667]

Returns the URL of the previous page.


string getPrevPageURL( )

[ Top ]
getProtectedAlbumsWhere  [line 3245]

Returns a where clause for filter password protected album.

Used by the random images functions.

If the viewer is not logged in as ADMIN this function fails all password protected albums. It does not check to see if the viewer has credentials for an album.


string getProtectedAlbumsWhere( )

[ Top ]
getProtectedImageURL  [line 2645]

Returns an url to the password protected/watermarked current image

Parameters:
object   $image:  optional image object overrides the current image
string   $disposal:  set to override the 'protect_full_image' option


string getProtectedImageURL( [object $image = NULL], [string $disposal = NULL]  )

[ Top ]
getRandomImages  [line 3280]

Returns a randomly selected image from the gallery. (May be NULL if none exists)

Parameters:
bool   $daily:  set to true and the picture changes only once a day.


object getRandomImages( [bool $daily = false]  )

[ Top ]
getRandomImagesAlbum  [line 3332]

Returns a randomly selected image from the album or its subalbums. (May be NULL if none exists)

Parameters:
string   $rootAlbum:  optional album folder from which to get the image.
   $showunpublished: 


object getRandomImagesAlbum( [string $rootAlbum = null], [ $showunpublished = false]  )

[ Top ]
getRSSHeaderLink  [line 3865]

Returns the RSS link for use in the HTML HEAD

Parameters:
string   $option:  type of RSS: "Gallery" feed for the whole gallery "Album" for only the album it is called from "Collection" for the album it is called from and all of its subalbums "Comments" for all comments "Comments-image" for comments of only the image it is called from "Comments-album" for comments of only the album it is called from
string   $linktext:  title of the link
string   $lang:  optional to display a feed link for a specific language. Enter the locale like "de_DE" (the locale must be installed on your Zenphoto to work of course). If empty the locale set in the admin option or the language selector (getOption('locale') is used.

Information Tags:
Since:  1.1

string getRSSHeaderLink( string $option, [string $linktext = ''], [string $lang = '']  )

[ Top ]
getSearchDate  [line 4116]

Returns the date of the search

Parameters:
string   $format:  formatting of the date, default 'F Y'

Information Tags:
Since:  1.1

string getSearchDate( [string $format = '%B %Y']  )

[ Top ]
getSearchURL  [line 3942]

Returns a search URL

Parameters:
string   $words:  the search words target
string   $dates:  the dates that limit the search
int   $fields:  the fields on which to search
int   $page:  the page number for the URL
array   $inalbums:  the list of albums to search

Information Tags:
Since:  1.1.3

string getSearchURL( string $words, string $dates, int $fields, int $page, [array $inalbums = '']  )

[ Top ]
getSearchWords  [line 4103]

Returns the a sanitized version of the search string

Information Tags:
Since:  1.1

string getSearchWords( )

[ Top ]
getSizeCustomImage  [line 2346]

Returns an array with the height & width

Parameters:
int   $size:  size
int   $width:  width
int   $height:  height
int   $cw:  crop width
int   $ch:  crop height
int   $cx:  crop x axis
int   $cy:  crop y axis


array getSizeCustomImage( int $size, [int $width = NULL], [int $height = NULL], [int $cw = NULL], [int $ch = NULL], [int $cx = NULL], [int $cy = NULL]  )

[ Top ]
getSizeDefaultImage  [line 2412]

Returns an array [width, height] of the default-sized image.

Parameters:
int   $size:  override the 'image_zize' option


array getSizeDefaultImage( [int $size = NULL]  )

[ Top ]
getSizedImageURL  [line 2687]

Returns a link to the current image custom sized to $size

Parameters:
int   $size:  The size the image is to be


void getSizedImageURL( int $size  )

[ Top ]
getSizeFullImage  [line 2422]

Returns an array [width, height] of the original image.


array getSizeFullImage( )

[ Top ]
getTags  [line 3446]

Returns a list of tags for either an image or album, depends on the page called from

Information Tags:
Since:  1.1

string getTags( )

[ Top ]
getTheme  [line 4158]

Finds the name of the themeColor option selected on the admin options tab Returns a path and name of the theme css file. Returns the value passed for defaultcolor if the theme css option file does not exist.

Parameters:
string   &$zenCSS:  path to the css file
string   &$themeColor:  name of the css file
string   $defaultColor:  name of the default css file

Information Tags:
Since:  1.1

string getTheme( string &$zenCSS, string &$themeColor, string $defaultColor  )

[ Top ]
getTotalImagesIn  [line 1702]

Returns the count of all the images in the album and any subalbums

Parameters:
object   $album:  The album whose image count you want

Information Tags:
Since:  1.1.4

int getTotalImagesIn( object $album  )

[ Top ]
getTotalPages  [line 545]

Returns the number of pages for the current object

Parameters:
bool   $oneImagePage:  set to true if your theme collapses all image thumbs or their equivalent to one page. This is typical with flash viewer themes


int getTotalPages( [bool $oneImagePage = false]  )

[ Top ]
getUnprotectedImageURL  [line 2633]

Returns the "raw" url to the image in the albums folder


string getUnprotectedImageURL( )

[ Top ]
getURL  [line 3756]

Returns the URL to an image (This is NOT the URL for the image.php page)

Parameters:
object   $image:  the image


string getURL( object $image  )

[ Top ]
getVersion  [line 26]

Returns the zenphoto version string


void getVersion( )

[ Top ]
hasNextImage  [line 2112]

True if there is a next image


bool hasNextImage( )

[ Top ]
hasNextPage  [line 628]

Returns true if there is a next page


bool hasNextPage( )

[ Top ]
hasPrevImage  [line 2122]

True if there is a previous image


bool hasPrevImage( )

[ Top ]
hasPrevPage  [line 660]

Returns TRUE if there is a previous page. Use within If or while loops for pagination.


bool hasPrevPage( )

[ Top ]
imageNumber  [line 1841]

Returns the 'n' of n of m images


int imageNumber( )

[ Top ]
isAlbumPage  [line 1664]

Returns true if this page has album thumbs on it


bool isAlbumPage( )

[ Top ]
isArchive  [line 3927]

tests if a search page is an "archive" page


bool isArchive( )

[ Top ]
isImagePage  [line 1652]

Returns true if this page has image thumbs on it


bool isImagePage( )

[ Top ]
isLandscape  [line 2479]

Returns true if the image is landscape-oriented (width is greater than height)


bool isLandscape( )

[ Top ]
isProtectedAlbum  [line 4251]

Checks if the album is password protected

Parameters:
object   $album: 


void isProtectedAlbum( [object $album = NULL]  )

[ Top ]
makeAlbumCurrent  [line 797]

Sets the album passed as the current album

Parameters:
object   $album:  the album to be made current


void makeAlbumCurrent( object $album  )

[ Top ]
makeImageCurrent  [line 1780]

Sets the image passed as the current image

Parameters:
object   $image:  the image to become current


void makeImageCurrent( object $image  )

[ Top ]
next_album  [line 472]

WHILE next_album(): context switches to Album.

If we're already in the album context, this is a sub-albums loop, which, quite simply, changes the source of the album list. Switch back to the previous context when there are no more albums. Returns true if there are albums, false if none

Parameters:
bool   $all:  true to go through all the albums
string   $sorttype:  overrides default sort type
string   $sortdirection:  overrides default sort direction

Information Tags:
Since:  0.6

bool next_album( [bool $all = false], [string $sorttype = null], [string $sortdirection = NULL]  )

[ Top ]
next_comment  [line 2937]

Iterate through comments; use the ZP_COMMENT context.

Return true if there are more comments

Parameters:
bool   $desc:  set true for desecnding order


bool next_comment( [bool $desc = false]  )

[ Top ]
next_image  [line 1730]

Returns the next image on a page.

sets $_zp_current_image to the next image in the album. Returns true if there is an image to be shown

Parameters:
bool   $all:  set to true disable pagination
int   $firstPageCount:  the number of images which can go on the page that transitions between albums and images
string   $sorttype:  overrides the default sort type
string   $sortdirection:  overrides the default sort direction.
bool   $overridePassword:  the password check


bool next_image( [bool $all = false], [int $firstPageCount = NULL], [string $sorttype = null], [string $sortdirection = NULL], bool $overridePassword  )

[ Top ]
normalizeColumns  [line 4210]

Passed # of album columns, # of image columns of the theme.

NOTE: The values for these numbers of columns are determined by the theme CSS. They should be set to how many images or albums are displayed in a row. If you get this wrong, your theme will not behave as you expect.

Updates (non-persistent) images_per_page and albums_per_page so that the rows are filled.

This means that the value you set for the images per page and albums per page options may not be the same as what actually gets shown. First, they will be rounded to be an even multiple rows. So, if you have 6 columns of album thumbs your albums per page shown will be a multiple of six (assuming that there are enough albums.) Second, there may be a page where both image and album thumbs are shown--the "transition" page. Fewer than images_per_page will appear on this page.

The "non-persistent" update means that the actual values for these options are not changed. Just the values that will be used for the display of the particular page.

Returns # of images that will go on the album/image transition page.

When you have albums containing both subalbums and images there may be a page where the album thumbnails do not fill the page. This function returns a count of the images that can be used to fill out this transition page. The return value should be passed as the second parameter to next_image() so that the page is filled out with the proper number of images. If you do not pass this parameter it is assumed that album thumbs and image thumbs are not to be placed on the same (transition) page. (If you do not wish to have an album/image transition page you need not use this function at all.)

This function (combined with the parameter to next_image) impacts the pagination computations zenphoto makes. For this reason, it is important to make identical calls to the function from your theme's index.php, albums.php and image.php pages. Otherwise page and breadcrumb navigation may not be correct.

Parameters:
int   $albumColumns:  number of album columns on the page
int   $imageColumns:  number of image columns on the page

Information Tags:
Since:  1.1

int normalizeColumns( int $albumColumns, int $imageColumns  )

[ Top ]
openedForComments  [line 4138]

Checks to see if comment posting is allowed for an image/album Returns true if comment posting should be allowed

Parameters:
int   $what:  the degree of control desired allowed values: ALBUM, IMAGE, and ALBUM+IMAGE


bool openedForComments( [int $what = 3]  )

[ Top ]
printAdminLink  [line 50]

Prints the admin edit link for albums if the current user is logged-in

Returns true if the user is logged in

Parameters:
string   $text:  text for the link
string   $before:  text do display before the link
string   $after:  text do display after the link
string   $title:  Text for the HTML title item
string   $class:  The HTML class for the link
string   $id:  The HTML id for the link

Information Tags:
Since:  1.1

bool printAdminLink( string $text, [string $before = ''], [string $after = ''], [string $title = NULL], [string $class = NULL], [string $id = NULL]  )

[ Top ]
printAdminToolbox  [line 124]

Prints the clickable drop down toolbox on any theme page with generic admin helpers

Parameters:
string   $id:  the html/css theming id


void printAdminToolbox( [string $id = 'admin']  )

[ Top ]
printAlbumBreadcrumb  [line 921]

prints the breadcrumb item for the current images's album

Parameters:
string   $before:  Text to place before the breadcrumb
string   $after:  Text to place after the breadcrumb
string   $title:  Text to be used as the URL title tag


void printAlbumBreadcrumb( [string $before = ''], [string $after = ''], [string $title = NULL]  )

[ Top ]
printAlbumCustomData  [line 1241]

Prints the custom_data field of the current album.

Converts and displays line break in the admin field as
.

Parameters:
bool   $editable:  when true, enables AJAX editing in place
string   $editclass:  CSS class applied to element if editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Author:  Ozh

void printAlbumCustomData( [bool $editable = false], [string $editclass = ''], [mixed $messageIfEmpty = true]  )

[ Top ]
printAlbumData  [line 1281]

Prints arbitrary data from the album object and make it editable if applicable

Parameters:
string   $field:  the field name of the data desired
string   $label:  text to label the field
bool   $editable:  when true, enables AJAX editing in place
string   $editclass:  CSS class applied to element if editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Author:  Ozh

void printAlbumData( string $field, [string $label = ''], [bool $editable = false], [string $editclass = ''], [mixed $messageIfEmpty = true]  )

[ Top ]
printAlbumDate  [line 1068]

Prints the date of the current album and makes it editable in place if applicable

Parameters:
string   $before:  Insert here the text to be printed before the date.
string   $nonemessage:  Insert here the text to be printed if there is no date.
string   $format:  Format string for the date formatting
bool   $editable:  when true, enables AJAX editing in place
string   $editclass:  CSS class applied to element if editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Author:  Ozh

void printAlbumDate( [string $before = ''], [string $nonemessage = ''], [string $format = null], [bool $editable = false], [string $editclass = ''], [mixed $messageIfEmpty = true]  )

[ Top ]
printAlbumDesc  [line 1139]

Prints description of the current album and makes it editable in place

Parameters:
bool   $editable:  when true, enables AJAX editing in place
string   $editclass:  CSS class applied to element if editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Author:  Ozh

void printAlbumDesc( [bool $editable = false], [string $editclass = ''], [mixed $messageIfEmpty = true]  )

[ Top ]
printAlbumLink  [line 1346]

Prints the album link url of the current album.

Parameters:
string   $text:  Insert the link text here.
string   $title:  Insert the title text here.
string   $class:  Insert here the CSS-class name with with you want to style the link.
string   $id:  Insert here the CSS-id name with with you want to style the link.


void printAlbumLink( string $text, string $title, [string $class = NULL], [string $id = NULL]  )

[ Top ]
printAlbumLocation  [line 1104]

Prints the location of the album and make it editable

Parameters:
bool   $editable:  when true, enables AJAX editing in place
string   $editclass:  CSS class applied to element if editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Author:  Ozh

void printAlbumLocation( [bool $editable = false], [string $editclass = ''], [mixed $messageIfEmpty = true]  )

[ Top ]
printAlbumThumbImage  [line 1386]

Prints the album thumbnail image.

Parameters:
string   $alt:  Insert the text for the alternate image name here.
string   $class:  Insert here the CSS-class name with with you want to style the link.
string   $id:  Insert here the CSS-id name with with you want to style the link.


void printAlbumThumbImage( string $alt, [string $class = NULL], [string $id = NULL]  )

[ Top ]
printAlbumTitle  [line 850]

Prints an encapsulated title of the current album.

If you are logged in you can click on this to modify the title on the fly.

Parameters:
bool   $editable:  set to true to allow editing (for the admin)
string   $editclass:  CSS class applied to element if editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Author:  Ozh

void printAlbumTitle( [bool $editable = false], [string $editclass = ''], [mixed $messageIfEmpty = true]  )

[ Top ]
printAlbumZip  [line 3084]

Creates an URL for to download of a zipped copy of the current album


void printAlbumZip( )

[ Top ]
printAllDates  [line 3670]

Prints a compendum of dates and links to a search page that will show results of the date

Parameters:
string   $class:  optional class
string   $yearid:  optional class for "year"
string   $monthid:  optional class for "month"
string   $order:  set to 'desc' for the list to be in descending order


void printAllDates( [string $class = 'archive'], [string $yearid = 'year'], [string $monthid = 'month'], [string $order = 'asc']  )

[ Top ]
printAllTagsAs  [line 3556]

Either prints all of the galleries tgs as a UL list or a cloud

Parameters:
string   $option:  "cloud" for tag cloud, "list" for simple list
string   $class:  CSS class
string   $sort:  "results" for relevance list, "abc" for alphabetical, blank for unsorted
bool   $counter:  TRUE if you want the tag count within brackets behind the tag
bool   $links:  set to TRUE to have tag search links included with the tag.
int   $maxfontsize:  largest font size the cloud should display
int   $maxcount:  the floor count for setting the cloud font size to $maxfontsize
int   $mincount:  the minimum count for a tag to appear in the output
int   $limit:  set to limit the number of tags displayed to the top $numtags
int   $minfontsize:  minimum font size the cloud should display

Information Tags:
Since:  1.1

void printAllTagsAs( string $option, [string $class = ''], [string $sort = 'abc'], [bool $counter = FALSE], [bool $links = TRUE], [int $maxfontsize = 2], [int $maxcount = 50], [int $mincount = 10], [int $limit = NULL], [int $minfontsize = 0.8]  )

[ Top ]
printCaptcha  [line 4458]

Simple captcha for comments.

Prints a captcha entry field for a form such as the comments form.

Parameters:
string   $preText:  lead-in text
string   $midText:  text that goes between the captcha image and the input field
string   $postText:  text that closes the captcha
int   $size:  the text-width of the input field

Information Tags:
Since:  1.1.4

void printCaptcha( [string $preText = ''], [string $midText = ''], [string $postText = ''], [int $size = 4]  )

[ Top ]
printCommentAuthorLink  [line 3018]

Prints a link to the author

Parameters:
string   $title:  URL title tag
string   $class:  optional class tag
string   $id:  optional id tag


void printCommentAuthorLink( [string $title = NULL], [string $class = NULL], [string $id = NULL]  )

[ Top ]
printCustomAlbumThumbImage  [line 1461]

Prints a link to a custom sized thumbnail of the current album

See getCustomImageURL() for details.

Parameters:
string   $alt:  Alt atribute text
int   $size:  size
int   $width:  width
int   $height:  height
int   $cropw:  cropwidth
int   $croph:  crop height
int   $cropx:  crop part x axis
int   $cropy:  crop part y axis
string   $class:  css class
string   $id:  css id


string printCustomAlbumThumbImage( string $alt, int $size, [int $width = NULL], [int $height = NULL], [int $cropw = NULL], [int $croph = NULL], [int $cropx = NULL], [int $cropy = null], [string $class = NULL], [string $id = NULL]  )

[ Top ]
printCustomAlbumThumbMaxSpace  [line 1568]

Prints a un-cropped custom sized album thumb within the given height and width dimensions.

Note: a class of 'not_visible' or 'password_protected' will be added as appropriate

Parameters:
string   $alt:  Alt text for the url
int   $width:  width
int   $height:  height
string   $class:  Optional style class
string   $id:  Optional style id
bool   $thumbStandin:  set true to inhibit watermarking


void printCustomAlbumThumbMaxSpace( [string $alt = ''], int $width, int $height, [string $class = NULL], [string $id = NULL], bool $thumbStandin  )

[ Top ]
printCustomPageURL  [line 3743]

Prints the url to a custom page (e.g. one that is not album.php, image.php, or index.php)

Parameters:
string   $linktext:  Text for the URL
string   $page:  page name to include in URL
string   $q:  query string to add to url
string   $prev:  text to insert before the URL
string   $next:  text to follow the URL
string   $class:  optional class


void printCustomPageURL( string $linktext, string $page, [string $q = ''], [string $prev = ''], [string $next = ''], [string $class = NULL]  )

[ Top ]
printCustomSizedImage  [line 2780]

Print normal video or custom sized images.

Note: a class of 'not_visible' or 'password_protected' will be added as appropriate

Notes on cropping:

The $crop* parameters determine the portion of the original image that will be incorporated into the final image. The w and h "sizes" are typically proportional. That is you can set them to values that reflect the ration of width to height that you want for the final image. Typically you would set them to the fincal height and width.

Parameters:
string   $alt:  Alt text for the url
int   $size:  size
int   $width:  width
int   $height:  height
int   $cropw:  crop width
int   $croph:  crop height
int   $cropx:  crop x axis
int   $cropy:  crop y axis
string   $class:  Optional style class
string   $id:  Optional style id
bool   $thumbStandin:  set true to inhibit watermarking
bool   $gray:  set true to force grayscale


void printCustomSizedImage( string $alt, int $size, [int $width = NULL], [int $height = NULL], [int $cropw = NULL], [int $croph = NULL], [int $cropx = NULL], [int $cropy = NULL], [string $class = NULL], [string $id = NULL], [bool $thumbStandin = false], [bool $gray = false]  )

[ Top ]
printCustomSizedImageMaxSpace  [line 2870]

Print normal video or un-cropped within the given height and width dimensions. Use for sized images or thumbnails in an album.

Note: a class of 'not_visible' or 'password_protected' will be added as appropriate

Parameters:
string   $alt:  Alt text for the url
int   $width:  width
int   $height:  height
string   $class:  Optional style class
string   $id:  Optional style id
   $thumb: 


void printCustomSizedImageMaxSpace( [string $alt = ''], int $width, int $height, [string $class = NULL], [string $id = NULL], [ $thumb = false]  )

[ Top ]
printCustomSizedImageThumbMaxSpace  [line 2853]

Creates image thumbnails which will fit un-cropped within the width & height parameters given

Parameters:
string   $alt:  Alt text for the url
int   $width:  width
int   $height:  height
string   $class:  Optional style class
string   $id:  Optional style id


void printCustomSizedImageThumbMaxSpace( [string $alt = ''], int $width, int $height, [string $class = NULL], [string $id = NULL]  )

[ Top ]
printDefaultSizedImage  [line 2502]

Show video player with video loaded or display the image.

Parameters:
string   $alt:  Alt text
string   $class:  Optional style class
string   $id:  Optional style id


void printDefaultSizedImage( string $alt, [string $class = NULL], [string $id = NULL]  )

[ Top ]
printEditable  [line 1162]

Print any album or image data and make it editable in place

Parameters:
string   $context:  either 'image' or 'album'
string   $field:  the data field to echo & edit if applicable: 'date', 'title', 'place', 'description', ...
bool   $editable:  when true, enables AJAX editing in place
string   $editclass:  CSS class applied to element if editable
mixed   $messageIfEmpty:  message echoed if no value to print
bool   $convertBR:  when true, converts new line characters into HTML line breaks
string   $override:  if not empty, print this string instead of fetching field value from database
string   $label:  "label" text to print if the field is not empty

Information Tags:
Author:  Ozh
Since:  1.3

void printEditable( string $context, string $field, [bool $editable = false], [string $editclass = 'editable'], [mixed $messageIfEmpty = true], [bool $convertBR = false], [string $override = false], [string $label = '']  )

[ Top ]
printEditCommentLink  [line 3072]

Creates a link to the admin comment edit page for the current comment

Parameters:
string   $text:  Link text
string   $before:  text to go before the link
string   $after:  text to go after the link
string   $title:  title text
string   $class:  optional css clasee
string   $id:  optional css id


void printEditCommentLink( string $text, [string $before = ''], [string $after = ''], [string $title = NULL], [string $class = NULL], [string $id = NULL]  )

[ Top ]
printGalleryDesc  [line 362]

Prints the description of the gallery.


void printGalleryDesc( )

[ Top ]
printGalleryTitle  [line 336]

Prints the title of the gallery.


void printGalleryTitle( )

[ Top ]
printHomeLink  [line 1025]

Prints a link to the 'main website' Only prints the link if the url is not empty and does not point back the gallery page

Parameters:
string   $before:  text to precede the link
string   $after:  text to follow the link
string   $title:  Title text
string   $class:  optional css class
string   $id:  optional css id


void printHomeLink( [string $before = ''], [string $after = ''], [string $title = NULL], [string $class = NULL], [string $id = NULL]  )

[ Top ]
printImageCustomData  [line 2032]

Prints the custom_data field of the current image.

Converts and displays line breaks set in the admin field as
.


string printImageCustomData( )

[ Top ]
printImageData  [line 2060]

Prints arbitrary data from the image object and make it editable if applicable

Parameters:
string   $field:  the field name of the data desired
string   $label:  text to label the field.
bool   $editable:  when true, enables AJAX editing in place
string   $editclass:  CSS class applied to element if editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Author:  Ozh

void printImageData( string $field, [string $label = ''], [bool $editable = false], [string $editclass = ''], [mixed $messageIfEmpty = true]  )

[ Top ]
printImageDate  [line 1903]

Prints the date of the current album and makes it editable in place if applicable

Parameters:
string   $before:  Insert here the text to be printed before the date.
string   $nonemessage:  Insert here the text to be printed if there is no date.
string   $format:  Format string for the date formatting
bool   $editable:  when true, enables AJAX editing in place
string   $editclass:  CSS class applied to element if editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Author:  Ozh

void printImageDate( [string $before = ''], [string $nonemessage = ''], [string $format = null], [bool $editable = false], [string $editclass = ''], [mixed $messageIfEmpty = true]  )

[ Top ]
printImageDesc  [line 1997]

Prints the description of the current image.

Converts and displays line breaks set in the admin field as
.

Parameters:
bool   $editable:  set true to allow editing by the admin
string   $editclass:  CSS class applied to element when editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Author:  Ozh

void printImageDesc( [bool $editable = false], [string $editclass = ''], [mixed $messageIfEmpty = true]  )

[ Top ]
printImageDiv  [line 2261]

Print the entire <div> for a thumbnail. If we are in sorting mode, then only the image is inserted, if not, then the hyperlink to the image is also added.

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

void printImageDiv( )

[ Top ]
printImageID  [line 2082]

Print the unique ID of the current image.


void printImageID( )

[ Top ]
printImageLink  [line 2250]

Prints the link to the current image.

Parameters:
string   $text:  text for the link
string   $title:  title tag for the link
string   $class:  optional style class for the link
string   $id:  optional style id for the link


void printImageLink( string $text, string $title, [string $class = NULL], [string $id = NULL]  )

[ Top ]
printImageMetadata  [line 2297]

Prints the Metadata data of the current image, and make each value editable in place if applicable

Parameters:
string   $title:  title tag for the class
bool   $toggle:  set to true to get a javascript toggle on the display of the data
string   $id:  style class id
string   $class:  style class
bool   $editable:  set true to allow editing by the admin
string   $editclass:  CSS class applied to element when editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Author:  Ozh

void printImageMetadata( [string $title = NULL], [bool $toggle = true], [string $id = 'imagemetadata'], [string $class = null], [bool $editable = false], [string $editclass = ''], [mixed $messageIfEmpty = '']  )

[ Top ]
printImageSortOrder  [line 2102]

Print the sort order of this image.


void printImageSortOrder( )

[ Top ]
printImageThumb  [line 2540]
Parameters:
string   $alt:  Alt text
string   $class:  optional class tag
string   $id:  optional id tag


void printImageThumb( string $alt, [string $class = NULL], [string $id = NULL]  )

[ Top ]
printImageTitle  [line 1829]

Prints title of the current image and make it editable in place

Parameters:
bool   $editable:  if set to true and the admin is logged in allows editing of the title
string   $editclass:  CSS class applied to element if editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Author:  Ozh

void printImageTitle( [bool $editable = false], [string $editclass = 'editable imageTitleEditable'], [mixed $messageIfEmpty = true]  )

[ Top ]
printLatestComments  [line 3164]

Prints out latest comments for images and albums

Parameters:
int   $number:  how many comments you want.
string   $shorten:  the number of characters to shorten the comment display
string   $type:  "all" for all latest comments of all images and albums "image" for the lastest comments of one specific image "album" for the latest comments of one specific album
int   $itemID:  the ID of the element to get the comments for if $type != "all"


void printLatestComments( int $number, [string $shorten = '123'], [string $type = &quot;all&quot;], [int $itemID = &quot;&quot;]  )

[ Top ]
printNextPageLink  [line 647]

Prints the URL of the next page.

Parameters:
string   $text:  text for the URL
string   $title:  Text for the HTML title
string   $class:  Text for the HTML class
string   $id:  Text for the HTML id


void printNextPageLink( string $text, [string $title = NULL], [string $class = NULL], [string $id = NULL]  )

[ Top ]
printPageList  [line 711]

Prints a list of all pages.

Parameters:
string   $class:  the css class to use, "pagelist" by default
string   $id:  the css id to use
int   $navlen:  Number of navigation links to show (0 for all pages). Works best if the number is odd.


void printPageList( [string $class = 'pagelist'], [string $id = NULL], [int $navlen = 9]  )

[ Top ]
printPageListWithNav  [line 727]

Prints a full page navigation including previous and next page links with a list of all pages in between.

Parameters:
string   $prevtext:  Insert here the linktext like 'previous page'
string   $nexttext:  Insert here the linktext like 'next page'
bool   $oneImagePage:  set to true if there is only one image page as, for instance, in flash themes
string   $nextprev:  set to true to get the 'next' and 'prev' links printed
string   $class:  Insert here the CSS-class name you want to style the link with (default is "pagelist")
string   $id:  Insert here the CSS-ID name if you want to style the link with this
bool   $firstlast:  Add links to the first and last pages of you gallery
int   $navlen:  Number of navigation links to show (0 for all pages). Works best if the number is odd.


void printPageListWithNav( string $prevtext, string $nexttext, [bool $oneImagePage = false], [string $nextprev = true], [string $class = 'pagelist'], [string $id = NULL], [bool $firstlast = true], [int $navlen = 9]  )

[ Top ]
printPageNav  [line 696]

Prints a page navigation including previous and next page links

Parameters:
string   $prevtext:  Insert here the linktext like 'previous page'
string   $separator:  Insert here what you like to be shown between the prev and next links
string   $nexttext:  Insert here the linktext like "next page"
string   $class:  Insert here the CSS-class name you want to style the link with (default is "pagelist")
string   $id:  Insert here the CSS-ID name if you want to style the link with this


void printPageNav( string $prevtext, string $separator, string $nexttext, [string $class = 'pagenav'], [string $id = NULL]  )

[ Top ]
printParentBreadcrumb  [line 962]

Prints the breadcrumb navigation for album, gallery and image view.

Parameters:
string   $before:  Insert here the text to be printed before the links
string   $between:  Insert here the text to be printed between the links
string   $after:  Insert here the text to be printed after the links
mixed   $truncate:  if not empty, the max lenght of the description.
string   $elipsis:  the text to append to the truncated description


void printParentBreadcrumb( [string $before = ''], [string $between = ' | '], [string $after = ' | '], [mixed $truncate = NULL], [string $elipsis = '...']  )

[ Top ]
printPasswordForm  [line 4404]

Prints the album password form

Parameters:
string   $hint:  hint to the password
bool   $showProtected:  set false to supress the password protected message
bool   $showuser:  set true to force the user name filed to be present
string   $redirect:  optional URL to send the user to after successful login
   $_password_hint: 
   $_password_showProtected: 
   $_password_showuser: 
   $_password_redirect: 

Information Tags:
Since:  1.1.3

void printPasswordForm( $_password_hint, [ $_password_showProtected = true], [ $_password_showuser = NULL], [ $_password_redirect = NULL], string $hint, bool $showProtected, bool $showuser, string $redirect  )

[ Top ]
printPreloadScript  [line 2187]

Prints out the javascript to preload the next and previous images


void printPreloadScript( )

[ Top ]
printPrevPageLink  [line 679]

Returns the URL of the previous page.

Parameters:
string   $text:  The linktext that should be printed as a link
string   $title:  The text the html-tag "title" should contain
string   $class:  Insert here the CSS-class name you want to style the link with
string   $id:  Insert here the CSS-ID name you want to style the link with


void printPrevPageLink( string $text, [string $title = NULL], [string $class = NULL], [string $id = NULL]  )

[ Top ]
printRandomImages  [line 3412]

Puts up random image thumbs from the gallery

Parameters:
int   $number:  how many images
string   $class:  optional class
string   $option:  what you want selected: all for all images, album for selected ones from an album
string   $rootAlbum:  optional album from which to get the images
integer   $width:  the width/cropwidth of the thumb if crop=true else $width is longest size.
integer   $height:  the height/cropheight of the thumb if crop=true else not used
bool   $crop:  'true' (default) if the thumb should be cropped, 'false' if not


void printRandomImages( [int $number = 5], [string $class = null], [string $option = 'all'], [string $rootAlbum = ''], [integer $width = 100], [integer $height = 100], [bool $crop = true]  )

[ Top ]
printRSSHeaderLink  [line 3914]

Prints the RSS link for use in the HTML HEAD

Parameters:
string   $option:  type of RSS (Gallery, Album, Collection, Comments)
string   $linktext:  title of the link
string   $lang:  optional to display a feed link for a specific language. Enter the locale like "de_DE" (the locale must be installed on your Zenphoto to work of course). If empty the locale set in the admin option or the language selector (getOption('locale') is used.

Information Tags:
Since:  1.1.6

void printRSSHeaderLink( string $option, string $linktext, [string $lang = '']  )

[ Top ]
printRSSLink  [line 3792]

Prints a RSS link

Parameters:
string   $option:  type of RSS: "Gallery" feed for latest images of the whole gallery "Album" for latest images only of the album it is called from "Collection" for latest images of the album it is called from and all of its subalbums "Comments" for all comments "Comments-image" for latest comments of only the image it is called from "Comments-album" for latest comments of only the album it is called from "AlbumsRSS" for latest albums "AlbumsRSScollection" only for latest subalbums with the album it is called from
string   $prev:  text to before before the link
string   $linktext:  title of the link
string   $next:  text to appear after the link
bool   $printIcon:  print an RSS icon beside it? if true, the icon is zp-core/images/rss.gif
string   $class:  css class
string   $lang:  optional to display a feed link for a specific language. Enter the locale like "de_DE" (the locale must be installed on your Zenphoto to work of course). If empty the locale set in the admin option or the language selector (getOption('locale') is used.

Information Tags:
Since:  1.1

void printRSSLink( string $option, string $prev, string $linktext, string $next, [bool $printIcon = true], [string $class = null], [string $lang = '']  )

[ Top ]
printSearchForm  [line 4019]

Prints the search form

Search works on a list of tokens entered into the search form.

Tokens may be part of boolean expressions using &, |, !, and parens. (Comma is retained as a synonom of | for backwords compatibility.)

Tokens may be enclosed in quotation marks to create exact pattern matches or to include the boolean operators and parens as part of the tag..

Parameters:
string   $prevtext:  text to go before the search form
string   $id:  css id for the search form, default is 'search'
string   $buttonSource:  optional path to the image for the button
string   $buttontext:  optional text for the button ("Search" will be the default text)
string   $iconsource:  optional theme based icon for the search fields toggle
array   $query_fields:  override selection for enabled fields with this list
array   $album_list:  optional array of albums to search

Information Tags:
Since:  1.1.3

void printSearchForm( [string $prevtext = NULL], [string $id = 'search'], [string $buttonSource = NULL], [string $buttontext = ''], [string $iconsource = NULL], [array $query_fields = NULL], [array $album_list = NULL]  )

[ Top ]
printSizedImageLink  [line 2886]

Prints link to an image of specific size

Parameters:
int   $size:  how big
string   $text:  URL text
string   $title:  URL title
string   $class:  optional URL class
string   $id:  optional URL id


void printSizedImageLink( int $size, string $text, string $title, [string $class = NULL], [string $id = NULL]  )

[ Top ]
printSubalbumAdmin  [line 67]

Prints the admin edit link for subalbums if the current user is logged-in

Parameters:
string   $text:  text for the link
string   $before:  text do display before the link
string   $after:  text do display after the link

Information Tags:
Since:  1.1

void printSubalbumAdmin( string $text, [string $before = ''], [string $after = '']  )

[ Top ]
printTags  [line 3475]

Prints a list of tags, editable by admin

Parameters:
string   $option:  links by default, if anything else the tags will not link to all other photos with the same tag
string   $preText:  text to go before the printed tags
string   $class:  css class to apply to the div surrounding the UL list
string   $separator:  what charactor shall separate the tags
bool   $editable:  true to allow admin to edit the tags
string   $editclass:  CSS class applied to editable element if editable
mixed   $messageIfEmpty:  Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.

Information Tags:
Since:  1.1

void printTags( [string $option = 'links'], [string $preText = NULL], [string $class = 'taglist'], [string $separator = ', '], [bool $editable = TRUE], [string $editclass = ''], [mixed $messageIfEmpty = true]  )

[ Top ]
printVersion  [line 33]

Prints the zenphoto version string


void printVersion( )

[ Top ]
printZenphotoLink  [line 4478]

prints the zenphoto logo and link


void printZenphotoLink( )

[ Top ]
resetCurrentAlbum  [line 530]

void resetCurrentAlbum( )

[ Top ]
setAlbumCustomData  [line 1253]

Sets the album custom_data field

Parameters:
string   $val:  The value to be set


void setAlbumCustomData( string $val  )

[ Top ]
setImageCustomData  [line 2044]

Sets the image custom_data field

Parameters:
string   $val: 


void setImageCustomData( string $val  )

[ Top ]
shortenContent  [line 4490]

Returns truncated html formatted content

Parameters:
string   $articlecontent:  the source string
int   $shorten:  new size
string   $shortenindicator: 


string shortenContent( string $articlecontent, int $shorten, string $shortenindicator  )

[ Top ]
zenJavascript  [line 79]

Print any Javascript required by zenphoto. Every theme should include this somewhere in its <head>.


void zenJavascript( )

[ Top ]


Documentation generated on Mon, 09 Aug 2010 17:24:12 +0200 by phpDocumentor 1.4.1