Sometimes you want to show something only (announcement or ads) to guests, and want it to appear inside a message thread. Usually the place between the first and second messages is a good choice.
What you would want to do is to add the following to the end of
~/App_Templates/Theme_Name/UC/MessageDisplay/ItemTemplate.ascx:
<asp:literal ID="txtforguest" runat="server"
visible='<%# (CInt(Context.Items("msgListcount")) = 1 AndAlso MemberInfo.IsGuest) %>'>
<div class="item">test test</div></asp:literal> Notice that I wrap "test test" with a <div class="item">. This is only needed if you use our default theme as I wrap the entire message area with a special style. Without this div the "test test" line will not look good.
Of course, you can change it entirely to show dynamic text (server side VB code or client side javascript) or add a different server control altogether.
This is also a good place for Google Adsense.
The most important thing is the "visible" attribute of the server control:
CInt(Context.Items("msgListcount")) = 1 : this portion tells the ASP.NET engine to only show the server control after the first post
MemberInfo.IsGuest : this portion tells the ASP.NET engine to show the server control only to guests (who are not logged in)
<message edited by Samuel on Thu. May 12, '11 9:46 AM>