ZenphotoCMS 1.6.3

favoritesHandler.php

Allows registered users to select and manage "favorite" Zenphoto objects.

Currently just images & albums are supported.

Note:

If the multi mode option is enabled there may be multiple instances of a user's favorites. When an object is added to favorites, an identifier may be specified. (The Add buttons will include a text field for the name of the instance.) If specified that is the "name" of the favorites instance that will contain the object. If the name is left empty the object will be added to the un-named favorite instance.

Note: If the tag_suggest plugin is enabled there will be suggestions made for the text field much like the "tag suggestions" for searching.

If an object is contained in multiple favorites there will be multiple remove buttons. The button will have the favoirtes instance name appended if not the un-named favorites.

printFavoriresURL() will print links to each defined favorites instance.

Themes must be modified to use this plugin.

  • The theme should have a custom page based on its standard album page. The name for this page is favorites.php. This page and the standard album page "next" loops should contain calls on printAddToFavorites($object) for each object. This provides the "remove" button.
  • <li>
    The standard <i>image</i> page should also contain a call on <i>printAddToFavorites()</i>
    </li>
    
    <li>
    Calls to <i>printFavoritesURL()</i> should be placed anywhere that the visitor should be able to link
    to his favorites page.
    </li>
    
Tags
author

Stephen Billard (sbillard)

Table of Contents

Classes

favoritesOptions

Functions

printAddToFavorites()  : mixed
getFavoritesURL()  : mixed
printFavoritesURL()  : mixed
Prints links to the favorites "albums"

Functions

printAddToFavorites()

printAddToFavorites(mixed $obj[, mixed $add = NULL ][, mixed $remove = NULL ]) : mixed
Parameters
$obj : mixed
$add : mixed = NULL
$remove : mixed = NULL

printFavoritesURL()

Prints links to the favorites "albums"

printFavoritesURL([type $text = NULL ][, mixed $before = NULL ][, mixed $between = NULL ][, mixed $after = NULL ]) : mixed
Parameters
$text : type = NULL
$before : mixed = NULL
$between : mixed = NULL
$after : mixed = NULL
Tags
global

favorites $_zp_myfavorites


        
On this page

Search results