Update of /cvsroot/mhonarc/mharc/bin
In directory subversions:/tmp/cvs-serv27411/bin
Modified Files:
web-archive
Log Message:
* bin/web-archive
. Added definition of $NMZ-SUBJECT-QUERY$ resource variable. It
expands to a namazu query string that will find all messages with
the same subject as the current message.
This variable is referenced in the updated lib/common.mrc.in.dist
resource for use with the new [More on this subject...] link
at the end of the message body.
* lib/common.mrc.in.dist:
. Added "[More on this subject...]" to message page layout that
will provide a list of archive messages with the same subject as
the current message. This is an alternative navigational aid
to discussion threads since it is not limited to the current
period as thread listings are.
. Some restructuring to support localization. For an example on how
localization can be done for a language, see
lib/mrc/_lang_en.mrc.in.dist.
* lib/mrc/_lang_en.mrc.in.dist
. NEW: Includable resource file for English localization
(defaults in common.mrc.in.dist are already in English, so this
file mainly serves as a template for creating resource files
for other languages).
* lib/mrc/_logo.mrc.in.dist
. NEW: Includable resource file to allow for the addition of
a logo, or small image, at the top of archive pages.
* lib/mrc/_nosearch.mrc.in.dist
. NEW: Includable resource file for archives with searching disabled.
* lib/mrc/_nospam.mrc.in.dist
. NEW: Includable resource file for those who want to deter
address harvesters.
Index: web-archive
===================================================================
RCS file: /cvsroot/mhonarc/mharc/bin/web-archive,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** web-archive 3 Sep 2002 16:30:47 -0000 1.31
--- web-archive 8 Sep 2002 04:39:35 -0000 1.32
***************
*** 404,407 ****
--- 404,408 ----
next;
}
+ $mhonarc::CBRcVarExpand = \&mha_rcvar_expand;
$cur_msg_cnt = $mhonarc::NumOfMsgs || 0;
mhonarc::process_input();
***************
*** 763,766 ****
--- 764,796 ----
warn qq/Warning: Unable to rename "$tmp_index" to "$index_html": $!\n/;
}
+ }
+
+ sub mha_rcvar_expand {
+ my $mha_index = shift;
+ my $var_name = shift;
+ my $arg = shift;
+
+ my $val = undef;
+ if ($var_name eq 'NMZ-SUBJECT-QUERY') {
+ my($lref, $key, $pos) =
+ mhonarc::compute_msg_pos($mha_index, $var_name, $arg);
+ return undef unless defined($key);
+
+ my $clipped = 0;
+ $val = mhonarc::get_base_subject($key);
+ if (length($val) > 128) {
+ $val = substr($val, 0, 128);
+ $clipped = 1;
+ }
+ $val = "\Q$val\E";
+ $val =~ s/\s+/\s+/g;
+ my $repl_re = $mhonarc::SubReplyRxp;
+ my $query = "+subject:/^(?:$repl_re)*$val";
+ $query .= '\s*$' unless $clipped;
+ $query .= '/';
+ return ($query, 0, 0);
+ }
+
+ return undef;
}
---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV