replacing $allowsound with $newmail_allowsound. removing $allowsound from
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 17 Feb 2005 14:14:41 +0000 (14:14 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 17 Feb 2005 14:14:41 +0000 (14:14 +0000)
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
plugins/newmail/newmail_opt.php
plugins/newmail/setup.php

index e5f6f783e0aecf3eb29932b25f2a8f02201651bd..fc6f053cf6c5b0506e6739f11086a32baa1e7e03 100644 (file)
@@ -49,3 +49,11 @@ to disallow the use of audio, change
 to 
     $allowsound = "false";
 on line 33 of newmail_opt.php
 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.
index 4b450c7bd0e25fa414c51d14a8b4b557e407e714..7fb1871cd1791f41c1a8ad4c071b8a1d0cda852d 100644 (file)
@@ -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','');
 
 $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' ) .
 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."), '&quot;'._("Change title on supported browsers").'&quot;', '&quot;'._("Count only messages that are RECENT").'&quot;')
      ) . "\n";
      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."), '&quot;'._("Change title on supported browsers").'&quot;', '&quot;'._("Count only messages that are RECENT").'&quot;')
      ) . "\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."), '&quot;'._("Enable Media Playing").'&quot;')
          ) . "\n" .
     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."), '&quot;'._("Enable Media Playing").'&quot;')
          ) . "\n" .
@@ -111,7 +108,7 @@ if($media_popup == 'on') {
 }
 echo 'name="media_popup" />&nbsp;('._("requires JavaScript to work").')</td></tr>' . "\n";
 
 }
 echo 'name="media_popup" />&nbsp;('._("requires JavaScript to work").')</td></tr>' . "\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;"' ) .
 // Option: media_enable
     echo html_tag( 'tr' ) .
             html_tag( 'td', _("Enable Media Playing").':', 'right', '', 'style="white-space: nowrap;"' ) .
index 40a61877ea7349639f110094c533908a6c7e11b9..a1b8be2afa085c3c390a5b7b6dcd142754a0d983 100644 (file)
@@ -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;
 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' ||
     global $newmail_userfile_type;
 
     if ($newmail_enable == 'on' ||
@@ -274,7 +274,7 @@ function newmail_plugin() {
         }
 
         // create media output if there are new email messages
         }
 
         // 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);
         }
 
             echo newmail_create_media_tags($newmail_media);
         }