X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=include%2Foptions%2Fcompose.php;h=dbc53c41b47c87e27b134003e5bb586cdf5018b0;hb=f2bd6143d190a3a82bb7e85fc4520ab51b120af8;hp=7132ed7ed706995602d9d7178ed27f365a86a68b;hpb=5bcd1b00eae0ed6d15ce442cdd6c5ce73371fa36;p=squirrelmail.git diff --git a/include/options/compose.php b/include/options/compose.php index 7132ed7e..dbc53c41 100644 --- a/include/options/compose.php +++ b/include/options/compose.php @@ -3,18 +3,17 @@ /** * options_compose.php * - * Copyright (c) 1999-2005 The SquirrelMail Project Team - * Licensed under the GNU GPL. For full terms see the file COPYING. - * * Displays all options concerning composing of new messages * + * @copyright © 1999-2007 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail */ /** Define the group constants for this options page. */ -define('SMOPT_GRP_GENERAL', 0); -define('SMOPT_GRP_REPLY', 1); +define('SMOPT_GRP_COMPOSE', 0); +define('SMOPT_GRP_COMPOSE_REPLY', 1); /** * This function builds an array with all the information about @@ -38,12 +37,12 @@ function load_optpage_data_compose() { /******************************************************/ /* LOAD EACH GROUP OF OPTIONS INTO THE OPTIONS ARRAY. */ /******************************************************/ - - /*** Load the General Options into the array ***/ - $optgrps[SMOPT_GRP_GENERAL] = _("General Message Composition"); - $optvals[SMOPT_GRP_GENERAL] = array(); - $optvals[SMOPT_GRP_GENERAL][] = array( + /*** Load the General Compose Options into the array ***/ + $optgrps[SMOPT_GRP_COMPOSE] = _("General Message Composition"); + $optvals[SMOPT_GRP_COMPOSE] = array(); + + $optvals[SMOPT_GRP_COMPOSE][] = array( 'name' => 'editor_size', 'caption' => _("Width of Editor Window"), 'type' => SMOPT_TYPE_INTEGER, @@ -51,7 +50,7 @@ function load_optpage_data_compose() { 'size' => SMOPT_SIZE_TINY ); - $optvals[SMOPT_GRP_GENERAL][] = array( + $optvals[SMOPT_GRP_COMPOSE][] = array( 'name' => 'editor_height', 'caption' => _("Height of Editor Window"), 'type' => SMOPT_TYPE_INTEGER, @@ -59,7 +58,7 @@ function load_optpage_data_compose() { 'size' => SMOPT_SIZE_TINY ); - $optvals[SMOPT_GRP_GENERAL][] = array( + $optvals[SMOPT_GRP_COMPOSE][] = array( 'name' => 'location_of_buttons', 'caption' => _("Location of Buttons when Composing"), 'type' => SMOPT_TYPE_STRLIST, @@ -70,24 +69,35 @@ function load_optpage_data_compose() { ); - $optvals[SMOPT_GRP_GENERAL][] = array( + $optvals[SMOPT_GRP_COMPOSE][] = array( 'name' => 'use_javascript_addr_book', - 'caption' => _("Addressbook Display Format"), + 'caption' => _("Address Book Display Format"), 'type' => SMOPT_TYPE_STRLIST, 'refresh' => SMOPT_REFRESH_NONE, - 'posvals' => array('1' => _("Javascript"), - '0' => _("HTML")) + 'posvals' => array('1' => _("Pop-up window"), + '0' => _("In-page")) ); - - - $optvals[SMOPT_GRP_GENERAL][] = array( + + + $optvals[SMOPT_GRP_COMPOSE][] = array( + 'name' => 'addrsrch_fullname', + 'caption' => _("Format of Addresses Added From Address Book"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_NONE, + 'posvals' => array('noprefix' => _("No prefix/Address only"), + 'nickname' => _("Nickname and address"), + 'fullname' => _("Full name and address")) + ); + + + $optvals[SMOPT_GRP_COMPOSE][] = array( 'name' => 'compose_new_win', 'caption' => _("Compose Messages in New Window"), 'type' => SMOPT_TYPE_BOOLEAN, 'refresh' => SMOPT_REFRESH_ALL ); - $optvals[SMOPT_GRP_GENERAL][] = array( + $optvals[SMOPT_GRP_COMPOSE][] = array( 'name' => 'compose_width', 'caption' => _("Width of Compose Window"), 'type' => SMOPT_TYPE_INTEGER, @@ -95,7 +105,7 @@ function load_optpage_data_compose() { 'size' => SMOPT_SIZE_TINY ); - $optvals[SMOPT_GRP_GENERAL][] = array( + $optvals[SMOPT_GRP_COMPOSE][] = array( 'name' => 'compose_height', 'caption' => _("Height of Compose Window"), 'type' => SMOPT_TYPE_INTEGER, @@ -103,33 +113,26 @@ function load_optpage_data_compose() { 'size' => SMOPT_SIZE_TINY ); - + /*** Load the General Options into the array ***/ - $optgrps[SMOPT_GRP_REPLY] = _("Replying and Forwarding Messages"); - $optvals[SMOPT_GRP_REPLY] = array(); - - $optvals[SMOPT_GRP_REPLY][] = array( - 'name' => 'forward_cc', - 'caption' => _("Include CCs when Forwarding Messages"), - 'type' => SMOPT_TYPE_BOOLEAN, - 'refresh' => SMOPT_REFRESH_NONE - ); + $optgrps[SMOPT_GRP_COMPOSE_REPLY] = _("Replying and Forwarding Messages"); + $optvals[SMOPT_GRP_COMPOSE_REPLY] = array(); - $optvals[SMOPT_GRP_REPLY][] = array( + $optvals[SMOPT_GRP_COMPOSE_REPLY][] = array( 'name' => 'include_self_reply_all', 'caption' => _("Include Me in CC when I Reply All"), 'type' => SMOPT_TYPE_BOOLEAN, 'refresh' => SMOPT_REFRESH_NONE ); - - $optvals[SMOPT_GRP_REPLY][] = array( + + $optvals[SMOPT_GRP_COMPOSE_REPLY][] = array( 'name' => 'sig_first', - 'caption' => _("Append Signature before Reply/Forward Text"), + 'caption' => _("Prepend Signature before Reply/Forward Text"), 'type' => SMOPT_TYPE_BOOLEAN, 'refresh' => SMOPT_REFRESH_NONE ); - $optvals[SMOPT_GRP_REPLY][] = array( + $optvals[SMOPT_GRP_COMPOSE_REPLY][] = array( 'name' => 'body_quote', 'caption' => _("Prefix for Original Message when Replying"), 'type' => SMOPT_TYPE_STRING, @@ -138,7 +141,7 @@ function load_optpage_data_compose() { 'save' => 'save_option_reply_prefix' ); - $optvals[SMOPT_GRP_REPLY][] = array( + $optvals[SMOPT_GRP_COMPOSE_REPLY][] = array( 'name' => 'reply_focus', 'caption' => _("Cursor Position when Replying"), 'type' => SMOPT_TYPE_STRLIST, @@ -149,7 +152,7 @@ function load_optpage_data_compose() { 'none' => _("No focus")) ); - $optvals[SMOPT_GRP_REPLY][] = array( + $optvals[SMOPT_GRP_COMPOSE_REPLY][] = array( 'name' => 'strip_sigs', 'caption' => _("Strip signature when replying"), 'type' => SMOPT_TYPE_BOOLEAN, @@ -166,10 +169,23 @@ function load_optpage_data_compose() { /******************************************************************/ /** Define any specialized save functions for this option page. ***/ +/** ***/ +/** You must add every function that is set in save parameter ***/ /******************************************************************/ -function save_option_header($option) { -} +/** + * This function saves the reply prefix (body_quote) character(s) + * @param object $option + */ +function save_option_reply_prefix($option) { + + // save as "NONE" if it was blanked out + // + if (empty($option->new_value)) $option->new_value = 'NONE'; -?> + // Save the option like normal. + // + save_option($option); + +}