for review: Mailing list changes #2

Peter David ROSS petdr at cs.mu.OZ.AU
Tue Sep 8 12:23:23 AEST 1998


Hi,

Tyson here is a new diff with Andrew's suggestions added.

Pete.

===================================================================



Estimated hours taken: 1

Make the mailing lists more accessible.

include/mailing-lists.inc:
    Try and make people more likely to check out the developers mailing
    list.

mercury-developers/include/list.inc:
mercury-users/include/list.inc:
    Layout the mailing list archive so that it is easier to find the
    month that the reader is interested in.

include/list.inc:
    File which holds the common functionality for both the developers
    and users mailing list pages.


Index: include/mailing-lists.inc
===================================================================
RCS file: /home/staff/zs/imp/w3/mailing-lists/include/mailing-lists.inc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 mailing-lists.inc
--- mailing-lists.inc	1998/09/01 02:41:04	1.1.1.1
+++ mailing-lists.inc	1998/09/07 09:16:48
@@ -6,10 +6,11 @@
 The mercury-announce list is a very low-volume list used for
 announcements about new releases and such-like.
 <li>
-The mercury-developers list is intended for people actively working on
-the Melbourne Mercury compiler.  This list contains diffs of work in
+The mercury-developers list is the main communication device between the
+different developers of Mercury.  This list contains diffs of work in
 progress and discussions of implementation details of the compiler.
-It is <A HREF="mercury-developers/list.html">archived</A>.
+If you are interested in what has been added to the compiler lately,
+please look in this <A HREF="mercury-developers/list.html">archive</A>.
 <li>
 The mercury-users list is intended for general discussion
 about Mercury.  It is <A HREF="mercury-users/list.html">
Index: mercury-developers/include/list.inc
===================================================================
RCS file: /home/staff/zs/imp/w3/mailing-lists/mercury-developers/include/list.inc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 list.inc
--- list.inc	1998/09/01 02:41:03	1.1.1.1
+++ list.inc	1998/09/08 02:18:01
@@ -1,69 +1,6 @@
 <H2>Mercury Developers Mailing List Archive</H2>
 
-<TABLE width="100%">
 <?
-$mo=date("m");
-$yr=date("y");
-
-$year=97;
-$month=02;
-
-$cols=3;
-$i=1;
-$width=(int)(100/$cols);
-
-while ($yr >= $year)
-{
-    while ($mo >= 1)
-    {
-        if ($yr == $year && $mo < $month)
-        {
-            break;
-        }
-
-        $yrmo=sprintf("%02d%02d", $yr, $mo);
-        $month_string=date("M", mktime(0,0,0,$mo,1,$yr));
-
-        $dir="mercury-developers.$yrmo";
-        if ($i == 1)
-        {
-            echo "<TR>\n";
-        }
-
-        echo("<TD width=\"$width\"%>");
-        if (file_exists($dir))
-        {
-            echo "<A HREF=\"$dir\">";
-        }
-        echo "$month_string $yr";
-
-        if (file_exists($dir))
-        {
-            echo "</A>";
-        }
-        else
-        {
-            echo " (no mail messages)";
-        }
-        echo "</TD>\n";
-
-        $mo--;
-        $i++;
-
-        if ($i > $cols)
-        {
-            echo "</TR>\n";
-            $i = 1;
-        }
-    }
-
-    $yr--;
-    $mo=12;
-}
-
-if ($i != 1)
-{
-    echo "</TR>\n";
-}
+    $list="mercury-developers";
+    include "../include/list.inc";
 ?>
-</TABLE>
Index: mercury-users/include/list.inc
===================================================================
RCS file: /home/staff/zs/imp/w3/mailing-lists/mercury-users/include/list.inc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 list.inc
--- list.inc	1998/09/01 02:41:04	1.1.1.1
+++ list.inc	1998/09/08 02:08:39
@@ -1,68 +1,7 @@
 <H2>Mercury Users Mailing List Archive</H2>
 
-<TABLE width="100%">
 <?
-$mo=date("m");
-$yr=date("y");
-
-$year=97;
-$month=01;
-
-$cols=4;
-$width=(int)(100/$cols);
-$i=1;
-
-while ($yr >= $year)
-{
-    while ($mo >= 1)
-    {
-        if ($yr == $year && $mo < $month)
-        {
-            break;
-        }
-
-        $yrmo=sprintf("%02d%02d", $yr, $mo);
-        $month_string=date("M", mktime(0,0,0,$mo,1,$yr));
-
-        if ($i == 1)
-        {
-            echo "<TR>\n";
-        }
-        echo("\t<TD width=\"$width%\">");
-
-        $dir="mercury-users.$yrmo";
-        if (file_exists($dir))
-        {
-            echo "<A HREF=\"$dir\">";
-        }
-        echo "$month_string $yr";
-
-        if (file_exists($dir))
-        {
-            echo "</A>";
-        }
-        else
-        {
-            echo " (no mail messages)";
-        }
-        echo "</TD>\n";
-
-        $mo--;
-        $i++;
-
-        if ($i > $cols)
-        {
-            echo "</TR>\n";
-            $i = 1;
-        }
-    }
-    $yr--;
-    $mo=12;
-}
-
-if ($i != 1)
-{
-    echo "</TR>\n";
-}
+    $list="mercury-users";
+    include "../include/list.inc";
 ?>
-</TABLE>
+

New File: include/list.inc
===================================================================
<?
$mo=1;
$yr=date("y");

$current_month=date("m");
$current_year=date("y");

$year=97;

$cols=3;
$width=(int)(100/$cols);

$yrmo=sprintf("%02d%02d", $current_year, $current_month);
$dir="$list.$yrmo";
echo "<A HREF=\"$dir\">Current Month</A>";

while ($yr >= $year)
{
    $year_string=date("Y", mktime(0,0,0,$mo,1,$yr));
    echo "<H3>$year_string</H3>";
    echo "<TABLE width=\"100%\">";

    $i=1;

    while ($mo <= 12)
    {
        if ($yr == $current_year && $mo > $current_month)
        {
            break;
        }

        $yrmo=sprintf("%02d%02d", $yr, $mo);
        $month_string=date("F", mktime(0,0,0,$mo,1,$yr));

        if ($i == 1)
        {
            echo "<TR>\n";
        }
        echo("\t<TD width=\"$width%\">");

        $dir="$list.$yrmo";
        if (file_exists($dir))
        {
            echo "<A HREF=\"$dir\">";
        }
        echo "$month_string";

        if (file_exists($dir))
        {
            echo "</A>";
        }
        else
        {
            echo " (no mail messages)";
        }
        echo "</TD>\n";

        $mo++;
        $i++;

        if ($i > $cols)
        {
            echo "</TR>\n";
            $i = 1;
        }
    }
    echo "</TABLE>";

    $yr--;
    $mo=1;
}
?>

----
 +----------------------------------------------------------------------+
 | Peter Ross      M Sci/Eng Melbourne Uni                              |
 | petdr at cs.mu.oz.au  WWW: www.cs.mu.oz.au/~petdr/ ph: +61 3 9344 9158  |
 +----------------------------------------------------------------------+



More information about the developers mailing list