Просмотр исходного кода

Add a first rough version of an about box to SquirrelMail.
This is linked if $provider_url is set to empty (the new default).
It's also linked from the help file. Furthermore by default no
version numbers are on the loginpage.

Thijs Kinkhorst 20 лет назад
Родитель
Сommit
0691f49ebe
6 измененных файлов с 102 добавлено и 19 удалено
  1. 4 6
      config/conf.pl
  2. 3 3
      config/config_default.php
  3. 6 3
      functions/page_header.php
  4. 4 5
      help/en_US/basic.hlp
  5. 83 0
      src/about.php
  6. 2 2
      src/login.php

+ 4 - 6
config/conf.pl

@@ -349,7 +349,7 @@ if ( $config_use_color == 1 ) {
     $config_use_color = 2;
 }
 
-while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
+while ( ( $command ne "q" ) && ( $command ne "Q" ) && ( $command ne ":q" ) ) {
     clear_screen();
     print $WHT. "SquirrelMail Configuration : " . $NRM;
     if    ( $config == 1 ) { print "Read: config.php"; }
@@ -774,8 +774,6 @@ sub command1 {
     print "If your Organization Name includes a '\$', please precede it with a \\. \n";
     print "Other '\$' will be considered the beginning of a variable that\n";
     print "must be defined before the \$org_name is printed.\n";
-    print "\$version, for example, is included by default, and will print the\n";
-    print "string representing the current SquirrelMail version.\n";
     print "\n";
     print "[$WHT$org_name$NRM]: $WHT";
     $new_org_name = <STDIN>;
@@ -844,7 +842,7 @@ sub command3 {
     print "If your Organization Title includes a '\$', please precede it with a \\. \n";
     print "Other '\$' will be considered the beginning of a variable that\n";
     print "must be defined before the \$org_title is printed.\n";
-    print "\$version, for example, is included by default, and will print the\n";
+    print "\$version, for example can be used, and will print the\n";
     print "string representing the current SquirrelMail version.\n";
     print "\n";
     print "[$WHT$org_title$NRM]: $WHT";
@@ -896,12 +894,12 @@ sub command6 {
 # Default link to provider
 sub command7 {
     print "Here you can set the link on the right of the page.\n";
-    print "The default is 'http://www.squirrelmail.org/'\n";
+    print "If empty, it will link to the SquirrelMail About page.\n";
     print "\n";
     print "[$WHT$provider_uri$NRM]: $WHT";
     $new_provider_uri = <STDIN>;
     if ( $new_provider_uri eq "\n" ) {
-        $new_provider_uri = 'http://www.squirrelmail.org/';
+        $new_provider_uri = '';
     } else {
         $new_provider_uri =~ s/[\r\n]//g;
         $new_provider_uri =~ s/^\s+$//g;

+ 3 - 3
config/config_default.php

@@ -50,7 +50,7 @@ $org_logo_height = '111';
  * This is the web page title that appears at the top of the browser window.
  * @global string $org_title
  */
-$org_title = "SquirrelMail $version";
+$org_title = "SquirrelMail";
 
 /**
  * Signout page
@@ -90,12 +90,12 @@ $provider_name = 'SquirrelMail';
  * Provider URI
  *
  * Here you can set URL of the link displayed on the right side of main page.
- *
+ * When empty, this refers to the SquirrelMail About page.
  * Link will be displayed only if you have $hide_sm_attributions
  * option set to true.
  * @global string $provider_uri
  */
-$provider_uri = 'http://www.squirrelmail.org/';
+$provider_uri = '';
 
 /*** Server Settings ***/
 /**

+ 6 - 3
functions/page_header.php

@@ -529,9 +529,12 @@ EOS;
     if (!$hide_sm_attributions)
     {
         echo html_tag( 'td', '', '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>';
+        if (empty($provider_uri)) {
+            echo '<a href="about.php">SquirrelMail</a>';
+        } else {
+            if (empty($provider_name)) $provider_name= 'SquirrelMail';
+            echo '<a href="'.$provider_uri.'" target="_blank">'.$provider_name.'</a>';
+        }
         echo "</td>\n";
     }
     echo "   </tr>\n".

+ 4 - 5
help/en_US/basic.hlp

@@ -8,11 +8,10 @@
    </summary>
    <description>
       <p>
-      So what exactly is <a href="http://www.squirrelmail.org/index.php3?from=1">SquirrelMail</a>?
-      It's a web interface to email that's written in <a href="http://www.php.net">PHP4</a>.
-      It was designed to allow email access through your server from 
-      anywhere in the world via the Web.  More information about exactly 
-      how it does this and the IMAP protocol can be found <a href="http://imap.org">here</a>.
+      So what exactly is <a href="about.php">SquirrelMail</a>?
+      It's a web interface to email: it was designed to allow email access through
+      your server from anywhere in the world via the Web. For more information about
+      who made SquirrelMail see <a href="about.php">the <em>about</em> page</a>.
       </p>
    </description>
 </chapter>   

+ 83 - 0
src/about.php

@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * about.php
+ *
+ * Copyright (c) 1999-2005 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * An "about box" detailing SquirrelMail info.
+ *
+ * TODO:
+ * - Add localisation
+ * - Insert org_name, provider_url?
+ * - What more information is needed?
+ *
+ * @version $Id$
+ * @package squirrelmail
+ */
+
+/**
+ * Path for SquirrelMail required files.
+ * @ignore
+ */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'functions/global.php');
+
+displayPageHeader($color, 'None' );
+
+?>
+<p align="center">
+<img src="../images/sm_logo.png" width="308" height="111"
+    alt="SquirrelMail Logo" /><br />
+<table align="center" width="80%" cellpadding="1" cellspacing="2" border="0">
+<tr><td bgcolor="#dcdcdc" align="center"><center><b>About SquirrelMail <?php echo $version; ?></b></center></td></tr>
+<tr><td>
+<br />
+SquirrelMail is the name of the program that provides access to your email via the web.<br />
+<br />
+<strong>If you have questions about or problems with your mailaccount, passwords, abuse etc,
+please refer to your system administrator or provider <?php
+if ( $org_name != 'SquirrelMail' ) {
+    echo '(' . $org_name . ')';
+}
+?>.</strong>
+They can assist you adequately with these issues. The SquirrelMail development team
+cannot help you with that. The <a href="help.php">help system</a> provides answers
+to frequently asked questions.<br />
+<br />
+SquirrelMail is a feature rich, standards compliant webmail application written in PHP.
+It was made by a group of volunteers united in the SquirrelMail Development Team and is
+released as open source, free software under the <a href="http://www.gnu.org/copyleft/gpl.html"
+target="_blank">GNU General Public License</a>.
+For more information about SquirrelMail and the SquirrelMail development team, see
+<a href="http://www.squirrelmail.org/" target="_blank">the SquirrelMail website</a>.<br />
+<br /><br />
+<b>System information</b><br/><br/>
+<small>
+You are using SquirrelMail version: <?php echo $version; ?><br />
+The administrator installed the following plugins:<br />
+<?php
+if ( count ($plugins) > 0 ) {
+    sort($plugins);
+    echo "<ul>\n";
+    foreach($plugins as $plugin) {
+        echo "<li>" . $plugin . "</li>\n";
+    }
+    echo "</ul>\n\n";
+} else {
+    echo "<em>none installed</em>\n\n";
+}
+?>
+</small>
+<br /><br />
+</td></tr>
+<tr><td align="center">&copy; 1999 - 2005 The SquirrelMail Development Team</td></tr>
+</table></p>
+
+
+
+</body></html>

+ 2 - 2
src/login.php

@@ -139,7 +139,7 @@ echo html_tag( 'table',
                 ' /><br />' . "\n"
               : '' ).
             ( (isset($hide_sm_attributions) && $hide_sm_attributions) ? '' :
-            '<small>' . sprintf (_("SquirrelMail version %s"), $version) . '<br />' ."\n".
+            '<small>' . _("SquirrelMail Webmail Application") . '<br />' ."\n".
             '  ' . _("By the SquirrelMail Development Team") . '<br /></small>' . "\n" ) .
             html_tag( 'table',
                 html_tag( 'tr',
@@ -186,4 +186,4 @@ echo '</form>' . "\n";
 
 do_hook('login_bottom');
 ?>
-</body></html>
+</body></html>