Allow text area options to use trailing_text attribute
[squirrelmail.git] / templates / default_advanced / page_header.tpl
index 08b147cfcb2fa960fe71c4756e78dbb1a0aa3e3c..4913d6c29c70900ab1b926e09b7faa1a65b17f0b 100644 (file)
@@ -64,10 +64,10 @@ $help_link          = makeInternalLink ('src/help.php', $help_str);
 <?php
 
    /** if preview pane turned on, do not show menubar above message */
-   global $data_dir, $username, $PHP_SELF, $pp_skip_menubar;
+   global $data_dir, $username, $pp_skip_menubar;
    $use_previewPane = getPref($data_dir, $username, 'use_previewPane', 0);
    $show_preview_pane = checkForJavascript() && $use_previewPane;
-   $current_page_is_read_body = (strpos($PHP_SELF, '/read_body.php') !== FALSE);
+   $current_page_is_read_body = (defined('PAGE_NAME') && 'PAGE_NAME' == 'read_body');
    if (!$pp_skip_menubar && (!$current_page_is_read_body || !$show_preview_pane)) {
 // Note: If we want to hide menubar on compose screen, we could do the following, 
 // but the compose screen when in the message list frame should not have the menubar
@@ -75,7 +75,7 @@ $help_link            = makeInternalLink ('src/help.php', $help_str);
 // and then use document.write() to output the menubar if needed... and we'll
 // leave that for some other time
 //-   if (!$pp_skip_menubar && (!$current_page_is_read_body || !$show_preview_pane)) {
-//+   $current_page_is_compose = (strpos($PHP_SELF, '/compose.php') !== FALSE);
+//+   $current_page_is_compose = (defined('PAGE_NAME') && 'PAGE_NAME' == 'compose');
 //+   if (!$pp_skip_menubar 
 //+    && ((!$current_page_is_read_body && !$current_page_is_compose) 
 //+        || !$show_preview_pane)) {
@@ -102,7 +102,7 @@ $help_link          = makeInternalLink ('src/help.php', $help_str);
    <?php echo $options_link; ?>&nbsp;&nbsp;
    <?php echo $search_link; ?>&nbsp;&nbsp;
    <?php echo $help_link; ?>&nbsp;&nbsp;
-   <?php /* FIXME: no hooks in templates!! */ global $null; do_hook('menuline', $null); ?>
+   <?php if (!empty($plugin_output['menuline'])) echo $plugin_output['menuline']; ?>
   </td>
   <td class="sqm_providerInfo">
     <?php 
@@ -129,13 +129,15 @@ $help_link                = makeInternalLink ('src/help.php', $help_str);
 <!--
    var delayed_page_load_uri = '';
    function delayed_page_load(page_uri)
-   { page_load_uri = page_uri; setTimeout('page_load()', 500); }
+   { delayed_page_load_uri = page_uri; setTimeout('page_load()', 500); }
    function page_load()
-   { document.location = page_load_uri; }
+   { document.location = delayed_page_load_uri; }
    function refresh_message_list()
    {
+<?php if (!empty($message_list_href)) { ?>
       if (typeof(parent.right.delayed_page_load) != 'undefined')
          parent.right.delayed_page_load("<?php echo $message_list_href; ?>");
+<?php } ?>
    }
 <?php 
 
@@ -144,7 +146,6 @@ $help_link          = makeInternalLink ('src/help.php', $help_str);
    if ($show_preview_pane 
     && getPref($data_dir, $username, 'previewPane_autohide', 0) == 1) 
    {
-      global $PHP_SELF;
       $previewPane_vertical_split = getPref($data_dir, $username, 'previewPane_vertical_split', 0);
       if ($previewPane_vertical_split)
          $orientation = 'cols';
@@ -152,7 +153,7 @@ $help_link          = makeInternalLink ('src/help.php', $help_str);
          $orientation = 'rows';
       
       // spit out javascript to maximize compose frame
-      if (strpos($PHP_SELF, '/compose.php') !== FALSE)
+      if (defined('PAGE_NAME') && PAGE_NAME=='compose')
       {
 ?>
    var first_frame = 0;
@@ -180,16 +181,15 @@ $help_link                = makeInternalLink ('src/help.php', $help_str);
    }
 <?php 
 
-      // not on the compose screen, either hide or restore preview pane
-      } else {
+    // not on the compose screen, either hide or restore preview pane
+    } else {
 
-         $previewPane_size = getPref($data_dir, $username, 'previewPane_size', 300);
-         if (strpos($PHP_SELF, '/right_main.php') !== FALSE
-          || strpos($PHP_SELF, '/search.php') !== FALSE)
+        $previewPane_size = getPref($data_dir, $username, 'previewPane_size', 300);
+        if (defined('PAGE_NAME') && (PAGE_NAME=='right_main'||PAGE_NAME=='search')) {
             $new_size = $previewPane_size;
-         else
+        } else {
             $new_size = 0;
-
+        }
 ?>
    if (self.name == 'right')
    {