Rev 2 | Blame | Last modification | View Log | RSS feed
OVERVIEW~~~~~~~~Show what is this message template thing and how does it work?When the software was being redesigned the idea of using a templateengine (like Smarty, http://smarty.php.net) was considered but in theend was turned down because it would probably just add extra work tosetup. Instead, a very simple system for displaying messages via atemplate was designed. Whenever a message is about to be displayedthe template is loaded up and variable substitution occurs.THE VARIABLES~~~~~~~~~~~~~<ezmlm-headers><ezmlm-header-name>: <ezmlm-header-value></ezmlm-headers>The way the headers are displayed is in a loop. If you look at thedefault template below you will notice that only one table row hasbeen defined. When the template is being parsed everything in betweenthe <ezmlm-headers></ezmlm-headers> tags is displayed for each header.In each loop <ezmlm-header-name> is replaced with the name of the nextheader and <ezmlm-header-value> is replaced with the value of the nextheader.<ezmlm-body>This is replaced with the body of the message (which has been decodedfollowing RFC2045 specifications).And that's it!DEFAULT TEMPLATE~~~~~~~~~~~~~~~~<table width="98%" bgcolor="#ffffff" border=1 cellpadding=4 cellspacing=0><tr><td><table width="100%" bgcolor="#eeeeee" border=0 cellpadding=0 cellspacing=0><ezmlm-headers><tr><td nowrap width="10%" align=right valign=top> <b><ezmlm-header-name> :</b> </td><td align=left valign=top><ezmlm-header-value></td></tr><tr><td width="10%"></td><td bgcolor="#cccccc"></td></tr></ezmlm-headers></table></td></tr><tr><td><ezmlm-body></td></tr></table>