#
# This is unofficial squirrelmail "lite" patch which disable use of frame.
# Original site seems to gone.
#

Index: config/config_default.php
--- config/config_default.php.orig	2006-10-07 20:58:42.000000000 +0900
+++ config/config_default.php
@@ -1028,6 +1028,11 @@ $config_use_color = 2;
 @include SM_PATH . 'config/config_local.php';
 
 /**
+ * Enable lite style.
+ */
+$config_lite = 0;
+
+/**
  * Make sure there are no characters after the PHP closing
  * tag below (including newline characters and whitespace).
  * Otherwise, that character will cause the headers to be


Index: functions/page_header.php
--- functions/page_header.php.orig	2006-06-14 23:25:41.000000000 +0900
+++ functions/page_header.php
@@ -17,6 +17,12 @@ require_once(SM_PATH . 'functions/html.p
 require_once(SM_PATH . 'functions/imap_mailbox.php');
 require_once(SM_PATH . 'functions/global.php');
 
+if ($config_lite == 0) {
+    $conf_frame_right = 'right';
+} else {
+    $conf_frame_right = '_self';
+}
+
 /* Always set up the language before calling these functions */
 function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {
     global $squirrelmail_language;
@@ -137,7 +143,8 @@ function displayPageHeader($color, $mail
                 $js .= "function sendMDN() {\n".
                          "    mdnuri=window.location+'&sendreceipt=1';\n" .
                          "    if (window.top != window.self) {\n" .
-                         "      var newwin = window.open(mdnuri,'right');\n" .
+                         "      var newwin = window.open(mdnuri,'" .
+                         $conf_frame_right . "');\n" .
                          "    } else {\n " .
                          "      var newwin = window.location = mdnuri;\n" .
                          "    }\n" .
@@ -270,7 +277,7 @@ function displayPageHeader($color, $mail
         echo '&nbsp;';
     }
     echo  "      </td>\n"
-        . html_tag( 'td', '', 'right' ) ."<b>\n";
+        . html_tag( 'td', '', $conf_frame_right ) ."<b>\n";
     displayInternalLink ('src/signout.php', _("Sign Out"), $frame_top);
     echo "</b></td>\n"
         . "   </tr>\n"
@@ -299,7 +306,7 @@ function displayPageHeader($color, $mail
 
     if (!$hide_sm_attributions)
     {
-        echo html_tag( 'td', '', 'right' ) ."\n";
+        echo html_tag( 'td', '', $conf_frame_right ) ."\n";
         if (!isset($provider_uri)) $provider_uri= 'http://www.squirrelmail.org/';
         if (!isset($provider_name)) $provider_name= 'SquirrelMail';
         echo '<a href="'.$provider_uri.'" target="_blank">'.$provider_name.'</a>';


Index: src/folders.php
--- src/folders.php.orig	2006-10-07 21:58:42.000000000 +0900
+++ src/folders.php
@@ -76,14 +76,17 @@ if ( isset($success) && $success ) {
     $td_str .= '</b><br />';
 
 
-    echo html_tag( 'table',
+    if ($config_lite == 0) {
+        echo html_tag( 'table',
                 html_tag( 'tr',
                      html_tag( 'td', $td_str .
                                '<a href="../src/left_main.php" target="left">' .
                                _("refresh folder list") . '</a>' ,
                      'center' )
                 ) ,
-            'center', '', 'width="100%" cellpadding="4" cellspacing="0" border="0"' );
+            'center', '',
+            'width="100%" cellpadding="4" cellspacing="0" border="0"' );
+    }
 }
 
 echo "\n<br />";

Index: src/options.php
--- src/options.php.orig	2006-04-15 07:27:08.000000000 +0900
+++ src/options.php
@@ -307,11 +307,13 @@ if ($optpage == SMOPT_PAGE_MAIN) {
         }
 
         /* If $max_refresh != SMOPT_REFRESH_NONE, provide a refresh link. */
-        if ( !isset( $max_refresh ) ) {
-        } else if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) {
-            echo '<a href="../src/left_main.php" target="left">' . _("Refresh Folder List") . '</a><br />';
-        } else if ($max_refresh) {
-            echo '<a href="../src/webmail.php?right_frame=options.php" target="' . $frame_top . '">' . _("Refresh Page") . '</a><br />';
+        if ($config_lite == 0) {
+            if ( !isset( $max_refresh ) ) {
+            } else if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) {
+                echo '<a href="../src/left_main.php" target="left">' . _("Refresh Folder List") . '</a><br />';
+            } else if ($max_refresh) {
+                echo '<a href="../src/webmail.php?right_frame=options.php" target="' . $frame_top . '">' . _("Refresh Page") . '</a><br />';
+            }
         }
     }
     /******************************************/

Index: src/redirect.php
--- src/redirect.php.orig	2006-12-03 00:10:13.000000000 +0900
+++ src/redirect.php
@@ -142,7 +142,11 @@ if ($javascript_setting != SMPREF_JS_ON)
 setPref($data_dir, $username, 'javascript_on', $js_pref);
 
 /* Compute the URL to forward the user to. */
-$redirect_url = 'webmail.php';
+if ($config_lite == 0) {
+    $redirect_url = 'webmail.php';
+} else {
+    $redirect_url = 'right_main.php';
+}
 
 if ( sqgetGlobalVar('session_expired_location', $session_expired_location, SQ_SESSION) ) {
     sqsession_unregister('session_expired_location');
