Free-Conversant Support / How To Edit Message Templates
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Outline of How-To Docs >> How To Edit Message Templates

Just as site templates allow you to control the look and feel of your site as a whole, Message Templates allow you to control how Discussion Group messages appear in your site.  One template is selected for viewing messages, and another for editing ( which includes reply and new topic pages ).

Finding and Editing Message Templates

The default templates for new conversations are actually "READONLY" templates, which can not be edited. So, in order to edit your message templates, you must duplicate the READONLY templates, edit the duplicates, and then tell Conversant to use these new templates.

First you need to determine which templates are currently in use.

  1. Go to the admin area for your site, which should be something like <http://www.free-conversant.com/yoursite/admin/conversations/yoursite/>
  2. Click on "Preferences" in the links on the left.
  3. Click on "Discussion Group" in the links on the left, below the word "Preferences."
  4. The main body of the page now has a form for changing some preferences. The first two prefs are "Message View Template" and "Message Edit Template." These are the templates that you need to duplicate and then edit.

Message templates are edited in the same place as the full page (or site) templates, in the admin area for your site. The URL for the template editor looks something like this:

<http://www.free-conversant.com/yoursite/admin/conversations/yoursite/templates/>

Once you're there (replace "yoursite" with the name of your site in the URL), click on "Create". Type a name for your new message editing template, then pick one of the templates from the popup list (one that you found in step 4, above). Click on the New Template button.

The template is now open in an editor. Make any changes you want, and submit the form. When you're ready to see how it looks, go back to the URL where you found the template names (in the preferences, steps 1-4 above) and change the popup list to use the new templates you just created.

From now on, all you have to do is edit the templates, as the preference is already set (until you change it).

To see the new template in use, go look at one of your messages (you may have to reload the page to see the changes).

Sample Templates

Several example message templates are available to all sites:

  • Styled Message Viewing READONLY, Styled Message Editing READONLY - These are the default ( or "built-in" ) templates.  They are a good starting place if you like the way your DG look, but just want to make some slight alterations.
  • Alternate Viewing, Alternate Editing - These templates show a possible alternate layout for the DG, just to give you some ideas of the flexibility this feature allows.
  • Styled Bound Message, Bound Message with TimeStamp - Styled Bound Message is exactly the same as the default template for a URL Bound Message.  Bound Message with TimeStamp is another simple alternative template that add the Modification Date/Time and Modifier name at the bottom of the page.

Message Macros

Inserting data in template is handled using the same simple macro syntax used elsewhere in Conversant...to use any of the macros below you would simply place <!--#macroName--> in your message template.  These are the macros for a message template using the Template Renderer style:

  • msgNum - the # of the message
  • msgBody - body of the message
  • msgCreationDate -  date/time of creation
  • msgCreatorAddress - email address of original poster
  • msgCreatorName - member name of original poster
  • msgCtReads - No. of times the message has been viewed
  • msgEnclosures - list of attachments, or form to add attachments in edit mode
  • msgInResponseTo - linked message number of the parent of a reply
  • msgModificationDate - date/time of last update to message
  • msgModifierAddress - email address ( or anonymous email ) of member who last modified message
  • msgModifierName - member name of last modifier
  • msgOwner - owner the message is assigned to, can be member or group of members
  • msgReplies - list of replies to the message
  • msgSubject - subject line of the message
  • msgLabelCellStyle - this macro is assumed to be called from a <td> tag. It will return either a bgcolor attribute with the label's color, or a CSS class attribute if the message doesn't have a label yet. It's effect is to make the whole background of the label field in the label's own color.
  • msgLabelColor - this macro will simply return the label's color. You may use it if you prefer to use a different way than msgLabelCellStyle to show the label's color.
  • msgLabelName - this will be replaced with the label's name for users that are allowed to see labels (see Viewers).
  • msgLabelTextStyle - this macro is assumed to be called from a <font> tag put around the msgLabelName macro call. It will return a color attribute with the label's text color, or an empty string if there's no label. Since msgLabelName will return an empty string to Admins and Editors, this macro won't affect what they see.
  • msgLabelTextColor - this macro will simply return the label's text color. You may use it if you prefer to use a different way than msgLabelTextStyle to set the color of the label name.
  • msgLabelId - This will be replaced with the label's id (its unique, non editable identifier).

There are also several special macros for message navigation.  These provide links to other messages, or to edit/reply to a message, etc.  All of these macros can take an attribute "text" to determine the text that will be used for the link.  They will also only return "hot" links if contextually appropriate, ie, "next message" will only be linked if the current message is not the last in the discussion.  Special Macros are:

  • nextMsgLink - link to the next higher message number
  • prevMsgLink - link to the previous message number
  • msgEditLink - link to the edit page for a message
  • msgReplyLink - link to reply to a message
  • msgFullThreadLink - link to display the full thread page for the message
  • msgTopOfThreadLink - link to the top message in a thread

There are several editing only macros, that are used to add the buttons for submitting the message back to Conversant.  Editing Only Macros:

  • msgSaveButton
  • msgPreviewButton
  • msgCancelButton
  • msgDeleteButton
  • msgLabelPopup - this will be replaced with the labels popup menu for admins and label editors, or with an empty string.
You can also specify the labels on these message-editing buttons.
View in DG