Skip to Content.
Sympa Menu

en - Re: [en@sympa] Custom mhonarc_rc template file

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • 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 %>
  • <% year.key %>
<% FOREACH month = ['01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12'] %> <% IF year.value.item(month) %> <% IF year.key == '$yyyy$' && month == '$mois$'%> <% month %> <% ELSE %> <% month %> <% END %> <% ELSE %> <% month %> <% END %> <% END %>
<% END %>
SEARCH_FORM
TOP_PANEL
$SEARCH_FORM$ $CALENDAR$
$PRINTABLE_MONTH$   $NUMOFMSG$ <%|loc%>mails<%END%>

PRINTABLE_MONTH <%|locdt("$yyyy$/$mois$")%>%Y/%m<%END%> SELECTED_MONTH

$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$
$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$
$PRINTABLE_MONTH$   $NUMOFMSG$ <%|loc%>mails<%END%>

<%|loc%>Chronological<%END%> <%|loc%>Thread<%END%> $TPREVPGLINK$ <%|loc($PAGENUM$,$NUMOFPAGES$)%>page %1 / %2<%END%> $TNEXTPGLINK$
<% IF is_owner %> <%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%>
  • <% IF is_owner %> <% msgidx = msgidx || 0; msgidx = msgidx + 1 ~%> <%END%> $SUBJECT$, $FROMNAME$, <%|locdt("$YYYYMMDD$")%>%Y-%m-%d<%END%>
<% IF is_owner %>

<%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 %>  
    $PREVBUTTON$ <%|loc%>Chronological<%END%> $NEXTBUTTON$      $TPREVBUTTON$ <%|loc%>Thread<%END%> $TNEXTBUTTON$

    <% IF '$with_tslice$' -%>

    $TSLICE(10;10;1)$ <%- END %> $POWERED_BY$ <%TAGS [% %]%> <% IF user.email && include_picture %>
    <%|loc%>picture<%END%>
    <% END %> <% IF user.email && action == 'arc' %> <% IF list_conf.reply_to_header.apply == 'forced' %> <% IF list_conf.reply_to_header.value == 'all' %> <% ELSIF list_conf.reply_to_header.value == 'other_email' %> <% SET oemail = list_conf.reply_to_header.other_email %> <% ELSIF list_conf.reply_to_header.value == 'list' %> <% ELSIF list_conf.reply_to_header.value == 'sender' %> <% END %> <% ELSE %> <%|loc%>Reply to<%END%> checked <%END%> /> <%|loc%>sender<%END%> checked <%END%> /> <%|loc%>list<%END%> checked <%END%> /> <%|loc%>both<%END%> <% END %>

    <% 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%>
    < < > > < < > > <%|locdt("$YYYYMMDD$")%>%Y-%m-%d<%END%>
    <%|loc%>Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday<%END%> <%|loc%>Sun:Mon:Tue:Wed:Thu:Fri:Sat<%END%> <%|loc%>January:February:March:April:May:June:July:August:September:October:November:December<%END%> <%|loc%>Jan:Feb:Mar:Apr:May:Jun:Jul:Aug:Sep:Oct:Nov:Dec<%END%> <% IF lang == 'cs' || lang == 'hu' || lang == 'et' ~%> <% END ~%>



    Archive powered by MHonArc 2.6.19+.

    Top of Page