<%@ Control Language="C#" %>
<%@ Register TagPrefix="Forums" Namespace="AspNetForums.Controls" Assembly="AspNetForums.Controls" %>
<%@ Import Namespace="AspNetForums" %>
<%@ Import Namespace="AspNetForums.Controls" %>
<%@ Import Namespace="AspNetForums.Components" %>
<%@ Register TagPrefix="Forums" Namespace="AspNetForums.Controls" Assembly="AspNetForums.Controls" %>
<%@ Import Namespace="AspNetForums" %>
<%@ Import Namespace="AspNetForums.Controls" %>
<%@ Import Namespace="AspNetForums.Components" %>
<Forums:Ads Zone="Inline" runat="server" />
<% if ( Users.GetUser().IsAnonymous ) { %>
<table width="100%" cellspacing="0" cellpadding="5" border="0">
<tr>
<td>
<!-- ForumGroupView.Header.End -->
<Forums:Login SkinFilename="Skin-LoginSmall.ascx" runat="server" ID="Login1" />
<!-- ForumGroupView.MainCentent.Start -->
</td>
</tr>
</table>
<% } %>
<table width="100%" cellspacing="0" cellpadding="5" border="0">
<tr>
<td>
<!-- ForumGroupView.Header.End -->
<Forums:Login SkinFilename="Skin-LoginSmall.ascx" runat="server" ID="Login1" />
<!-- ForumGroupView.MainCentent.Start -->
</td>
</tr>
</table>
<% } %>
<table width="100%" cellpadding="5" cellspacing="0">
<tr>
<td valign="bottom" colspan="2">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="txt4" align="left" nowrap>
<Forums:DisplayUserWelcome runat="server" />
</td>
<td class="txt4" align="right" valign="bottom" nowrap>
<% if ( !Users.GetUser().IsAnonymous ) { %>
<a class="lnk3" href="<%=Globals.GetSiteUrls().MyFavorites%>">
<%=ResourceManager.GetString("MyFavorites_Description")%>
</a>
<br />
<!--<Forums:MarkAllRead runat="server" ID="Markallread1"/>-->
<% } %>
<Forums:ForumAnchor class="lnk3" AnchorType="PostsActive" runat="server" /><br />
<Forums:ForumAnchor class="lnk3" AnchorType="PostsUnanswered" runat="server" /><br />
</td>
</tr>
<tr>
<td align="left">
<Forums:BreadCrumb ShowHome="true" runat="server" ID="Breadcrumb1" />
</td>
<td align="right" class="txt4">
<Forums:SearchRedirect ID="SearchRedirect" runat="server" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<tr>
<td valign="bottom" colspan="2">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="txt4" align="left" nowrap>
<Forums:DisplayUserWelcome runat="server" />
</td>
<td class="txt4" align="right" valign="bottom" nowrap>
<% if ( !Users.GetUser().IsAnonymous ) { %>
<a class="lnk3" href="<%=Globals.GetSiteUrls().MyFavorites%>">
<%=ResourceManager.GetString("MyFavorites_Description")%>
</a>
<br />
<!--<Forums:MarkAllRead runat="server" ID="Markallread1"/>-->
<% } %>
<Forums:ForumAnchor class="lnk3" AnchorType="PostsActive" runat="server" /><br />
<Forums:ForumAnchor class="lnk3" AnchorType="PostsUnanswered" runat="server" /><br />
</td>
</tr>
<tr>
<td align="left">
<Forums:BreadCrumb ShowHome="true" runat="server" ID="Breadcrumb1" />
</td>
<td align="right" class="txt4">
<Forums:SearchRedirect ID="SearchRedirect" runat="server" />
</td>
</tr>
</table>
</td>
</tr>
</table>
这个就是登入以后所显示的表格。
下面就是论坛组的显示了,我们公司就是要我修改这里,所以准备一点一点分析。
<asp:Repeater EnableViewState="false" runat="server" id="forumGroupRepeater">
<HeaderTemplate>
<!-- ********* Repeater.Header.Start ************* //-->
<table width="100%" class="tableBorder" cellpadding="4" cellspacing="1">
<tr>
<td colspan="2" class="column" align="center" width="*"><% = ResourceManager.GetString("ForumGroupView_Inline1") %></td>
<td class="column" align="center" width="177" nowrap><%= ResourceManager.GetString("ForumGroupView_Inline4") %></td>
<td class="column" align="center" width="65" nowrap><%= ResourceManager.GetString("ForumGroupView_Inline2") %></td>
<td class="column" align="center" width="65" nowrap><%= ResourceManager.GetString("ForumGroupView_Inline3") %></td>
</tr>
</table>
<!-- ********* Repeater.HeaderTemplate.End ************* //-->
</HeaderTemplate>
<!-- ********* Repeater.Header.Start ************* //-->
<table width="100%" class="tableBorder" cellpadding="4" cellspacing="1">
<tr>
<td colspan="2" class="column" align="center" width="*"><% = ResourceManager.GetString("ForumGroupView_Inline1") %></td>
<td class="column" align="center" width="177" nowrap><%= ResourceManager.GetString("ForumGroupView_Inline4") %></td>
<td class="column" align="center" width="65" nowrap><%= ResourceManager.GetString("ForumGroupView_Inline2") %></td>
<td class="column" align="center" width="65" nowrap><%= ResourceManager.GetString("ForumGroupView_Inline3") %></td>
</tr>
</table>
<!-- ********* Repeater.HeaderTemplate.End ************* //-->
</HeaderTemplate>
<td class="fh1" colspan="5" valign="bottom">
<asp:ImageButton ID="ExpandCollapse" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ForumGroupID") %>' ImageUrl='<%# Formatter.ExplandCollapseIcon( (ForumGroup) Container.DataItem ) %>' ToolTip='<%# ResourceManager.GetString("ForumGroupView_ExpandCollapse")%>' Runat="server"/> <a href="<%# Globals.GetSiteUrls().ForumGroup ( (int) DataBinder.Eval(Container.DataItem, "ForumGroupID")) %>"><%# DataBinder.Eval(Container.DataItem, "Name") %></a>
</td>
<asp:ImageButton ID="ExpandCollapse" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ForumGroupID") %>' ImageUrl='<%# Formatter.ExplandCollapseIcon( (ForumGroup) Container.DataItem ) %>' ToolTip='<%# ResourceManager.GetString("ForumGroupView_ExpandCollapse")%>' Runat="server"/> <a href="<%# Globals.GetSiteUrls().ForumGroup ( (int) DataBinder.Eval(Container.DataItem, "ForumGroupID")) %>"><%# DataBinder.Eval(Container.DataItem, "Name") %></a>
</td>
<Forums:ForumRepeater ForumGroupID='<%# DataBinder.Eval(Container.DataItem, "ForumGroupID") %>' HideForums='<%# DataBinder.Eval(Container.DataItem, "HideForums") %>' runat="server">
<td class="f1" width="20">
<%# Formatter.StatusIcon( (Forum)Container.DataItem ) %>
</td>
<%# Formatter.StatusIcon( (Forum)Container.DataItem ) %>
</td>
<Forums:ForumLogo runat="server" Forum='<%# (Forum) Container.DataItem %>' />
<b><a href="<%# Globals.GetSiteUrls().Forum( ((Forum) Container.DataItem).ForumID ) %>">
<%# DataBinder.Eval(Container.DataItem, "Name") %>
</a></b>
<%# Formatter.FormatUsersViewingForum( (Forum) Container.DataItem ) %>
<br />
<%# DataBinder.Eval(Container.DataItem, "Name") %>
</a></b>
<%# Formatter.FormatUsersViewingForum( (Forum) Container.DataItem ) %>
<br />
这个很容易理解,就是版面名字的显示,<%# Formatter.FormatUsersViewingForum( (Forum) Container.DataItem ) %>
是显示版面现在的在线人数,很多余的东西,缓存太久了,根本不能及时显示。
<span class="txt5"></span><%# DataBinder.Eval(Container.DataItem, "Description") %><%# Formatter.FormatSubForum( (Forum) Container.DataItem ) %></span>
<br />
<forums:ForumModerators runat="server" ForumID='<%# ((Forum)Container.DataItem).ForumID %>'/>
<br />
<forums:ForumModerators runat="server" ForumID='<%# ((Forum)Container.DataItem).ForumID %>'/>
版面的简介和版主显示
<td class="fh3" align="center" width="175">
<%# Formatter.FormatLastPost( (Forum) Container.DataItem, (bool) true ) %>
</td>
<td class="fh3" align="center" width="64">
<%# Formatter.FormatNumber( ((Forum) Container.DataItem).TotalThreads ) %>
</td>
<td class="fh3" align="center" width="65">
<%# Formatter.FormatNumber( ((Forum) Container.DataItem).TotalPosts ) %>
</td>
<%# Formatter.FormatLastPost( (Forum) Container.DataItem, (bool) true ) %>
</td>
<td class="fh3" align="center" width="64">
<%# Formatter.FormatNumber( ((Forum) Container.DataItem).TotalThreads ) %>
</td>
<td class="fh3" align="center" width="65">
<%# Formatter.FormatNumber( ((Forum) Container.DataItem).TotalPosts ) %>
</td>
好了,后面都是一些闭合语句了。
分析完毕,现在修改起来也简单了,以后研究的时候会继续贴上来的,嘿嘿 版面的简介和版主显示 这三个分别显示:最后帖子,主题数,帖子数的。好了,后面都是一些闭合语句了。分析完毕,现在修改起来也简单了,以后研究的时候会继续贴上来的,嘿嘿