Subject: The mailing list for listmasters using Sympa
List archive
- From: David Carter <address@concealed>
- To: "Boyle, Brian" <address@concealed>, Dave Rutlidge <address@concealed>
- Subject: Re: [en@sympa] Custom mhonarc_rc template file
- Date: Thu, 19 Jun 2025 07:35:55 +0100
On 18/06/2025 21:20, Boyle, Brian wrote:
Hello,
Does anyone have samples available or recommendation for a custom mhonarc_rc.tt2 template file in order to adjust the display of archives in the interface? (Or, is there another way to accomplish the below)
Specifically, the “Chronological” view under the Archive tab for a given list displays a non-standard date format that is confusing and not in line with what is shown in the standard “Thread” view.
We found a number of places where dates where displayed as %m/%d/%Y rather than %Y-%m-%d (or %d/%m/%Y if that is what you prefer). I think that this is what you are referring to here.
I attach the mhonarc_rc.tt2 that we use: I am afraid that it is quite long, although a diff against the vanilla file should show exactly what I have changed. You are looking for comments of the form:
<!-- DPC: Replace %m/%d/%Y with %Y-%m-%d -->
or:
<!-- DPC: Replace %m/%d/%Y with %Y-%m-%d (x3) -->
Hope that this helps.
--
David Carter Email: address@concealed
University of Cambridge,
Information Services,
7 J J Thomson Avenue,
Cambridge UK. CB3 0RB CALENDAR
<% FOREACH year = calendar %>
<% END %>
SEARCH_FORM
- <% year.key %>
$SEARCH_FORM$
$CALENDAR$
PRINTABLE_MONTH
<%|locdt("$yyyy$/$mois$")%>%Y/%m<%END%>
SELECTED_MONTH
$PRINTABLE_MONTH$ $NUMOFMSG$ <%|loc%>mails<%END%>
$PRINTABLE_MONTH$
POWERED_BY <% IF '$with_powered_by$' -%>
<%|loc%>Archive powered by<%END%> MHonArc $VERSION$.
<%- END %> text/plain; asis=us-ascii nonfixed htmlcheck maxwidth=78 text/html; asis=us-ascii allownoncidurls m2h_external::filter; subdir text/plain text/html big5; big5 big5; big5-eten plain; mhonarc::htmlize default; -decode- <-- Need to also register UTF-8-aware text clipping function --> MHonArc::UTF8::clip; MHonArc/UTF8.pm utf-8; MHonArc::UTF8::to_utf8; MHonArc/UTF8.pm 30 mail1.html thrd1.html [%TAGS <% %> %]
$SEARCH_FORM$
$CALENDAR$
<%|loc%>Chronological<%END%> <%|loc%>Thread<%END%> $PREVPGLINK$ <%|loc($PAGENUM$,$NUMOFPAGES$)%>page %1 / %2<%END%> $NEXTPGLINK$
$PRINTABLE_MONTH$ $NUMOFMSG$ <%|loc%>mails<%END%>
<%|loc%>Chronological<%END%> <%|loc%>Thread<%END%> $PREVPGLINK$ <%|loc($PAGENUM$,$NUMOFPAGES$)%>page %1 / %2<%END%> $NEXTPGLINK$
<% IF is_owner %> <%END%>
- <% IF is_owner %> <% msgidx = msgidx || 0; msgidx = msgidx + 1 ~%> <%END%> $SUBJECT$, $FROMNAME$
<% IF is_owner %> <% IF conf.reporting_spam_script_path %> <%|loc%>Report messages as undetected spam<%END%> <%END%>
<%END%> $POWERED_BY$ <%TAGS [% %]%> << < << < > >> > >> [%TAGS <% %> %]
$SEARCH_FORM$
$CALENDAR$
<%|loc%>Chronological<%END%> <%|loc%>Thread<%END%> $TPREVPGLINK$ <%|loc($PAGENUM$,$NUMOFPAGES$)%>page %1 / %2<%END%> $TNEXTPGLINK$
<% IF is_owner %>
<%END%>
$PRINTABLE_MONTH$ $NUMOFMSG$ <%|loc%>mails<%END%>
<%|loc%>Chronological<%END%> <%|loc%>Thread<%END%> $TPREVPGLINK$ <%|loc($PAGENUM$,$NUMOFPAGES$)%>page %1 / %2<%END%> $TNEXTPGLINK$
- <% IF is_owner %> <% msgidx = msgidx || 0; msgidx = msgidx + 1 ~%> <%END%> $SUBJECT$, $FROMNAME$, <%|locdt("$YYYYMMDD$")%>%Y-%m-%d<%END%>
- <% IF is_owner %> <% msgidx = msgidx || 0; msgidx = msgidx + 1 ~%> <%END%> $SUBJECT$, $FROMNAME$, <%|locdt("$YYYYMMDD$")%>%Y-%m-%d<%END%>
- <% IF is_owner %> <% msgidx = msgidx || 0; msgidx = msgidx + 1 ~%> <%END%> $SUBJECT$, $FROMNAME$, <%|locdt("$YYYYMMDD$")%>%Y-%m-%d<%END%>
<%END%>
$POWERED_BY$ <%TAGS [% %]%> $SUBJECTNA$ <%|loc%>, (continued)<%END%> <%|loc%><Possible follow-up(s)><%END%> <%|loc%>Message not available<%END%> << < << < > >> > >> [%TAGS <% %> %]
<% plid = BLOCK %><% | permalink_id %>$MSGID$<% END %><% END ~%>
<% subtitle %>
<%|loc%>Chronological<% END %>
<%|loc%>Thread<% END %>
<% IF '$with_tslice$' -%>
$TSLICE(10;10;1)$ <%- END %> $POWERED_BY$ <%TAGS [% %]%> <% IF user.email && include_picture %>
<% from_addr = BLOCK ~%> <% '$FROMADDRNAME:J$@$FROMADDRDOMAIN$' | canonic_email %> <%~ END ~%> <% IF user.email == from_addr || is_owner ~%> <%~ END %> <% IF is_owner %>
<% END %> <% IF listconf.tracking.delivery_status_notification == 'on' || listconf.tracking.message_disposition_notification == 'on_demand' || listconf.tracking.message_disposition_notification == 'on' %> <% IF may_tracking %> <% END %> <% END %> <% END %>
(?!(Subject|(Resent-)?(From|To|Cc|Date))\z)
from
to
cc
subject
date
-extra-
From:strong
To:strong
Subject:strong
-default-:strong
7
10:10
- $SUBJECTNA$, $FROMNAME$, <%|locdt("$YYYYMMDD$")%>%Y-%m-%d<%END%>
- $SUBJECTNA$, $FROMNAME$, <%|locdt("$YYYYMMDD$")%>%Y-%m-%d<%END%>
- $SUBJECTNA$, $FROMNAME$, <%|locdt("$YYYYMMDD$")%>%Y-%m-%d<%END%>
-
[en@sympa] Custom mhonarc_rc template file,
Boyle, Brian, 06/18/2025
- Re: [en@sympa] Custom mhonarc_rc template file, David Carter, 06/19/2025
Archive powered by MHonArc 2.6.19+.