- cleaned up the documentation directory
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 15 Jul 2000 11:35:02 +0000 (11:35 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 15 Jul 2000 11:35:02 +0000 (11:35 +0000)
- fixed a bug in viewing attachments (download link didn't always download)

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@618 7612ce4b-ef26-0410-bec9-ea0150e637f0

doc/index.html
doc/message_array.html [deleted file]
doc/sqimap.php3 [deleted file]
doc/sqimap_config.php3 [deleted file]
doc/translating_help.txt
functions/mime.php
src/download.php
src/help.php

index 1d3b4d0be536fa27fe6d3e672920b9247dc9288e..f9d6237c061245eb04937971e8370a7051b5fd90 100644 (file)
@@ -8,18 +8,18 @@ mistakes, please email them to <a href="lehresma@css.tayloru.edu">lehresma@css.t
 
 
 <ul>
-   <a href="sqimap.php3">SquirrelMail IMAP Functions</a>
+   <a href="translating.txt">Translating</a>
    <ul>
-      These are a collection of functions designed to replace the PHP imap functions so that you
-      don't have to compile in the UW IMAP server into your PHP distrobution.
+      If you would like to make a translation of SquirrelMail, here are some guidelines to help
+         you along the way.  These were compiled, thanks to Gustav Foseid. 
    </ul>
 </ul>
 
 <ul>
-   <a href="translating.txt">Translating</a>
+   <a href="translating_help.txt">Translating the Help System</a>
    <ul>
-      If you would like to make a translation of SquirrelMail, here are some guidelines to help
-         you along the way.  These were compiled, thanks to Gustav Foseid. 
+      We have a rather extensive help system in SquirrelMail now.  This document contains
+      information about translating those help documents.
    </ul>
 </ul>
 
@@ -47,6 +47,23 @@ mistakes, please email them to <a href="lehresma@css.tayloru.edu">lehresma@css.t
    </ul>
 </ul>
 
+<ul>
+   <a href="plugin.txt">Plugins</a>
+   <ul>
+      If you would like to create plugins for SquirrelMail, this is the place
+      to start.  It gives an overview and tells what needs to be in place for
+      all plugins.
+   </ul>
+</ul>
+
+<ul>
+   <a href="README.russian_apache">Russian Apache</a>
+   <ul>
+      There are special instructions if you are running Russian Apache.  This
+      document, thanks to Konstantin Riabitsev, will help you out. 
+   </ul>
+</ul>
+
 <ul>
    Basic documentation that comes with distrbution:
    <ul>
diff --git a/doc/message_array.html b/doc/message_array.html
deleted file mode 100644 (file)
index 6e7e578..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<p>
-Here is a map of the message array that contains all the information about
-a message.  A single part message is handled the same as a multipart message,
-except in the "ENTITIES" part, there would only be one entry (0).
-</p>
-
-<pre>
-$message     ["HEADER"]                    (array)
-                ["TO"]                     (array)
-                ["CC"]                     (array)
-                ["SUBJECT"]                (string)
-                ["FROM"]                   (string)
-                ["REPLYTO"]                (string)
-                ["MAILER"]                 (string)
-                ["TYPE0"]                  (string)
-                ["TYPE1"]                  (string)
-                ["BOUNDARY"]               (string)
-                ["CHARSET"]                (string)
-                ["MIME"]                   (boolean)
-                ["ENCODING"]               (string)
-                ["MESSAGE-ID"]             (string)
-
-             ["ENTITIES"]                  (array)
-                [0]                        (array)
-                   ["TYPE0"]               (string)
-                   ["TYPE1"]               (string)
-                   ["CHARSET"]             (string)
-                   ["BOUNDARY"]            (string)
-                   ["PRIORITY"]            (integer)
-                   ["BODY"]                (array of strings)
-
-                [1]                        (array)
-                   ["TYPE0"]               (string)
-                   ["TYPE1"]               (string)
-                   ["CHARSET"]             (string)
-                   ["BOUNDARY"]            (string)
-                   ["PRIORITY"]            (integer)
-                   ["BODY"]                (array of strings)
-             .
-             .
-             .
-
-
-Example message:
-----------------------------------------------------------------------
-$message     ["HEADER"]
-                  ["TO"]                     "luke@usa.om.org,"
-                                             "nathan@usa.om.org"
-                  ["CC"]                     "matt@usa.om.org"
-                  ["SUBJECT"]                "hey there.. just testing"
-                  ["FROM"]                   "typist@usa.om.org"
-                  ["REPLYTO"]                ""
-                  ["MAILER"]                 "SquirrelMail v0.0.1"
-                  ["TYPE0"]                  "multipart"
-                  ["TYPE1"]                  "alternative"
-                  ["BOUNDARY"]               "--blkjoaiu2093ojv0q9"
-                  ["CHARSET"]                "us-ascii"
-                  ["MIME"]                   true
-                  ["ENCODING"]               "us-ascii"
-
-             ["ENTITIES"]
-                  [0]
-                     ["TYPE0"]               "text"
-                     ["TYPE1"]               "plain"
-                     ["CHARSET"]             "us-ascii"
-                     ["BOUNDARY"]            ""
-                     ["PRIORITY"]            10
-                     ["BODY"]                "This is just a test to see"
-                                             "how this will handle a message"
-                                             "for this example"
-
-                 [1]
-                     ["TYPE0"]               "text"
-                     ["TYPE1"]               "html"
-                     ["CHARSET"]             "us-ascii"
-                     ["BOUNDARY"]            ""
-                     ["PRIORITY"]            20
-                     ["BODY"]                "&lt;B>This is just a test to see&lt;/B>&lt;BR>"
-                                             "&lt;FONT FACE="Arial,Helvetica">how this will handle a message"
-                                             "for this example&lt;/FONT>"
-</pre>                                             
diff --git a/doc/sqimap.php3 b/doc/sqimap.php3
deleted file mode 100644 (file)
index bb0e291..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<html><body>
-<a name="top"></a>
-<h1>SquirrelMail IMAP functions</h1>
-<?
-       include ("sqimap_config.php3");
-
-       echo "<ul>\n";
-       for ($i = 0; $i < count($name); $i++) {
-               echo "<ul>\n";
-               echo "   <a href=\"#$name[$i]\">sqimap_$name[$i]</a> $params[$i]\n";
-               echo "</ul>\n";
-       }
-       echo "</ul>\n";
-       
-       for ($i = 0; $i < count($name); $i++) {
-               ?>
-                       <br>
-                       <hr>
-                       <a name="<? echo $name[$i] ?>"></a>
-                       <h2>sqimap_<? echo $name[$i] ?></h2>
-         <a href="#top">go to top</a>
-                       <ul>
-                               Implementation:
-                               <ul>
-                                       <code>
-                                               sqimap_<? echo $name[$i] ?> <? echo $params[$i] ?> 
-                                       </code>
-                               </ul>
-                               Explanation:
-                               <ul>
-                                       <? echo $explain[$i] ?><br>
-                                       <br>
-                                       <?
-                                               for ($p = 0; $p < count($params_desc[$i]); $p++) {
-                                                       echo "<li><b>" . $params_desc[$i][$p]["name"] . "</b> - (".$params_desc[$i][$p]["type"].") &nbsp;&nbsp; " . $params_desc[$i][$p]["desc"] . "</li>\n";
-                                               }
-                                       ?>
-                               </ul>
-                               Example:
-                               <ul>
-                                       <code>
-                                               <? echo $example[$i] ?>
-                                       </code>
-                               </ul>
-                       </ul>
-                       
-                       <br>
-               <?
-       }
-?>
-</body></html>
diff --git a/doc/sqimap_config.php3 b/doc/sqimap_config.php3
deleted file mode 100644 (file)
index afde2e0..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-<?
-$imap_stream_def = "The imap stream returned from <a href=\"#login\">sqimap_login</a>";
-
-$name[0] = "read_data";
-$params[0] = "(\$imap_stream, \$pre, \$handle_errors, &\$response, &\$message)";
-$explain[0] = "This is used to read information from the imap server. This handles error correction, error notification, etc. It will return an array of strings that contains the output for your use.";
-$params_desc[0][0]["name"] = "imap_stream";
-$params_desc[0][0]["desc"] = $imap_stream_def; 
-$params_desc[0][0]["type"] = "int";
-$params_desc[0][1]["name"] = "pre";
-$params_desc[0][1]["desc"] = "The string that goes before any commands.  In the example below, it is a001.";
-$params_desc[0][1]["type"] = "string";
-$params_desc[0][2]["name"] = "handle_errors";
-$params_desc[0][2]["desc"] = "Whether or not to handle all error messages for you";
-$params_desc[0][2]["type"] = "boolean";
-$params_desc[0][3]["name"] = "respone";
-$params_desc[0][3]["desc"] = "Returned if handle_errors is false.  It is the server's response";
-$params_desc[0][3]["type"] = "string";
-$params_desc[0][4]["name"] = "message";
-$params_desc[0][4]["desc"] = "Returned if handle_errors is false.  It is the error message";
-$params_desc[0][4]["type"] = "string";
-$example[0] = "fputs (\$imap_stream, \"a001 SELECT INBOX\\n\");<br>";
-$example[0] .="\$read_ary = sqimap_read_data(\$imap_stream, \"a001\", true, \$response, \$message);<br>";
-$example[0] .="for (\$i = 0; \$i &lt; count(\$read_ary); \$i++) {<br>";
-$example[0] .="&nbsp;&nbsp;&nbsp;&nbsp;echo \$read_ary[\$i];<br>";
-$example[0] .="}<br>";
-
-
-$name[1] = "login";
-$params[1] = "(\$username, \$password, \$imap_server_address, \$hide)";
-$explain[1] = "This function simply logs the specified user into the imap server.";
-$params_desc[1][0]["name"] = "username";
-$params_desc[1][0]["type"] = "string";
-$params_desc[1][0]["desc"] = "The user who you wish to log in.";
-$params_desc[1][1]["name"] = "password";
-$params_desc[1][1]["type"] = "string";
-$params_desc[1][1]["desc"] = "The password for the user.";
-$params_desc[1][2]["name"] = "imap_server_address";
-$params_desc[1][2]["type"] = "string";
-$params_desc[1][2]["desc"] = "Address of the IMAP server.";
-$params_desc[1][3]["name"] = "hide";
-$params_desc[1][3]["type"] = "boolean";
-$params_desc[1][3]["desc"] = "If set, this will hide all error messages from the login session.";
-$example[1] = "sqimap_login (\"luke\", \"lkajskw\", \"mail.luke.com\", false);";
-
-
-$name[2] = "logout";
-$params[2] = "(\$imap_stream)";
-$explain[2] = "This simply logs out whoever is logged into the \$imap_stream.";
-$params_desc[2][0]["name"] = "imap_stream";
-$params_desc[2][0]["type"] = "int";
-$params_desc[2][0]["desc"] = $imap_stream_def;
-$example[2] = "sqimap_logout (\$imap_stream);";
-
-
-$name[3] = "get_delimiter";
-$params[3] = "(\$imap_stream)";
-$explain[3] = "Each mailbox is delimited differently between IMAP servers.  Some would look like \"INBOX.Folder\", but others might look like \"INBOX/Folder\".  This function returns what the delimiter is so you can create mailboxes of your own.";
-$params_desc[3][0]["name"] = "imap_stream";
-$params_desc[3][0]["type"] = "int";
-$params_desc[3][0]["desc"] = $imap_stream_def;
-$example[3] = "\$dm = sqimap_get_delimiter(\$imap_stream);";
-
-
-$name[4] = "get_num_messages";
-$params[4] = "(\$imap_stream, \$mailbox)";
-$explain[4] = "Returns the number of messages in the specified folder."; 
-$params_desc[4][0]["name"] = "imap_stream";
-$params_desc[4][0]["type"] = "int";
-$params_desc[4][0]["desc"] = $imap_stream_def;
-$params_desc[4][1]["name"] = "mailbox";
-$params_desc[4][1]["type"] = "string";
-$params_desc[4][1]["desc"] = "The mailbox that you wish to check out.";
-$example[4] = "\$num = sqimap_get_num_messages (\$imap_stream, \"INBOX\");";
-
-$name[5] = "find_email";
-$params[5] = "(\$string)";
-$explain[5] = "This parses the given string for an email address.  It is meant for taking the \"from:\" header and return the email address for replying.  <br>If \$string looks like this:  Luke Ehresman &lt;lehresma@css.tayloru.edu><br>It will return this:  lehresma@css.tayloru.edu ";
-$params_desc[5][0]["name"] = "string";
-$params_desc[5][0]["type"] = "string";
-$params_desc[5][0]["desc"] = "The string that needs parsing";
-$example[5] = "\$from = \"Luke Ehresman &lt;lehresma@css.tayloru.edu><br>";
-$example[5] .="\$from_email = sqimap_find_email(\$from);";
-
-$name[6] = "find_displayable_name";
-$params[6] = "(\$string)";
-$explain[6] = "this parses the given string for a displayable name.  It is meant for taking the \"from:\" header and return the name of whom it is from.  If no name is found, it will display the email address.  If nothing acceptable is found, it just returns \$string back to you.";
-$params_desc[6][0]["name"] = "string";
-$params_desc[6][0]["type"] = "string";
-$params_desc[6][0]["desc"] = "The string that needs parsing";
-$example[6] = "";
-
-
-
-/*  16
-$name[1] = "";
-$params[1] = "";
-$explain[1] = "";
-$params_desc[1][0]["name"] = "";
-$params_desc[1][0]["type"] = "";
-$params_desc[1][0]["desc"] = "";
-$params_desc[1][1]["name"] = "";
-$params_desc[1][1]["type"] = "";
-$params_desc[1][1]["desc"] = "";
-$params_desc[1][2]["name"] = "";
-$params_desc[1][2]["type"] = "";
-$params_desc[1][2]["desc"] = "";
-$params_desc[1][3]["name"] = "";
-$params_desc[1][3]["type"] = "";
-$params_desc[1][3]["desc"] = "";
-$example[0] = "";
-*/
-?>
index 99c14ea272a77832f710265e9eb47fb46ddb0d15..4421b6a6f31f3bb56939a44ee93fc0fb46e03323 100644 (file)
@@ -1,4 +1,5 @@
 Translating the help files.
+---------------------------
 
 I have tried to write the help files in plain english with good grammer.
 Since English is not my strong point you probably can't tell, but I hope it helps.
index da9fb61c4b763d2bbffe667ed3cced7fd3006980..63690f23d1e22d5a34e767c1a222a0d4c60b38e6 100644 (file)
    
                $urlMailbox = urlencode($mailbox);
                $ent = urlencode($message->header->entity_id);
-               $body .= "<TT>&nbsp;&nbsp;&nbsp;<A HREF=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent&view=true\">" . $display_filename . "</A>&nbsp;&nbsp;(TYPE: $type0/$type1)";
+               $body .= "<TT>&nbsp;&nbsp;&nbsp;<A HREF=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">" . $display_filename . "</A>&nbsp;&nbsp;(TYPE: $type0/$type1)";
                if ($message->header->description)
                   $body .= "&nbsp;&nbsp;<b>" . htmlspecialchars($message->header->description)."</b>";
-               $body .= "&nbsp;(<a href=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">"._("download")."</a>)\n";     
+               $body .= "&nbsp;(<a href=\"../src/download.php?absolute_dl=true&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">"._("download")."</a>)\n";     
                $body .= "</TT><BR>";
                $num++;
             }
