From 70e628ef63d5e9147e1639258daffa94ee2ca315 Mon Sep 17 00:00:00 2001 From: tokul Date: Thu, 17 Feb 2005 14:14:41 +0000 Subject: [PATCH] replacing $allowsound with $newmail_allowsound. removing $allowsound from plugin scripts. control sounds in left_main (user prefs store sound config, admin disables it later). git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8865 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/newmail/README | 8 ++++++++ plugins/newmail/newmail_opt.php | 7 ++----- plugins/newmail/setup.php | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/plugins/newmail/README b/plugins/newmail/README index e5f6f783..fc6f053c 100644 --- a/plugins/newmail/README +++ b/plugins/newmail/README @@ -49,3 +49,11 @@ to disallow the use of audio, change to $allowsound = "false"; on line 33 of newmail_opt.php + +----------------------------------------- + +From SquirrelMail 1.5.1 newmail plugin's site configuration can be stored in +config/newmail_config.php or plugins/newmail/config.php. + +$allowsound setting is replaced with $newmail_allowsound and should be stored +inside plugin's site configuration file. diff --git a/plugins/newmail/newmail_opt.php b/plugins/newmail/newmail_opt.php index 4b450c7b..7fb1871c 100644 --- a/plugins/newmail/newmail_opt.php +++ b/plugins/newmail/newmail_opt.php @@ -32,9 +32,6 @@ $media_changetitle = getPref($data_dir,$username,'newmail_changetitle'); $media = getPref($data_dir,$username,'newmail_media', '(none)'); $media_userfile_name = getPref($data_dir,$username,'newmail_userfile_name',''); -// Set $allowsound to false if you don't want sound files available -$allowsound = "true"; - echo html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="1" cellspacing="0" border="0"' ) . "\n" . html_tag( 'tr' ) . "\n" . html_tag( 'td', '', 'center' ) . @@ -55,7 +52,7 @@ echo html_tag( 'p', html_tag( 'p', sprintf(_("Selecting the %s option will change the title in some browsers to let you know when you have new mail (requires JavaScript, and only works in IE but you won't see errors with other browsers). This will always tell you if you have new mail, even if you have %s enabled."), '"'._("Change title on supported browsers").'"', '"'._("Count only messages that are RECENT").'"') ) . "\n"; -if ($allowsound == "true") { +if ($newmail_allowsound) { echo html_tag( 'p', sprintf(_("Select %s to turn on playing a media file when unseen mail is in your folders. When enabled, you can specify the media file to play in the provided file box."), '"'._("Enable Media Playing").'"') ) . "\n" . @@ -111,7 +108,7 @@ if($media_popup == 'on') { } echo 'name="media_popup" /> ('._("requires JavaScript to work").')' . "\n"; -if ($allowsound == "true") { +if ($newmail_allowsound) { // Option: media_enable echo html_tag( 'tr' ) . html_tag( 'td', _("Enable Media Playing").':', 'right', '', 'style="white-space: nowrap;"' ) . diff --git a/plugins/newmail/setup.php b/plugins/newmail/setup.php index 40a61877..a1b8be2a 100644 --- a/plugins/newmail/setup.php +++ b/plugins/newmail/setup.php @@ -207,7 +207,7 @@ function newmail_set_loadinfo() { function newmail_plugin() { global $username, $newmail_media, $newmail_enable, $newmail_popup, $newmail_recent, $newmail_changetitle, $imapConnection, $PHP_SELF; - global $newmail_mmedia; + global $newmail_mmedia, $newmail_allowsound; global $newmail_userfile_type; if ($newmail_enable == 'on' || @@ -274,7 +274,7 @@ function newmail_plugin() { } // create media output if there are new email messages - if ($totalNew > 0 && $newmail_enable == 'on' && $newmail_media != '' ) { + if ($newmail_allowsound && $totalNew > 0 && $newmail_enable == 'on' && $newmail_media != '' ) { echo newmail_create_media_tags($newmail_media); } -- 2.25.1