Tags:
create new tag
view all tags

SID-00553: Looking for a solution to use % TEXT % in a table

Status: Unanswered 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

      Change status to:
ALERT! 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.
SupportForm
Status Unanswered
Title Looking for a solution to use % TEXT % in a table
SupportCategory MailInContrib
TWiki version 4.1.2
Server OS RH ES 4.3
Web server 2.0.52
Perl version 5.8.6
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2009-10-09 - MatthewKoundakjian
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.