File/plugins/forced_prefs/functions.php

Description

NaSMail Forced Prefs Plugin -- Functions used by plugin Copyright (C) 2004-2007 Tomas Kuliavas <tokul@users.sourceforge.net> This file is part of NaSMail forced_prefs plugin.

This plugin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with plugin; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

  • version: $Id: functions.php 670 2007-08-29 12:29:03Z tokul $
Includes
 include_once (SM_PATH.'plugins/forced_prefs/config_default.php') (line 34)

block direct loading

 include_once (SM_PATH.'config/forced_prefs_config.php') (line 48)
 include_once (SM_PATH.'plugins/forced_prefs/config.php') (line 50)
Functions
fp_check_url (line 203)

Function checks if url matches regural expression

It allows to use array of patterns with php eregi. In order to reduce regexp checks, url is first checked with simple in_array() test.

  • return: true if url matches pattern.
  • since: 1.2
boolean fp_check_url (string $url, array $fp_removed_optpage_urls)
  • string $url: address that should be checked
  • array $fp_removed_optpage_urls: array with regural expressions for PHP eregi()
fp_filter_hooks (line 132)

removes plugin hooks

  • return: filtered hooks
  • since: 1.1
array fp_filter_hooks (array $orig_hooks)
  • array $orig_hooks
fp_filter_hooks_callback (line 145)

Filters hooks array

  • return: true if function name is not present in $fp_disabled_hooks
  • since: 1.1
boolean fp_filter_hooks_callback (string $plugin_function)
  • string $plugin_function: plugin function name from hooks array
fp_filter_optdata_callback (line 119)

callback function for array_filter call in fp_filter_optdata_internal.

Removes forced preferences entries from optpage_data array

  • return: true if setting is not enforced
  • since: 1.1
bool fp_filter_optdata_callback (array $key)
  • array $key: NaSMail option from optpage_data array.
fp_filter_optdata_internal (line 79)

Removes forced settings from option pages

  • since: 1.1
void fp_filter_optdata_internal ()
fp_filter_optpage_blocks (line 167)

Internal function to filter optpage blocks

  • since: 1.2
void fp_filter_optpage_blocks ()
fp_get_pref_do (line 237)

Overrides default values without saving them in user preferences

  • return: Overriden default value or false
  • since: 1.4
mixed fp_get_pref_do (array $args)
  • array $args
fp_get_pref_override_do (line 221)

Overrides settings without saving them in user preferences

  • return: Overriden setting value or false
  • since: 1.4
mixed fp_get_pref_override_do (array $args)
  • array $args
fp_override_save_internal (line 155)

Overrides settings if user manages to get to option form

  • since: 1.1
void fp_override_save_internal ()
set_forced_prefs (line 57)

Sets forced and added settings during login

  • since: 1.0
void set_forced_prefs ()

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