/functions/addressbook.php

Description

functions/addressbook.php - Functions and classes for the addressbook system

Functions require SM_PATH and support of forms.php functions

Classes
Class Description
AddressBook This is the main address book class that connect all the backends and provide services to the functions above.
addressbook_backend Generic backend that all other backends extend
Functions
abook_create_form (line 190)

Constructs the "new address" form

NOTE! The form is not closed - the caller must add the closing form tag itself.

  • return: The desired address form display code
  • since: 1.5.1
string abook_create_form (string $form_url, string $name, string $title, string $button, int $backend, [array $defdata = array()])
  • string $form_url: Form action url
  • string $name: Form name
  • string $title: Form title
  • string $button: Form button name
  • int $backend: The current backend being displayed
  • array $defdata: Values of form fields
addressbook_cmp (line 233)

Had to move this function outside of the Addressbook Class PHP 4.0.4 Seemed to be having problems with inline functions.

Note: this can return now since we don't support 4.0.4 anymore.

void addressbook_cmp ( $a,  $b)
  • $a
  • $b
addressbook_init (line 24)

Create and initialize an addressbook object.

  • return: book object.
object address addressbook_init ([boolean $showerr = true], [boolean $onlylocal = false])
  • boolean $showerr: display any address book init errors. html page header must be created before calling addressbook_init() with $showerr enabled.
  • boolean $onlylocal: enable only local address book backends. Should be used when code does not need access to remote backends. Backends that provide read only address books with limited listing options can be tagged as remote.
alistcmp (line 266)

Sort array by the key "name"

void alistcmp ( $a,  $b)
  • $a
  • $b
getWritableBackends (line 249)

Retrieve a list of writable backends

  • since: 1.5.2
void getWritableBackends ()
get_abook_sort (line 310)

Address book sorting options

returns address book sorting order

  • return: book sorting options order
integer get_abook_sort ()
show_abook_sort_button (line 347)

This function shows the address book sort button.

  • return: html code with sorting images and urls
string show_abook_sort_button (integer $abook_sort_order, string $alt_tag, integer $Down, integer $Up, [array $uri_extra = array()])
  • integer $abook_sort_order: Current sort value
  • string $alt_tag: The alt tag value (string visible to text only browsers)
  • integer $Down: Sort value when list is sorted ascending
  • integer $Up: Sort value when list is sorted descending
  • array $uri_extra: Any additional parameters to add to the button's link, as an associative array of key/value pairs (OPTIONAL; default none)

Documentation generated on Mon, 21 Apr 2014 04:17:04 +0200 by phpDocumentor 1.4.3