SID-00553: Looking for a solution to use % TEXT % in a table
| Status: |
Unanswered |
TWiki version: |
4.1.2 |
Perl version: |
5.8.6 |
| Category: |
MailInContrib |
Server OS: |
RH ES 4.3 |
Last update: |
16 years ago |
I use a template with the comment plugin that puts comments into a two row table using the pipe character TWiki formatting. I can do this because I'm using HTTP GET and can use % URLPARAM with the newline parameter to make sure the posting fits into a single cell.
MailInContrib uses a var called TEXT to be the content of the email.
How can I filter or whatnot to swap the newlines for HTML breaks. <br />
--
MatthewKoundakjian - 2009-10-06
Discussion and Answer
I gave up trying and instead copied the HTML out from a rendered page and put that into
MailInContribUserTemplate. Good enough for me for now.
Probably won't work that well for changes in styles since there are some overrides in there.
<verbatim>
%TMPL:DEF{MAILIN:normal}%
<table style="border-width:1px;" cellspacing="0" cellpadding="0" class="twikiTable" border="1">
<tr class="twikiTableEven">
<td bgcolor="#ffffff" valign="top" style="vertical-align:top;" class="twikiFirstCol">Log'd via Email by Main.TWikiGuest with subject "%SUBJECT%" on 2026-09-25 - 17:04</td>
</tr>
<tr class="twikiTableOdd">
<td bgcolor="#edf4f9" valign="top" style="vertical-align:top;" class="twikiFirstCol twikiLast"> %TEXT% </td>
</tr>
<tr class="twikiTableEven">
<td bgcolor="#ffffff" valign="top" style="vertical-align:top;" class="twikiFirstCol">With attachments...</td>
</tr>
<tr class="twikiTableOdd">
<td bgcolor="#edf4f9" valign="top" style="vertical-align:top;" class="twikiFirstCol twikiLast">
%ATTACHMENTS%</td>
</tr>
</table>
%TMPL:END%
%TMPL:DEF{MAILIN:normal:ATTACHMENT}% * [[https://twiki.org/p/pub/Support/SID-00553/%A_FILE%][%A_FILE%]]
%TMPL:END%
</verbatim>
--
MatthewKoundakjian - 2009-10-09
Closing.
--
MatthewKoundakjian - 2009-10-09
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.