*
* Licensed under the GNU GPL. For full terms see the file COPYING that came
* with the Squirrelmail distribution.
*
* Also view plugins/README.plugins for more information.
*
* $Id: setup.php,v 1.1.1.1 2003/10/02 15:55:02 avel Exp $
*/
include_once(SM_PATH . 'plugins/junkfolder/config.php');
function squirrelmail_plugin_init_junkfolder() {
global $squirrelmail_plugin_hooks;
$squirrelmail_plugin_hooks['special_mailbox']['junkfolder'] = 'junkfolder_markspecial';
$squirrelmail_plugin_hooks['right_main_after_header']['junkfolder'] = 'junkfolder_right_notice';
$squirrelmail_plugin_hooks['folders_bottom']['junkfolder'] = 'junkfolder_createbutton';
}
function junkfolder_markspecial($box) {
global $junkfolder_user;
if($box == $junkfolder_user) {
return true;
}
}
function junkfolder_right_notice() {
global $note, $mailbox, $junkfolder_user, $junkfolder_useimage,
$junkfolder_days;
if($mailbox == $junkfolder_user) {
$note = '';
$prev = bindtextdomain ('junkfolder', SM_PATH . 'plugins/junkfolder/locale');
textdomain ('junkfolder');
if($junkfolder_useimage == true) {
$note .= '
';
}
if($junkfolder_days == 1) {
$st = _("day");
} else {
$st = _("days");
}
$note .= _("Notice: This is your Junk Folder.") . " ";
$note .= sprintf( _("Messages older than %s %s will be automatically removed from this folder.") , $junkfolder_days, $st);
$prev = bindtextdomain('squirrelmail', SM_PATH . 'locale');
textdomain('squirrelmail');
}
}
function junkfolder_createbutton() {
global $note, $mailbox, $junkfolder_user, $junkfolder_useimage,
$junkfolder_days, $color, $boxes, $skip_folders;
$prev = bindtextdomain ('junkfolder', SM_PATH . 'plugins/junkfolder/locale');
textdomain ('junkfolder');
echo html_tag( 'table', '', 'center', '', 'width="100%" cellpadding="5" cellspacing="0" border="0"' ) .
html_tag( 'tr' ) .
html_tag( 'td', '', 'center', $color[4] ) .
html_tag( 'table', '', 'center', '', 'width="70%" cellpadding="4" cellspacing="0" border="0"' ) .
html_tag( 'tr',
html_tag( 'td', '' . _("Create Junk Folder") . '', 'center', $color[9] )
) .
html_tag( 'tr' ) .
html_tag( 'td', '', 'center', $color[0] ) .
'