收藏本页
联系我们
论坛帮助

牛头网络技术论坛网管专区动网相关 → 给动网论坛加入帖子排序功能

垃圾帖子的防止方法 动网水印问题 sql里的字符替换方法 2003安全设置大全 短信检测提交问题

  共有848人关注过本帖树形打印

主题:给动网论坛加入帖子排序功能

帅哥,在线噢!
牛头

  1楼


头衔:站长
金币:5059
经验:6148
金钱:9145
等级:管理员
文章:572
精华:10
加为好友
发送短信
个性首页
给动网论坛加入帖子排序功能  发贴心情 Post By:2007-12-17 16:39:24 [只看该作者]

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" >&nbsp;</xsl:text><input type="submit" name="submit" value="站内搜索"/><xsl:text disable-output-escaping="yes" >&nbsp;</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

此帖我没有实践过,使用前请先备份数据



在线咨询技术 [牛头][早起的鸟儿有虫吃!]
 牛头网电脑学院,尽显英雄本色 支持(0中立(0反对(0回到顶部
帅哥,在线噢!
牛头

  2楼


头衔:站长
金币:5059
经验:6148
金钱:9145
等级:管理员
文章:572
精华:10
加为好友
发送短信
个性首页
  发贴心情 Post By:2007-12-20 14:38:50 [只看该作者]

请大家用的时间先备份好,这个我没有测试过^_^


在线咨询技术 [牛头][早起的鸟儿有虫吃!]
 牛头网电脑学院,尽显英雄本色 支持(0中立(0反对(0回到顶部
美女呀,离线,留言给我吧!
『阿美』

  3楼


头衔:
金币:0
经验:275
金钱:539
等级:新手上路
文章:32
精华:0
加为好友
发送短信
个性首页
  发贴心情 Post By:2008-7-7 18:12:49 [只看该作者]

呵呵.好的.建议牛头哥哥多发些8.2的啊.

 牛头网电脑学院,尽显英雄本色 支持(0中立(0反对(0回到顶部
帅哥,在线噢!
牛头

  4楼


头衔:站长
金币:5059
经验:6148
金钱:9145
等级:管理员
文章:572
精华:10
加为好友
发送短信
个性首页
  发贴心情 Post By:2008-7-7 18:37:07 [只看该作者]

好的,这两天正在整理些东西发上来^_^


在线咨询技术 [牛头][早起的鸟儿有虫吃!]
 牛头软件下载站,站长工具下载 支持(0中立(0反对(0回到顶部
美女呀,离线,留言给我吧!
『阿美』

  5楼


头衔:
金币:0
经验:275
金钱:539
等级:新手上路
文章:32
精华:0
加为好友
发送短信
个性首页
  发贴心情 Post By:2008-7-7 18:55:48 [只看该作者]

等啊.多发些原创的东西...,找到一个这么好的地方,一般人我不告诉他!~~图片点击可在新窗口打开查看

一般的东西都在动网官方转来转去.有个版主,也发了好多东西,不过,他的是收费的多.


 高速双线主机 支持(0中立(0反对(0回到顶部
帅哥,在线噢!
牛头

  6楼


头衔:站长
金币:5059
经验:6148
金钱:9145
等级:管理员
文章:572
精华:10
加为好友
发送短信
个性首页
  发贴心情 Post By:2008-7-8 0:11:41 [只看该作者]

呵呵,我这里是免费的



在线咨询技术 [牛头][早起的鸟儿有虫吃!]
 牛头网电脑学院,尽显英雄本色 支持(0中立(0反对(0回到顶部