index 2231cdcda1b56144745595e8c88831c790005de3..bf44bbe443fc1b46005e5ff8d3984a8c5836b6df 100644 (file)
@@ -52,6 +52,7 @@
    // $message contains all information about the message
    // including header and body
    $message = sqimap_get_message($imapConnection, $passed_id, $mailbox);
+   $top_header = $message->header;
 
    // lets redefine message as this particular entity that we wish to display.
    // it should hold only the header for this entity.  We need to fetch the body
             header("Content-type: application/octet-stream; name=\"$filename\"");
             header("Content-Disposition: attachment; filename=\"$filename\"");
             if ($type1 == "plain") {
-               echo _("Subject") . ": " . decodeHeader(stripslashes($header->subject)) . "\n";
-               echo "   " . _("From") . ": " . decodeHeader(stripslashes($header->from)) . "\n";
-               echo "     " . _("To") . ": " . decodeHeader(stripslashes(getLineOfAddrs($header->to))) . "\n";
-               echo "   " . _("Date") . ": " . getLongDateString($header->date) . "\n\n";
+               echo _("Subject") . ": " . decodeHeader(stripslashes($top_header->subject)) . "\n";
+               echo "   " . _("From") . ": " . decodeHeader(stripslashes($top_header->from)) . "\n";
+               echo "     " . _("To") . ": " . decodeHeader(stripslashes(getLineOfAddrs($top_header->to))) . "\n";
+               echo "   " . _("Date") . ": " . getLongDateString($top_header->date) . "\n\n";
             }
             echo trim($body);
             break;
             echo $body;
             break;
       }
