X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fnewmail%2Fnewmail_opt.php;h=5b194f3875e87d890f9d17a77ecb7c34b9f775af;hb=cc201b463e7d240bd4656795e5a3f0af14fb05c8;hp=d45a4a1efe1fefce92c290b38c08b4a19aa186d7;hpb=f8a1ed5aa365d515e4e2ac3602f900bfb9447fce;p=squirrelmail.git diff --git a/plugins/newmail/newmail_opt.php b/plugins/newmail/newmail_opt.php index d45a4a1e..5b194f38 100644 --- a/plugins/newmail/newmail_opt.php +++ b/plugins/newmail/newmail_opt.php @@ -1,31 +1,29 @@ \n"; -echo html_tag( 'p', - sprintf(_("The %s option will check ALL of your folders for unseen mail, not just the inbox for notification."), '"'._("Check all boxes, not just INBOX").'"') - ) . "\n" . +echo html_tag( 'p',_("The NewMail plugin will follow the Folder Preferences option "Enable Unread Message Notification"")) . "\n" . html_tag( 'p', sprintf(_("Selecting the %s option will enable the showing of a popup window when unseen mail is in your folders (requires JavaScript)."), '"'._("Show popup window on new mail").'"') ) . "\n" . @@ -63,15 +59,16 @@ echo '' . echo '
' . "\n" . html_tag( 'table', '', '', '', 'width="100%" cellpadding="5" cellspacing="0" border="0"' ) . "\n"; -// Option: media_allbox -echo html_tag( 'tr' ) . - html_tag( 'td', _("Check all boxes, not just INBOX").':', 'right', '', 'style="white-space: nowrap;"' ) . - html_tag( 'td', '', 'left' ) . - '' . "\n"; +/* newmail_unseen_notify */ +$newmail_unseen_opts = array( 0 => _("Follow folder preferences"), + SMPREF_UNSEEN_INBOX => _("INBOX"), + SMPREF_UNSEEN_ALL => _("All folders"), + SMPREF_UNSEEN_SPECIAL => _("Special folders"), + SMPREF_UNSEEN_NORMAL => _("Regular folders")); +echo html_tag('tr', + html_tag('td',_("Check for new messages in:"),'right', '', 'style="white-space: nowrap;"'). + html_tag('td',addSelect('newmail_unseen_notify',$newmail_unseen_opts,$newmail_unseen_notify,true),'left') + ); // Option: media_recent echo html_tag( 'tr' ) . @@ -123,7 +120,7 @@ if ($newmail_allowsound) { html_tag( 'td', _("Enable Media Playing").':', 'right', '', 'style="white-space: nowrap;"' ) . html_tag( 'td', '', 'left' ) . '' . "\n"; @@ -141,13 +138,13 @@ if ($newmail_allowsound) { // Iterate sound files for options $d = dir(SM_PATH . 'plugins/newmail/sounds'); while($entry=$d->read()) { - $fname = get_location () . '/sounds/' . $entry; - if ($entry != '..' && $entry != '.' && $entry != 'CVS') { + // $fname = get_location () . '/sounds/' . $entry; + if ($entry != '..' && $entry != '.' && $entry != 'CVS' && $entry != 'index.php') { echo '\n"; } } @@ -161,14 +158,17 @@ if ($newmail_allowsound) { echo 'value="mmedia_' . $newmail_mm_name . '">' .htmlspecialchars($newmail_mm_name) . "\n"; } - // display local file option - echo '\n"; + // end of local file option } - echo 'value="(userfile)">'. - _("uploaded media file") . "\n"; - // end of local file option // Set media file name if ($newmail_media == '(none)') { @@ -178,7 +178,7 @@ if ($newmail_allowsound) { } elseif (preg_match("/^mmedia_+/",$newmail_media)) { $media_output = preg_replace("/^mmedia_/",'',$newmail_media); } else { - $media_output = substr($newmail_media, strrpos($newmail_media, '/')+1); + $media_output = basename($newmail_media); } echo ''. @@ -187,21 +187,24 @@ if ($newmail_allowsound) { "'width=150,height=30,scrollbars=no');" . 'return false;' . '" />'; - echo html_tag('tr') - . html_tag('td',_("Upload Media File:"),'right','','style="white-space: nowrap;"') - . html_tag('td','') - . "\n"; - - echo html_tag('tr') - . html_tag('td',_("Uploaded Media File:"),'right','','style="white-space: nowrap;"') - . html_tag('td',($newmail_userfile_name!='' ? htmlspecialchars($newmail_userfile_name) : _("unavailable"))) - ."\n"; - - if ($newmail_userfile_name!='') { - echo '' - .'' - .sprintf(_("Media file %s will be removed, if you upload other media file."),basename($newmail_userfile_name)) - .''; + if ($newmail_uploadsounds) { + // upload form + echo html_tag('tr') + . html_tag('td',_("Upload Media File:"),'right','','style="white-space: nowrap;"') + . html_tag('td','') + . "\n"; + // display currently uploaded file information + echo html_tag('tr') + . html_tag('td',_("Uploaded Media File:"),'right','','style="white-space: nowrap;"') + . html_tag('td',($newmail_userfile_name!='' ? htmlspecialchars($newmail_userfile_name) : _("unavailable"))) + ."\n"; + + if ($newmail_userfile_name!='') { + echo '' + .'' + .sprintf(_("Media file %s will be removed, if you upload other media file."),basename($newmail_userfile_name)) + .''; + } } echo html_tag( 'tr', "\n" . html_tag( 'td', _("Current File:"), 'right', '', 'style="white-space: nowrap;"' ) . @@ -219,4 +222,5 @@ echo html_tag( 'tr', "\n" . 'left' ) ) . "\n"; ?> -
\ No newline at end of file + +