From: indiri69 Date: Thu, 22 Aug 2002 17:58:17 +0000 (+0000) Subject: Added two new hooks 'read_body_menu_top' and 'read_body_menu_bottom' X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=2ffa3f5715c47f5e150b4468787c30e84d0a80a6 Added two new hooks 'read_body_menu_top' and 'read_body_menu_bottom' git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3415 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/read_body.php b/src/read_body.php index 273d6a36..47763504 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -306,9 +306,9 @@ function formatRecipientString($recipients, $item ) { function formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message, $color, $FirstTimeSee) { - global $msn_user_support, $default_use_mdn, $draft_folder, $sent_folder, - $default_use_priority, $show_xmailer_default, - $mdn_user_support, $PHP_SELF, $javascript_on; + global $msn_user_support, $default_use_mdn, $draft_folder, $sent_folder, + $default_use_priority, $show_xmailer_default, + $mdn_user_support, $PHP_SELF, $javascript_on; $header = $message->rfc822_header; $env = array(); @@ -375,7 +375,7 @@ function formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message, } } echo $s; - do_hook("read_body_header"); + do_hook("read_body_header"); formatToolbar($mailbox,$passed_id,$passed_ent_id,$message, $color); echo ''; } @@ -394,7 +394,7 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp if (isset($where) && isset($what)) { $msgs_url .= 'search.php?where='.urlencode($where). '&what='.urlencode($what).'&mailbox='.$urlMailbox; - $msgs_str = _("Search results"); + $msgs_str = _("Search results"); } else { $msgs_url .= 'right_main.php?sort='.$sort.'&startMessage='. $startMessage.'&mailbox='.$urlMailbox; @@ -416,8 +416,8 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $comp_uri = $base_uri . 'src/compose.php'. '?passed_id='.$passed_id. - '&mailbox='.$urlMailbox. - (isset($passed_ent_id)?'&passed_ent_id='.$passed_ent_id:''); + '&mailbox='.$urlMailbox. + (isset($passed_ent_id)?'&passed_ent_id='.$passed_ent_id:''); if (($mailbox == $draft_folder) && ($save_as_draft)) { $comp_alt_uri = $comp_uri . '&action=draft'; @@ -430,14 +430,14 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $s .= $topbar_delimiter; if ($compose_new_win == '1') { $s .= ''.$comp_alt_string.''; + 'onclick="comp_in_new(\''.$comp_alt_uri.'\')">'.$comp_alt_string.''; } else { $s .= ''.$comp_alt_string.''; } } - + $s .= ''; - + if (!(isset($where) && isset($what)) && !$passed_ent_id) { $prev = findPreviousMessage($mbx_response['EXISTS'], $passed_id); $next = findNextMessage($passed_id); @@ -454,7 +454,7 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $uri = $base_uri . 'src/read_body.php?passed_id='.$next. '&mailbox='.$urlMailbox.'&sort='.$sort. '&startMessage='.$startMessage.'&show_more=0'; - $s .= ''._("Next").''; + $s .= ''._("Next").''; } else { $s .= _("Next"); } @@ -464,12 +464,12 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $s .= ''._("View Message").''; $par_ent_id = $message->parent->entity_id; if ($par_ent_id) { - $par_ent_id = substr($par_ent_id,0,-2); - $s .= $topbar_delimiter; - $url = set_url_var($PHP_SELF, 'passed_ent_id',$par_ent_id); - $s .= ''._("Up").''; + $par_ent_id = substr($par_ent_id,0,-2); + $s .= $topbar_delimiter; + $url = set_url_var($PHP_SELF, 'passed_ent_id',$par_ent_id); + $s .= ''._("Up").''; } - } + } $s .= ''; $comp_action_uri = $comp_uri . '&action=forward'; @@ -492,7 +492,6 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $s .= $topbar_delimiter; } - $comp_action_uri = decodeHeader($comp_uri . '&action=reply'); if ($compose_new_win == '1') { $s .= ''._("Reply All").''; } $s .= ''; + do_hook("read_body_menu_top"); echo $s; + do_hook("read_body_menu_bottom"); } function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) { @@ -537,7 +538,7 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) { } /***************************/ -/* Main of read_boby.php */ +/* Main of read_body.php */ /***************************/ /* @@ -657,15 +658,15 @@ echo '
' . $messagebody . ''; echo ' '; echo ' '; echo ' '; -echo ' '; -echo ' '; +echo ' '; +echo ' '; $attachmentsdisplay = formatAttachments($message,$ent_ar,$mailbox, $passed_id); if ($attachmentsdisplay) { - echo ' '; + echo ' '; echo ' '; - echo ' '; - echo '
'; - echo ' '; + echo '
'; + echo ' '; echo ' '; @@ -674,7 +675,7 @@ if ($attachmentsdisplay) { echo $attachmentsdisplay; echo '
'; echo ' ' . _("Attachments") . ':'; echo '
'; echo '
'; + echo ' '; echo ' '; echo ' '; }