Glossary Item Box

Modules: ModulesForumForums listThreadsMessage edit form

AuthorizationForms: User data page

See Also CmsDeveloperGuide Send comments on this topic.

Message list

Template for displaying a message list of some forum thread (located in ThreadMessages.ascx). Here it is tuned how the every single forum thread message is displayed.

 

In a MessageList tag you can use the following tags:

 

To display message author’s information correctly you have to set up a template for displaying user’s information.
 

In the TopPart and BottomPart tags of the MessageList tag you can use the following parameters:

Template's part Description
<%# Container.ThreadName %> Tread's name
<%# Container.PagingLinks %> The paging links
 

In the MessageTemplate and AdminTemplate tags of the MessageList tag you can use the following parameters:

Template's part Description
<%# Container.DateTime %> The DateTime object with information when the message was written
<%# Container.Date %> The date when the message was written
<%# Container.Time %> The time when the message was written
<%# Container.Message %> Message text
<%# Container.AuthorName %> Author's name
<%# Container.LinkToAuthorAvatar %> The link to avatar icon of message author
<%# Container.AuthorEmail %> Author's e-mail
<%# Container.IconTag %> The message icon tag
<%# Container.IsWrittenByCurrentUser %> Whether this message is written by the user who is currently authentificated or not
<%# Container.isWrittenByAdministrator %> Whether this message was written by forum administrator or not
<%# Container.IsCurrentUserAdministrator %> Whether this instance is current user administrator or not
<%# Container.LinkToAuthorInfo %> The link to the information about user who wrote the message
<%# Container.GetLinkForEdit(string text, string cssClass) %> The link to edit the message
<%# Container.GetAuthorICQStatusIcon(int iconNumber, string altText) %> The image code to show the message author ICQ status
 
 

A template file is located in modules/Forum/ThreadMessages.ascx and can look as follows:

<%@ Control Language="c#" Inherits="CMSLib.Pages.SiteControl" %>
<%@ Register TagPrefix="cmsf" Namespace="CMSLib.Modules.Forums" Assembly="CMSLib" %>

<cmsf:ForumPathMenu id="ForumPathMenu1" runat=server />
<cmsf:ForumContextMenu id="ForumContextMenu1" runat="server" />

<cc1:MessageList id="MessageList1" runat="server">
<TopPart>
    <table cellpadding="3" cellspacing="1" width="98%" border="0">
        <tr>
            <td align="center">Author</td>
            <td>Subject: <%# Container.ThreadName %></td>
        </tr>
</TopPart>
<BottomPart>
    <tr>
        <td colspan=6>
            <table>
            <tr>
                <td><%# Container.PagingLinks %></td>
            </tr>
            </table>
        </td>
    </tr>
    </table>
</BottomPart>
<MessageTemplate>
    <tr>
        <td align="center" width="100">
        <table align="center">
            <tr>
                <td align="center">
                    <a href="<%# Container.LinkToAuthorInfo %>">
                    <%# Container.AuthorName%></a>
                </td>
            </tr>
            <tr>
            <td align="center">
                <img src="<%# Container.LinkToAuthorAvatar %>" /></td>
            </tr>
            <tr>
                <td><%# Container.GetAuthorICQStatusIcon(25, "ICQ status")%></td>
            </tr>
            </table>
        </td>
        <td>
            <table width="100%" border=0>
            <tr>
                <td width="50%"><%# Container.IconTag %>
                    <%# Container.Date %> I <%# Container.Time %></td>
                    <td><%# Container.GetLinkBar("link2") %>
                </td>
            </tr>
            </table>
            <hr size="1" width="100%" style="border: dotted;">
            <%# Container.Message %>
        </td>
    </tr>
</MessageTemplate>
</cmsf:MessageList>
 

Modules: ModulesForumForums listThreadsMessage edit form

AuthorizationForms: User data page

 

 


© 2005-2007 Astron Digital Ltd. All Rights Reserved.