Overview

Packages

  • Ansel
  • None

Classes

  • Ansel
  • Ansel_Ajax_Application
  • Ansel_Ajax_Imple_EditCaption
  • Ansel_Ajax_Imple_EditFaces
  • Ansel_Ajax_Imple_EditGalleryFaces
  • Ansel_Ajax_Imple_Embed
  • Ansel_Ajax_Imple_GallerySlugCheck
  • Ansel_Ajax_Imple_ImageSaveGeotag
  • Ansel_Ajax_Imple_LocationAutoCompleter
  • Ansel_Ajax_Imple_MapLayerSelect
  • Ansel_Ajax_Imple_TagActions
  • Ansel_Ajax_Imple_ToggleGalleryActions
  • Ansel_Ajax_Imple_ToggleOtherGalleries
  • Ansel_Ajax_Imple_UploadNotification
  • Ansel_Api
  • Ansel_Exception
  • Ansel_Faces
  • Ansel_Faces_Base
  • Ansel_Faces_Facedetect
  • Ansel_Faces_User
  • Ansel_Factory_Faces
  • Ansel_Factory_Storage
  • Ansel_Factory_Styles
  • Ansel_Form_Ecard
  • Ansel_Form_Image
  • Ansel_Form_ImageDate
  • Ansel_Form_Upload
  • Ansel_Gallery
  • Ansel_Gallery_Decorator_Date
  • Ansel_GalleryMode_Base
  • Ansel_GalleryMode_Date
  • Ansel_GalleryMode_Normal
  • Ansel_Image
  • Ansel_ImageGenerator
  • Ansel_ImageGenerator_Mini
  • Ansel_ImageGenerator_PolaroidThumb
  • Ansel_ImageGenerator_PolaroidThumbStack
  • Ansel_ImageGenerator_RoundedThumb
  • Ansel_ImageGenerator_RoundedThumbStack
  • Ansel_ImageGenerator_Screen
  • Ansel_ImageGenerator_ShadowThumb
  • Ansel_ImageGenerator_ShadowThumbStack
  • Ansel_ImageGenerator_SquareThumb
  • Ansel_ImageGenerator_Thumb
  • Ansel_LoginTasks_SystemTask_Upgrade
  • Ansel_Report
  • Ansel_Report_letter
  • Ansel_Report_mail
  • Ansel_Report_tickets
  • Ansel_Search
  • Ansel_Search_exif
  • Ansel_Search_Tag
  • Ansel_Storage
  • Ansel_Style
  • Ansel_Tagger
  • Ansel_Test
  • Ansel_Tile_DateGallery
  • Ansel_Tile_Gallery
  • Ansel_Tile_Image
  • Ansel_View_Ansel
  • Ansel_View_Base
  • Ansel_View_EmbeddedRenderer_GalleryLink
  • Ansel_View_EmbeddedRenderer_Mini
  • Ansel_View_EmbeddedRenderer_Slideshow
  • Ansel_View_Gallery
  • Ansel_View_GalleryProperties
  • Ansel_View_GalleryRenderer_Base
  • Ansel_View_GalleryRenderer_Gallery
  • Ansel_View_GalleryRenderer_GalleryLightbox
  • Ansel_View_Image
  • Ansel_View_List
  • Ansel_View_Results
  • Ansel_View_Slideshow
  • Ansel_View_Upload
  • Ansel_Widget
  • Ansel_Widget_Actions
  • Ansel_Widget_Base
  • Ansel_Widget_GalleryFaces
  • Ansel_Widget_Geotag
  • Ansel_Widget_ImageFaces
  • Ansel_Widget_Links
  • Ansel_Widget_OtherGalleries
  • Ansel_Widget_OwnerFaces
  • Ansel_Widget_SimilarPhotos
  • Ansel_Widget_Tags
  • Ansel_XPPublisher
  • Overview
  • Package
  • Class
  • Tree

Class Ansel

Ansel Base Class.

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

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

Package: Ansel
Author: Chuck Hagenbuch chuck@horde.org
Author: Michael J. Rubinsky mrubinsk@horde.org
Located at Ansel.php
Methods summary
public static string
# selectGalleries( array $params = array() )

Return a string containing an

Return a string containing an

Parameters

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

Returns

string
The HTML to display the option list.
public static string
# getErrorImage( string $view = 'screen' )

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

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

