File/nasmail/functions/plugin.php

Description

plugin.php

This file provides the framework for a plugin architecture.

Documentation on how to write plugins might show up some time.

  • version: $Id: plugin.php 1142 2008-01-12 12:25:39Z tokul $
  • copyright: (c) 1999-2006 The SquirrelMail Project Team
  • copyright: (c) 2006-2007 The NaSMail Project
  • license: GNU Public License
Includes
 include_once (SM_PATH.'functions/global.php') (line 18)

Everything needs global..

Functions
boolean_hook_function (line 130)

This function is used for hooks which are to return true or false. If $priority is > 0, any one or more trues will override any falses. If $priority < 0, then one or more falses will override any trues.

Priority 0 means majority rules. Ties will be broken with $tie

  • return: the result of the function
bool boolean_hook_function (string $name, [mixed $parm = NULL], [int $priority = 0], [bool $tie = false])
  • string $name: name the hook name
  • mixed $parm: parm the parameters for the hook function
  • int $priority: priority
  • bool $tie: tie
concat_hook_function (line 98)

This function executes a hook, concatenating the results of each plugin that has the hook defined.

  • return: a concatenation of the results of each plugin function
string concat_hook_function (string $name, [mixed $parm = NULL])
  • string $name: name the name of the hook
  • mixed $parm: parm optional hook function parameters
do_hook (line 43)

This function executes a hook.

  • return: hook arguments modified by plugin
array do_hook (string $name)
  • string $name: name Name of hook to fire
do_hook_function (line 69)

This function executes a hook and allows for parameters to be passed.

  • return: the return value of the hook function
mixed do_hook_function (string $name, [mixed $parm = NULL])
  • string $name: name the name of the hook
  • mixed $parm: parm the parameters to pass to the hook function
nsm_check_for_javascript (line 182)

Detects browsers with broken JavaScript support.

This function checks whether the user's USER_AGENT is known to be broken. If broken browser is detected, function returns false.

Use soupNazi() function in NaSMail 1.0-1.2 or add dependency on compatibility 1.3 plugin. Please note inverted function return values. soupNazi() returns 1 on broken browsers. soupNazi() function is not available in NaSMail 1.4 and later. It is provided only by compatibility 1.3+ plugin.

  • return: false = broken javascript support, true = no known issues
  • since: 1.3
boolean nsm_check_for_javascript ()
use_plugin (line 28)

This function adds a plugin.

void use_plugin (string $name)
  • string $name: name Internal plugin name (ie. delete_move_next)

Documentation generated on Sun, 22 Nov 2009 17:36:44 +0200 by phpDocumentor 1.4.3