![]()
From: HyperMail_www@associate.com
Date: Sat Feb 27 1999 - 21:20:25 CST
Included below is a patch to hypermail-2alpha14 (not the more recent pl2)
which cleans up the antiquated LI format in the message index, and prepares
Hypermail visually to be ready for TABLE support in the message files.
I was sorely tempted to place the archive name at the top of each message
file, but am hoping to see support for archive name and subject variables
in the message header files - so resisted the impulse.
Also, as an addendum to my recent comments on the similarity of Hypermail
and recent web-based Email tools, I forgot to mention WWWThreads, which is
a very nice development at http://www.wwwthreads.org/
I am not yet aware of e-mail import capability for WWWThreads, but do like
its presentation and attachment support. It runs on MySQL and Perl.
Comments to Glen_Stewart@associate.com
---cut here---
--- print.c.orig Sat Dec 5 08:50:44 1998
+++ print.c Wed Feb 24 22:48:45 1999
@@ -116,7 +116,7 @@
/*----------------------------------------------------------------------------*/
-void print_index_header_links(FILE *fp,char *archives,char *about,int called)
+void print_index_header_links(FILE *fp,char *archives,char *about,int called,int amountmsgs)
{
/*
** Print out the links for
@@ -130,24 +130,24 @@
*/
char *ptr;
- fprintf(fp, "<UL>
");
+ fprintf(fp, "
");
if (set_mailcommand && set_hmail) {
- fprintf(fp,"<LI><STRONG><A HREF=\"%s\">%s</A></STRONG>
",
+ fprintf(fp,"<STRONG><A HREF=\"%s\">%s</A></STRONG>
",
ptr=makemailcommand("mailto:$TO", set_hmail, "", ""),
lang[MSG_NEW_MESSAGE]);
free(ptr);
}
if (about)
- fprintf(fp,"<LI><STRONG><A HREF=\"%s\">%s</A></STRONG>
",
+ fprintf(fp,"<STRONG><A HREF=\"%s\">%s</A></STRONG>
",
about, lang[MSG_ABOUT_THIS_ARCHIVE]);
if (!set_reverse && (called != FROM_AUTHOR && called != FROM_SUBJECT))
- fprintf(fp, "<LI><STRONG><A HREF=\"#end\">%s</A></STRONG>
",
+ fprintf(fp, "<STRONG><A HREF=\"#end\">%s</A></STRONG>
",
lang[MSG_MOST_RECENT_MESSAGES]);
- fprintf(fp, "<LI><STRONG>%s:</STRONG>
",lang[MSG_MESSAGES_SORTED_BY]);
+ fprintf(fp, "<STRONG>%d %s:</STRONG>
",amountmsgs, lang[MSG_MESSAGES_SORTED_BY]);
if (called != FROM_AUTHOR)
fprintf(fp,"<A HREF=\"%s\">[ %s ]</A>
",authname,lang[MSG_AUTHOR]);
@@ -162,13 +162,13 @@
fprintf(fp,"<A HREF=\"%s\">[ %s ]</A>
",subjname,lang[MSG_SUBJECT]);
if (archives)
- fprintf(fp,"<LI><STRONG><A HREF=\"%s\">%s</A></STRONG>
",
+ fprintf(fp,"<STRONG><A HREF=\"%s\">%s</A></STRONG>
",
archives, lang[MSG_OTHER_MAIL_ARCHIVES]);
- fprintf(fp, "</UL>
<P>
");
+ fprintf(fp, "<P>
");
}
-void print_index_footer_links(FILE *fp, char *archives, int called)
+void print_index_footer_links(FILE *fp, char *archives, int called,int amountmsgs)
{
/*
** Print out the links for
@@ -179,8 +179,8 @@
** as appropriate.
*/
- fprintf(fp, "<UL>
");
- fprintf(fp, "<LI><STRONG>%s:</STRONG>
", lang[MSG_MESSAGES_SORTED_BY]);
+ fprintf(fp, "
");
+ fprintf(fp, "<STRONG>%d %s:</STRONG>
",amountmsgs, lang[MSG_MESSAGES_SORTED_BY]);
if (called != FROM_AUTHOR)
fprintf(fp,"<A HREF=\"%s\">[ %s ]</A>
",authname,lang[MSG_AUTHOR]);
@@ -195,10 +195,10 @@
fprintf(fp,"<A HREF=\"%s\">[ %s ]</A>
",subjname,lang[MSG_SUBJECT]);
if (archives)
- fprintf(fp,"<LI><STRONG><A HREF=\"%s\">%s</A></STRONG>
",
+ fprintf(fp,"<STRONG><A HREF=\"%s\">%s</A></STRONG>
",
archives, lang[MSG_OTHER_MAIL_ARCHIVES]);
- fprintf(fp, "</UL>
");
+ fprintf(fp, "
");
}
/*
@@ -708,6 +708,7 @@
** Print the message's author info and date.
*/
+ fprintf(fp, "<STRONG>Subject: </STRONG>%s<BR>
", subject);
if (!strcmp(name, email)) {
if (use_mailcommand) {
fprintf(fp, "<A HREF=\"%s\">",
@@ -721,7 +722,7 @@
}
else {
if (use_mailcommand) {
- fprintf(fp,"<STRONG>%s</STRONG> (<A HREF=\"%s\">",
+ fprintf(fp,"<STRONG>From: </STRONG>%s (<A HREF=\"%s\">",
name,
ptr=makemailcommand(set_mailcommand, email,
msgid, subject));
@@ -731,7 +732,7 @@
else
fprintf(fp, "%s (<EM>%s</EM>)<BR>
", name, email);
}
- fprintf(fp, "<EM>%s</EM>
<P>
", date);
+ fprintf(fp, "<STRONG>Date: </STRONG>%s
<P>
", date);
/*
** This is here because it looks better here. The table looks
@@ -742,7 +743,7 @@
if (!set_usetable) {
fprintf(fp,"<UL>
");
if (set_mailcommand && set_hmail) {
- fprintf(fp,"<LI><STRONG><A HREF=\"%s\">%s</A></STRONG>
",
+ fprintf(fp,"<STRONG><A HREF=\"%s\">%s</A></STRONG>
",
ptr=makemailcommand("mailto:$TO", set_hmail, "", ""),
lang[MSG_NEW_MESSAGE]);
free(ptr);
@@ -948,13 +949,12 @@
if (rp->msgnum == num && rp->next != NULL &&
rp->next->msgnum != -1) {
fprintf(fp, "<LI><STRONG>%s:</STRONG> ",
- lang[MSG_NEXT_IN_THREAD]);
+ lang[MSG_NEXT_IN_THREAD]);
fprintf(fp, "<A HREF=\"%.4d.%s\">",
rp->next->msgnum, set_htmlsuffix);
fprintf(fp, "%s: \"%s\"</A>
",
- rp->next->name,
- ptr=convchars(rp->next->subject));
+ rp->next->name, ptr=convchars(rp->next->subject));
free(ptr);
}
}
@@ -1043,7 +1043,7 @@
/*
** Print out archive information links at the top of the index
*/
- print_index_header_links(fp, set_archives, set_about, FROM_DATE);
+ print_index_header_links(fp, set_archives, set_about, FROM_DATE,amountmsgs);
if (set_showhr)
fprintf(fp, "<HR>
");
@@ -1057,8 +1057,6 @@
lang[MSG_STARTING], getdatestr(firstdatenum));
fprintf(fp, "<STRONG>%s:</STRONG> <EM>%s</EM><BR>
",
lang[MSG_ENDING], getdatestr(lastdatenum));
- fprintf(fp, "<STRONG>%s:</STRONG> %d
<P>
",
- lang[MSG_MESSAGES], amountmsgs);
}
else {
fprint_menu(fp, DATE_INDEX, about, archives, "", "", PAGE_TOP);
@@ -1092,7 +1090,7 @@
/*
** Print out archive information links at the bottom of the index
*/
- print_index_footer_links(fp, archives, FROM_DATE);
+ print_index_footer_links(fp, archives, FROM_DATE,amountmsgs);
}
else {
fprint_menu(fp, DATE_INDEX, about, archives, "", "", PAGE_BOTTOM);
@@ -1227,7 +1225,7 @@
/*
** Print out the index page links
*/
- print_index_header_links(fp, archives, about, FROM_THREAD);
+ print_index_header_links(fp, archives, about, FROM_THREAD,amountmsgs);
if (set_showhr)
fprintf(fp, "<HR>
");
@@ -1236,8 +1234,6 @@
lang[MSG_STARTING], getdatestr(firstdatenum));
fprintf(fp,"<STRONG>%s:</STRONG> <EM>%s</EM><BR>
",
lang[MSG_ENDING], getdatestr(lastdatenum));
- fprintf(fp,"<STRONG>%s:</STRONG> %d
<P>
",
- lang[MSG_MESSAGES], amountmsgs );
}
else {
fprint_menu(fp, THREAD_INDEX, about, archives, "", "", PAGE_TOP);
@@ -1263,7 +1259,7 @@
/*
** Print out archive information links at the bottom of the index
*/
- print_index_footer_links(fp, archives, FROM_THREAD);
+ print_index_footer_links(fp, archives, FROM_THREAD,amountmsgs);
}
else {
@@ -1343,7 +1339,7 @@
/*
** Print out the index page links
*/
- print_index_header_links(fp, set_archives, set_about, FROM_SUBJECT);
+ print_index_header_links(fp, set_archives, set_about, FROM_SUBJECT,amountmsgs);
if (set_showhr)
fprintf(fp, "<HR>
");
@@ -1352,8 +1348,6 @@
lang[MSG_STARTING], getdatestr(firstdatenum));
fprintf(fp, "<STRONG>%s:</STRONG> <EM>%s</EM><BR>
",
lang[MSG_ENDING], getdatestr(lastdatenum));
- fprintf(fp, "<STRONG>%s:</STRONG> %d
<P>
",
- lang[MSG_MESSAGES], amountmsgs);
}
else {
fprint_menu(fp, SUBJECT_INDEX, set_about, set_archives, "", "", PAGE_TOP);
@@ -1381,7 +1375,7 @@
/*
** Print out archive information links at the bottom of the index
*/
- print_index_footer_links(fp, set_archives, FROM_SUBJECT);
+ print_index_footer_links(fp, set_archives, FROM_SUBJECT,amountmsgs);
}
else {
fprint_menu(fp, SUBJECT_INDEX, set_about, set_archives, "", "", PAGE_BOTTOM);
@@ -1459,7 +1453,7 @@
/*
** Print out the index page links
*/
- print_index_header_links(fp, set_archives, set_about, FROM_AUTHOR);
+ print_index_header_links(fp, set_archives, set_about, FROM_AUTHOR,amountmsgs);
if (set_showhr)
fprintf(fp, "<HR>
");
@@ -1468,8 +1462,6 @@
lang[MSG_STARTING], getdatestr(firstdatenum));
fprintf(fp,"<STRONG>%s:</STRONG> <EM>%s</EM><BR>
",
lang[MSG_ENDING], getdatestr(lastdatenum));
- fprintf(fp,"<STRONG>%s:</STRONG> %d
<P>
",
- lang[MSG_MESSAGES], amountmsgs );
}
else {
fprint_menu(fp, AUTHOR_INDEX, about, archives, "", "", PAGE_TOP);
@@ -1497,7 +1489,7 @@
/*
** Print out archive information links at the bottom of the index
*/
- print_index_footer_links(fp, archives, FROM_AUTHOR);
+ print_index_footer_links(fp, archives, FROM_AUTHOR,amountmsgs);
}
else {
fprint_menu(fp, AUTHOR_INDEX, set_about, archives, "", "", PAGE_BOTTOM);
![]()