1,后台 > 风格界面模板总管理 > 分页面模板(page_index) > template.html(1)
1,1,找到
<div style="float:left;">
<form method="post" action="Query.asp">
<input name="boardid" type="hidden" value="{/xml/boarddata/@boardid}"/>
<input name="sType" type="hidden" value="2"/>
<input name="SearchDate" type="hidden" value="30"/>
<input name="pSearch" type="hidden" value="1"/>
<input name="nSearch" type="hidden" value="1"/>
<input name="isWeb" type="hidden" value="1"/>
快速搜索:<input type="text" name="keyword"/><xsl:text disable-output-escaping="yes" > </xsl:text><input type="submit" name="submit" value="站内搜索"/><xsl:text disable-output-escaping="yes" > </xsl:text><input type="submit" name="submit" value="网页搜索"/>
</form>
</div>
下面添加
<div style="float:left;margin:0px 0px 0px 10px;">
排序方式:
<select name="selTopicOrder" id="selTopicOrder" onchange="if(this.options[this.selectedIndex].value!='')location='index.asp?boardid={xml/boarddata/@boardid}&action={/xml/@action}&topicmode={/xml/@topicmode}&TopicOrder='+this.options[this.selectedIndex].value
;">
<option value="0">最后回复时间</option>
<xsl:choose>
<xsl:when test="xml/boarddata/@TopicOrder = 1">
<option value="1" selected="selected">发主题帖时间</option>
</xsl:when>
<xsl:otherwise>
<option value="1">发主题帖时间</option>
</xsl:otherwise>
</xsl:choose>
</select>
</div>
1.2,找到
<xsl:with-param name="PageStr">?boardid=<xsl:value-of select="xml/boarddata/@boardid"/>&action=<xsl:value-of select="/xml/@action"/>&topicmode=<xsl:value-of select="/xml/@topicmode"/></xsl:with-param>
修改为
<xsl:with-param name="PageStr">?boardid=<xsl:value-of select="xml/boarddata/@boardid"/>&action=<xsl:value-of select="/xml/@action"/>&topicmode=<xsl:value-of select="/xml/@topicmode"/>&TopicOrder=<xsl:value-of select="/xml/boarddata/@TopicOrder"/></xsl:with-param>
修改过程:
1,index.asp
1,1,找到
Dim XMLDom,page,TopicMode,Cmd
下面添加
Dim iBoard_Setting72
1.2,找到
If IsSqlDataBase=1 And IsBuss=1 Then
Set Cmd = Server.CreateObject("ADODB.Command")
Set Cmd.ActiveConnection=conn
Cmd.CommandText="dv_list"
Cmd.CommandType=4
Cmd.Parameters.Append cmd.CreateParameter("@boardid",3)
Cmd.Parameters.Append cmd.CreateParameter("@pagenow",3)
Cmd.Parameters.Append cmd.CreateParameter("@pagesize",3)
Cmd.Parameters.Append cmd.CreateParameter("@tl",3)
Cmd.Parameters.Append cmd.CreateParameter("@topicmode",3)
Cmd.Parameters.Append cmd.CreateParameter("@totalrec",3,2)
Cmd("@boardid")=Dvbbs.BoardID
Cmd("@pagenow")=page
Cmd("@pagesize")=Cint(Dvbbs.Board_Setting(26))
Cmd("@topicmode")=TopicMode
Cmd("@tl")=0
Set Rs=Cmd.Execute
If Not Rs.EoF Then
SQL=Rs.GetRows(-1)
Set topidlist=Dvbbs.ArrayToxml(sql,rs,"row","topic")
Else
Set topidlist=Nothing
End If
Else
Set Rs = Server.CreateObject ("adodb.recordset")
If Cint(TopicMode)=0 Then
Sql="Select TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression,TopicMode,Mode,GetMoney,GetMoneyType,UseTools,IsSmsTopic,hidename From Dv_Topic Where BoardID="&Dvbbs.BoardID&" And IsTop=0 order By LastPostTime Desc"
Else
Sql="Select TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression,TopicMode,Mode,GetMoney,GetMoneyType,UseTools,IsSmsTopic,hidename From Dv_Topic Where Mode="&TopicMode&" and BoardID="&Dvbbs.BoardID&" And IsTop=0 order By LastPostTime Desc"
End If
Rs.Open Sql,Conn,1,1
If Page >1 Then
Rs.Move (page-1) * Clng(Dvbbs.Board_Setting(26))
End If
If Not Rs.EoF Then
SQL=Rs.GetRows(Dvbbs.Board_Setting(26))
Set topidlist=Dvbbs.ArrayToxml(sql,rs,"row","topic")
Else
Set topidlist=Nothing
End If
End If
改为
'Dvbbs.Board_Setting(72):帖子列表显示按照什么排列(2006-5-25,Elook.Net.Cn Kafree 修改增加)
iBoard_Setting72=Request("TopicOrder")
If iBoard_Setting72="" Then
If UBound(Dvbbs.Board_Setting)<72 Then
iBoard_Setting72="0"
Else
iBoard_Setting72=Dvbbs.Board_Setting(72)
End If
End If
If IsSqlDataBase=1 And IsBuss=1 Then
Set Cmd = Server.CreateObject("ADODB.Command")
Set Cmd.ActiveConnection=conn
Cmd.CommandText="dv_list"
Cmd.CommandType=4
Cmd.Parameters.Append cmd.CreateParameter("@boardid",3)
Cmd.Parameters.Append cmd.CreateParameter("@pagenow",3)
Cmd.Parameters.Append cmd.CreateParameter("@pagesize",3)
Cmd.Parameters.Append cmd.CreateParameter("@tl",3)
Cmd.Parameters.Append cmd.CreateParameter("@topicmode",3)
Cmd.Parameters.Append cmd.CreateParameter("@order",3)
Cmd.Parameters.Append cmd.CreateParameter("@totalrec",3,2)
Cmd("@boardid")=Dvbbs.BoardID
Cmd("@pagenow")=page
Cmd("@pagesize")=Cint(Dvbbs.Board_Setting(26))
Cmd("@topicmode")=TopicMode
Cmd("@tl")=0
Cmd("@order")=CLng(iBoard_Setting72)
Set Rs=Cmd.Execute
If Not Rs.EoF Then
SQL=Rs.GetRows(-1)
Set topidlist=Dvbbs.ArrayToxml(sql,rs,"row","topic")
Else
Set topidlist=Nothing
End If
Else
Set Rs = Server.CreateObject ("adodb.recordset")
If Cint(TopicMode)=0 Then
Sql="Select TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression,TopicMode,Mode,GetMoney,GetMoneyType,UseTools,IsSmsTopic,hidename From Dv_Topic Where BoardID="&Dvbbs.BoardID&" And IsTop=0 order By "
Else
Sql="Select TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression,TopicMode,Mode,GetMoney,GetMoneyType,UseTools,IsSmsTopic,hidename From Dv_Topic Where Mode="&TopicMode&" and BoardID="&Dvbbs.BoardID&" And IsTop=0 order By "
End If
If iBoard_Setting72="0" Then
Sql=Sql & "LastPostTime "
Else
Sql=Sql & "TopicID "
End If
Sql=Sql & "Desc"
Rs.Open Sql,Conn,1,1
If Page >1 Then
Rs.Move (page-1) * Clng(Dvbbs.Board_Setting(26))
End If
If Not Rs.EoF Then
SQL=Rs.GetRows(Dvbbs.Board_Setting(26))
Set topidlist=Dvbbs.ArrayToxml(sql,rs,"row","topic")
Else
Set topidlist=Nothing
End If
End If
1,3,找到
LoadTopiclist()
下面添加
XMLDom.documentElement.firstChild.attributes.setNamedItem(XMLDom.createNode(2,"TopicOrder","")).text=CLng(iBoard_Setting72)
2,admin/BoardSetting.asp
2.1,找到
<tr>
<td colspan=2 class=ForumrowHighlight>
<U>显示最新帖图片地址设置(new):值为0或空时即不显示,填写准确地址;</U></td>
<td colspan=2 class=ForumrowHighlight>
<input type=text size=30 name="Board_Setting(60)" value="<%=Board_Setting(60)%>">
<%
If instr(Board_Setting(60),".gif") Then Response.Write "<img src=""../"&Board_Setting(60)&""" border=0>"
%>
</td>
<td class=ForumrowHighlight></td>
</tr>
下面添加:
<tr>
<td colspan=2 class=Forumrow>
<U>帖子列表显示按照什么排列</U></td>
<td colspan=2 class=Forumrow>
<select size="1" name="Board_Setting(72)">
<%
Dim iBoard_Setting72
If UBound(Board_Setting)<72 Then
iBoard_Setting72="0"
Else
iBoard_Setting72=Board_Setting(72)
End If
Response.Write "<option value=""0"""
If iBoard_Setting72="0" Then Response.Write " selected"
Response.Write ">最后回复时间</option>" & VbCrlf
Response.Write "<option value=""1"""
If iBoard_Setting72="1" Then Response.Write " selected"
Response.Write ">发贴时间</option>" & VbCrlf
%>
</select>
</td>
<td class=Forumrow></td>
</tr>
2.2,找到
'锁定多少天前的帖子判断,添加Board_Setting(71) 2004-9-16 Dv.Yz
将下面的
For i = 0 To 71
改为
'Board_Setting(72):帖子列表显示按照什么排列(2006-5-25,Elook.Net.Cn Kafree 修改增加)
For i = 0 To 72
此帖我没有实践过,使用前请先备份数据