程序開發: Winter0706(rubbishman)
聯系電郵: winter0706@gmail.com
技朮支持: http://www.freediscuz.net
https://discuz.dismall.com
全新安裝
1.
模板forumdisplay.htm
找
- <select name="ascdesc">
- <option value="ASC" $check[asc]>{lang order_asc}</option>
- <option value="DESC" $check[desc]>{lang order_desc}</option>
- </select>
复制代码
上面加
- 排序方式 <select name="order">
- <option value="lastpost" $check[lastpost]>最後回覆時間</option>
- <option value="views" $check[views]>查看次數</option>
- <option value="replies" $check[replies]>回覆次數</option>
- <option value="dateline" $check[dateline]>發佈時間</option>
- </select>
复制代码
2.
forumdisplay.php
找(沒安裝主题分类)
- $forumdisplayadd = $filteradd = '';
复制代码
找(安裝了主题分类)
- $forumdisplayadd = $caturladd = $filteradd = $cateidadd ='';
复制代码
下面加
- $orderforumdisplayadd= '';
- if(!empty($order)) {
- if($order== 'lastpost'){
- $orderforumdisplayadd .= "&order=lastpost";
- $orderadd .="t.lastpost";
- }elseif($order == 'dateline'){
- $orderforumdisplayadd .= "&order=dateline";
- $orderadd .="t.dateline";
- }elseif($order == 'views'){
- $orderforumdisplayadd .= "&order=views";
- $orderadd .="t.views";
- }elseif($order == 'replies'){
- $orderforumdisplayadd .= "&order=replies";
- $orderadd .="t.replies";
- }} else {
- $order = '';
- $orderadd ="t.lastpost";
- }
复制代码
找
- $multipage = multi($threadcount, $tpp, $page, "forumdisplay.php?fid=$fid$forumdisplayadd");
复制代码
改
- $multipage = multi($threadcount, $tpp, $page, "forumdisplay.php?fid=$fid$forumdisplayadd$orderforumdisplayadd");
复制代码
==============如果沒安裝主题分类=============
(如果你安装了全论坛置顶的话,有两处)找
- $query = $db->query("SELECT t.* FROM $table_threads t USE INDEX(displayorder)
- WHERE t.fid='$fid' $filteradd
- ORDER BY t.displayorder DESC, t.lastpost $ascdesc
- LIMIT $start_limit, $tpp ");
复制代码
改
- $query = $db->query("SELECT t.* FROM $table_threads t USE INDEX(displayorder)
- WHERE t.fid='$fid' $filteradd
- ORDER BY t.displayorder DESC, $orderadd $ascdesc
- LIMIT $start_limit, $tpp ");
复制代码
=======================================
==============如果有安裝主题分类=============
- $query = $db->query("SELECT t.* FROM $table_threads t USE INDEX(displayorder)
- WHERE t.fid='$fid' $filteradd $cateidadd
- ORDER BY t.displayorder DESC, t.lastpost $ascdesc
- LIMIT $start_limit, $tpp ");
复制代码
改
- $query = $db->query("SELECT t.* FROM $table_threads t USE INDEX(displayorder)
- WHERE t.fid='$fid' $filteradd $cateidadd
- ORDER BY t.displayorder DESC, $orderadd $ascdesc
- LIMIT $start_limit, $tpp ");
复制代码
=======================================
找
- $check[$filter] = 'selected="selected"';
复制代码
下加
- $check[$order] = 'selected="selected"';
复制代码
~~完~~
[ 本帖最后由 rubbishman 于 2005-10-5 23:00 编辑 ] |