· Chris Hammond
Last Updated

Community Server Tweaks, Latest Posts

Learn how to enhance your Community Server site user experience with smart tweaks like displaying last post author and linking directly to the latest post in this guide. Make your forum more engaging!

Learn how to enhance your Community Server site user experience with smart tweaks like displaying last post author and linking directly to the latest post in this guide. Make your forum more engaging!

Community Server can be a pretty powerful tool if you take your time to setup a decent site for your users.

Here are a few tweaks I've made to SCCAForums.com to make it a bit more user friendly.

On the home page there are sections for active, unanswer, and my posts(if logged in). These controls don't provide much information to the user though, by default only a link and portion of the subject of a forum post.

On SCCA Forums I've setup the controls to display the user who made the last post, link directly to the last post rather than the first post, and also display and link to the particular forum that the post was made in.

To do this you need to add the following script to your default.aspx page.

<script language="C#" runat="server">

 int getPageNumber(int replies)
 {
  int page = 1;
  if (replies > 14)
  {
   page = 1 + replies /15;
  }
  return page;
 }
</script>

You also need to change the ItemTemplate section of the ThreadRepeater controls to look like the following

<ItemTemplate>
        <div class="CommonSidebarContentItem">
    <strong><a href="<%# ForumUrls.Instance().PostPaged((int) DataBinder.Eval(Container.DataItem, "MostRecentPostID"), getPageNumber((int)DataBinder.Eval(Container.DataItem, "replies")))%>"><%# DataBinder.Eval(Container.DataItem, "Subject").ToString() %></a></strong>
    - <%# DataBinder.Eval(Container.DataItem, "MostRecentPostAuthor") %>
    (<a href="<%# ForumUrls.Instance().Forum( ((Thread) Container.DataItem).SectionID ) %>"><%# DataBinder.Eval(Container.DataItem, "Forum.Name") %></a>)
        </div>
</ItemTemplate>    

More tweaks to come. https://weblogs.asp.net/christoc/archive/2006/03/16/440437.aspx

Back to Blog

Related Posts

View All Posts »
HTTP Compression for IIS 6.0

HTTP Compression for IIS 6.0

Learn how to set up HTTP Compression on IIS 6 to boost website performance. Find out if the difference is truly noticeable after enabling compression!

Excellent Programmer!

Excellent Programmer!

Looking for an excellent programmer with mad skills? Look no further! Find out more about our exceptional developer here. #programming #techtalent

Community Server Latest Post Changes

Community Server Latest Post Changes

Learn how to modify homepage controls to display latest post, author, and forum info on www.sccaforums.com using C# scripting for better user engagement.