Parameters

$view
<p>The view ('screen', 'thumb', or 'full') to show. Defaults to 'screen'.</p>

Returns

string
The image path.
public static Horde_Url
# getUrlFor( string $controller, array $data, boolean $full = false, integer $append_session = 0 )

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

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

Parameters

$controller
The controller to generate a URL for.
$data
The data needed to generate the URL.
$full
Generate a full URL.
$append_session
0 = only if needed, 1 = always, -1 = never.

Returns

Horde_Url
The generated URL
public static Horde_Url
# getImageUrl( string $imageId, string $view = 'screen', boolean $full = false, Ansel_Style $style = null )

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

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

Parameters

$imageId
The id of the image.
$view
<p>The view ('screen', 'thumb', 'full', 'mini') to show.</p>
$full
Return a path that includes the server name?
$style
Use this gallery style

Returns

Horde_Url
The image path.
public static Horde_Image
# getImageObject( array $params = array() )

Obtain a Horde_Image object

Obtain a Horde_Image object

Parameters

$params
Any additional parameters

Returns

Horde_Image
object
public static array
# getImageFromFile( string $file, array $override = array() )

Read an image from the filesystem.

Read an image from the filesystem.

Parameters

$file
The filename of the image.
$override
Overwrite the file array with these values.

Returns

array
The image data of the file as an array

Throws

Horde_Exception_NotFound
public static boolean
# isAvailable( string $feature )

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

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

Parameters

$feature
The name of the function.

Returns

boolean
True if the function is available.
public static string
# getBreadCrumbs( Ansel_Gallery $gallery = null, stirng $separator = ' &raquo; ' )

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

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

Parameters

$gallery
The gallery the bread crumbs are for.
$separator
The separator text to use between crumbs.

Returns

string
public static string
# getStyleSelect( string $element_name, string $selected = '' )

Build a HTML element containing all the available gallery styles.

Parameters

$element_name
The element's id/name attribute.
$selected
Mark this element as currently selected.

Returns

string
The HTML for the
public static Ansel_Style
# getStyleDefinition( string $style )

Get a pre-defined style definition for the requested named style

Get a pre-defined style definition for the requested named style

Parameters

$style
The name of the style to fetch

Returns

Ansel_Style

The definition of the requested style if it's available, otherwise, the ansel_default style is returned.

public static array
# getDateParameter( array $date = array() )

Get a date parts array containing only enough date parts for the depth we are at. If an empty array is passed, attempt to get the parts from url parametrs. Any missing date parts must be set to 0.

Get a date parts array containing only enough date parts for the depth we are at. If an empty array is passed, attempt to get the parts from url parametrs. Any missing date parts must be set to 0.

Parameters

$date
A full date parts array or an empty array.

Returns

array
A trimmed down (if necessary) date parts array.
public static
# downloadImagesAsZip( Ansel_Gallery $gallery = null, array $images = array() )

Downloads all requested images as a zip file. Assumes all permissions have been checked on the requested resource. Can request either a single gallery of images, OR an array of individual image ids.

Downloads all requested images as a zip file. Assumes all permissions have been checked on the requested resource. Can request either a single gallery of images, OR an array of individual image ids.

Parameters

$gallery
The galleries to download
$images
The images to download
public static string
# embedCode( array $options )

Generate the JS necessary to embed a gallery / images into another external site.

Generate the JS necessary to embed a gallery / images into another external site.

Parameters

$options
The options to build the view.

Returns

string
The javascript code
public static string
# getTagLinks( array $tags, string $action = 'add', string $owner = null )

Get the URL for a tag search link

Get the URL for a tag search link

Parameters

$tags
The tag ids to link to
$action
The action we want to perform with this tag.
$owner
The owner we want to filter the results by

Returns

string
The URL for this tag and action

Todo:

Move this to Tagger
public static
# initJSVariables( )

Simple helper to output initial Ansel JS.

Simple helper to output initial Ansel JS.

public static
# initHordeMap( array $params = array() )

Initialize the map.

Initialize the map.

Parameters

$params
Parameters to pass the the map

Todo:

Horde 5 - move this to a method in either Core or a new Horde_Map framework pacakge.


Constants summary
integer SORT_ASCENDING
# 0
integer SORT_DESCENDING
# 1
API documentation generated by ApiGen