Intranet Software, Extranet Software, Corporate Intranets & Extranets
Translations of this page:

Customizing Notification

By default system notification in Claromentis are in plain text format. It is possible to customize these notification in HTML format.

Notification message are stored in

/{web_root}/intranet/common/languages/notifications/

Customizing Forum Notification when someone is replying or creating a new forum post can be found in:

forum.forum_function.category_users.notification_resp.txt
forum.forum_function.reply_users.notification_resp.txt
forum.forum_function.thread_users.notification_resp.txt

Example content:

 
%subject%
 
@if %is_new_reply%@%author_link% has just created a new reply to your message@endif@
@if %is_new_post%@%author_link% has just created a new post in topic@endif@
@if %is_new_forum%@%author_link% has just created a new post in forum@endif@ at %date% in
Forum Board: %board_name%
Category: <a href="%category_details_href%">%category_name%</a>
Topic: <a href="%topic_details_href%">%thread_name%</a>
With the title: %msg_topic%
The content of the post is: <br />%message%<br />
Click <a href="%url_topic_unsubscribe%">here</a> to unsubscribe from the topic.
Click <a href="%url_forum_unsubscribe%">here</a> to unsubscribe from the forum.
Click <a href="%details_href%">here</a> for complete topic.

It is possible to add html elements into the forum for example:

<table width="678" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td></td>
  </tr>
  <tr>
    <td><img width="678" height="142" title="Visit Claromentis Website" alt="Visit Claromentis Website" src="http://www.claromentis.com/newsletter/images/banner.jpg"></td>
  </tr>
  <tr>
    <td>@if %is_new_reply%@%author_link% has just created a new reply to your message@endif@
@if %is_new_post%@%author_link% has just created a new post in topic@endif@
@if %is_new_forum%@%author_link% has just created a new post in forum@endif@ at %date% in</td>
  </tr>
  <tr>
    <td>Forum Board: %board_name%<br />
Category: <a href="%category_details_href%">%category_name%</a><br />
Topic: <a href="%topic_details_href%">%thread_name%</a><br />
With the title: %msg_topic%</td>
  </tr>
  <tr>
    <td>%message%</td>
  </tr>
  <tr>
    <td><hr /></td>
  </tr>
  <tr>
    <td>Click <a href="%url_topic_unsubscribe%">here</a> to unsubscribe from the topic.
      <br />
      Click <a href="%url_forum_unsubscribe%">here</a> to unsubscribe from the forum.
      <br />
      Click <a href="%details_href%">here</a> for complete topic.</tr>
</table>

Alternative Example

Here is an example of using a DIV tag to add styles to a notification.

News: "%title%"

<div style="font-family: arial; font-size: 10px">
%date%
%channel_name%
%title% has been added.

Please click on the link below to view the news item.
<a href="%hyperlink%}">%hyperlink%</a>

Thanks

%creator%

</div>
It is important to minify your html template, because at this point notification template also read plain text, which means any line break will be translated into <br/>

You can use tool such as:

HTML Minifier

http://kangax.github.com/html-minifier/

Example output should be something like

<table width=678 border=0 cellspacing=0 cellpadding=0 style="border:2px solid blue;font-family:Arial,sans-serif"><tr><td colspan=2><img width=678 height=142 title="Visit Claromentis Website" alt="Visit Claromentis Website" src="http://www.claromentis.com/newsletter/images/banner.jpg"></td><tr><td colspan=2 style=font-weight:bold>@if %is_new_reply%@This is a new reply to your message@endif@ @if %is_new_post%@ A new post has been created in topic@endif@ @if %is_new_forum%@A new post has been created in forum@endif@</td><tr><td style=font-weight:bold>Forum Board:</td><td>%board_name%</td><tr><td style=font-weight:bold>Category:</td><td><a href="%category_details_href%">%category_name%</a></td><tr><td style=font-weight:bold>Topic:</td><td><a href="%topic_details_href%">%thread_name%</a></td><tr><td style=font-weight:bold>Title:</td><td>%msg_topic%</td><tr><td style=font-weight:bold>Date:</td><td>%date%</td><tr><td colspan=2><hr></td><tr><td colspan=2>%message%</td><tr><td colspan=2><hr></td><tr><td colspan=2 style="font-weight:bold;padding:0px">Click<a href="%url_topic_unsubscribe%">here</a>to unsubscribe from the topic.</td><tr><td colspan=2 style="font-weight:bold;padding:0px">Click<a href="%url_forum_unsubscribe%">here</a>to unsubscribe from the forum.</td></table>
 
help/notification/customizing.txt · Last modified: 07/06/2011 04:49 by admin
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki