\Ansel

Ansel Base Class.

Copyright 2001-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Summary

Methods
Properties
Constants
selectGalleries()
getErrorImage()
getUrlFor()
getImageUrl()
getImageObject()
getImageFromFile()
isAvailable()
getBreadCrumbs()
getStyleSelect()
getStyleDefinition()
getDateParameter()
downloadImagesAsZip()
embedCode()
getTagLinks()
initJSVariables()
point2Deg()
doSendfile()
getCAPTCHA()
sendEcard()
No public properties found
SORT_ASCENDING
SORT_DESCENDING
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

SORT_ASCENDING

SORT_ASCENDING

SORT_DESCENDING

SORT_DESCENDING

Methods

selectGalleries()

selectGalleries(array  $params = array()) : string

Return a string containing an <option> listing of the given gallery array.

Parameters

array $params

An array of options:

    (integer)selected  The gallery_id of the gallery that is selected
    (integer)perm      The permissions filter to use [Horde_Perms::SHOW]
    (mixed)attributes  Restrict the galleries returned to those matching
                       the filters. Can be an array of attribute/values
                       pairs or a gallery owner username.
    (boolean)all_levels
    (integer)from      The gallery to start listing at.
    (integer)count     The number of galleries to return.
    (integer)ignore    An Ansel_Gallery id to ignore when building the tree.
  

Returns

string —

The HTML to display the option list.

getErrorImage()

getErrorImage(string  $view = 'screen') : string

This photo should be used as a placeholder if the correct photo can't be retrieved

Parameters

string $view

The view ('screen', 'thumb', or 'full') to show. Defaults to 'screen'.

Returns

string —

The image path.

getUrlFor()

getUrlFor(string  $controller, array  $data, boolean  $full = false, integer  $append_session) : \Horde_Url

Return a properly formatted link depending on the global pretty url configuration

Parameters

string $controller

The controller to generate a URL for.

array $data

The data needed to generate the URL.

boolean $full

Generate a full URL.

integer $append_session

0 = only if needed, 1 = always, -1 = never.

Returns

\Horde_Url —

The generated URL

getImageUrl()

getImageUrl(string  $imageId, string  $view = 'screen', boolean  $full = false, \Ansel_Style  $style = null) : \Horde_Url

Return a link to an image, suitable for use in an <img/> tag Takes into account $conf['vfs']['direct'] and other factors.

Parameters

string $imageId

The id of the image.

string $view

The view ('screen', 'thumb', 'full', 'mini') to show.

boolean $full

Return a path that includes the server name?

\Ansel_Style $style

Use this gallery style

Returns

\Horde_Url —

The image path.

getImageObject()

getImageObject(array  $params = array()) : \Horde_Image

Obtain a Horde_Image object

Parameters

array $params

Any additional parameters

Returns

\Horde_Image —

object

getImageFromFile()

getImageFromFile(string  $file, array  $override = array()) : array

Read an image from the filesystem.

Parameters

string $file

The filename of the image.

array $override

Overwrite the file array with these values.

Throws

\Horde_Exception_NotFound

Returns

array —

The image data of the file as an array

isAvailable()

isAvailable(string  $feature) : boolean

Check to see if a particular image manipulation function is available.

Parameters

string $feature

The name of the function.

Returns

boolean —

True if the function is available.

getBreadCrumbs()

getBreadCrumbs(\Ansel_Gallery  $gallery = null, \stirng  $separator = ' &raquo; ') : string

Generate a list of breadcrumbs showing where we are in the gallery tree.

Parameters

\Ansel_Gallery $gallery

The gallery the bread crumbs are for.

\stirng $separator

The separator text to use between crumbs.

Returns

string

getStyleSelect()

getStyleSelect(string  $element_name, string  $selected = '') : string

Build a HTML <select> element containing all the available gallery styles.

Parameters

string $element_name

The element's id/name attribute.

string $selected

Mark this element as currently selected.

Returns

string —

The HTML for the