-   } else if ($view == "true") {
-      $body = decodeBody ($body, $header->encoding);
-      header("Content-type: $type0/$type1; name=\"$filename\"");
-      header("Content-disposition: attachment; filename=\"$filename\"");
-      if ($type0 == "text" && $type1 == "plain") {
-         echo _("Subject") . ": " . decodeHeader(stripslashes($header->subject)) . "\n";
-         echo "   " . _("From") . ": " . decodeHeader(stripslashes($header->from)) . "\n";
-         echo "     " . _("To") . ": " . decodeHeader(stripslashes(getLineOfAddrs($header->to))) . "\n";
-         echo "   " . _("Date") . ": " . getLongDateString($header->date) . "\n\n";
-      }
-      echo $body;
+#   } else if ($view == "true") {
+#      $body = decodeBody ($body, $header->encoding);
+#      header("Content-type: $type0/$type1; name=\"$filename\"");
+#      header("Content-disposition: attachment; filename=\"$filename\"");
+#      echo $body;
    } else {
       switch ($type0) {
          case "text":
index 15419ff5d601ba20aab065ae26d50cb2e52286fe..2b3d85dc95b1d46aaa51ecebedaa007a04453995 100644 (file)
@@ -1,5 +1,4 @@
 <HTML>
-<FONT FACE="Arial,Helvetica">
 
 <?php
 
    }
 
 ?>
-</FONT>
 </BODY>
 </HTML>