Example #1
0
 def _get_message_html(self, data, index):
     return """<table width="100%%" cellspacing="0" cellpadding="0"><tr><td width="100%%">%(username)s created message <strong>%(message)s</strong> in topic <strong>%(topic)s</strong> of group <strong>%(group)s</strong> %(when)s</td></table>""" %(
         {'message':autolink(cgi.escape(data.message)).replace("\n", '<br>'),
          'topic':data.topic.name,
          'group':data.topic.group.name,
          'username':data.user.username,
          'when':friendly_time(data.date_created),
          })
Example #2
0
    def _get_html(self, data, index):
        message = autolink(cgi.escape(data.message)).replace("\n", '<br>')
        if data.unread == True:
            message = "<strong>" + message + "</strong>"

        return """<table width="100%%" cellspacing="0" cellpadding="0"><tr><td width="100%%">%(message)s</td><td nowrap="1" align="right">
        <font color="#888888" size="7pt">%(username)s&nbsp;<br>%(date_created)s&nbsp;</font></td></tr></table>""" %(
            {'message':message,
             'username':data.user.username,
             'date_created':friendly_time(data.date_created),
             })