discuz论坛主题帖子列表页面的最后回复人的url改成id形式的伪静态

1.修改\source\class\table\table_forum_thread.php的fetch_all_search方法,因为要把名字改成id,但是我看了下,查出的数据里面并没有最后的回复用户的id只有最后回复用户的密码,所以需要改下数据库查询语句

$data = DB::fetch_all("SELECT * FROM ".DB::table($this->get_table_name($tableid))." $forceindex".$this->search_condition($conditions)." $ordersql ".DB::limit($start, $limit));
------||-------
------||-------
------\/-------
if (DB::table($this->get_table_name($tableid))=='ivf_forum_thread') {
    $data = DB::fetch_all("SELECT ivf_forum_thread.*,b.uid AS `lastposter_id` FROM ".DB::table($this->get_table_name($tableid))." $forceindex"."LEFT JOIN ivf_ucenter_members AS b ON (`lastposter`=`username`)".$this->search_condition($conditions)." $ordersql ".DB::limit($start, $limit));
}else{
    $data = DB::fetch_all("SELECT * FROM ".DB::table($this->get_table_name($tableid))." $forceindex".$this->search_condition($conditions)." $ordersql ".DB::limit($start, $limit));
}

2,直接该默认模版位置的模版不行,不知道是什么原因,这个页面使用的模版是下面路径的模版,而不是默认位置的D:\192.168.1.117\bbs_ivf\public_html\template\eyoung_skin_csmb\forum\forumdisplay_list.htm

<td class="by">
    <cite><!--{if $thread['lastposter']}--><a href="{if $thread[digest] != -2}home.php?mod=space&uid=$thread[lastposterenc]{else}forum.php?mod=viewthread&tid=$thread[tid]&page={echo max(1, $thread[pages]);}{/if}" c="1">$thread[lastposter]</a><!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
    <em><a href="{if $thread[digest] != -2 && !$thread[ordertype]}forum.php?mod=redirect&tid=$thread[tid]&goto=lastpost$highlight#lastpost{else}forum.php?mod=viewthread&tid=$thread[tid]{if !$thread[ordertype]}&page={echo max(1, $thread[pages]);}{/if}{/if}">$thread[lastpost]</a></em>
</td>
------||-------
------||-------
------\/-------
<td class="by">
    <cite><!--{if $thread['lastposter']}--><a href="{if $thread[digest] != -2}home.php?mod=space&uid=$thread[lastposter_id]{else}forum.php?mod=viewthread&tid=$thread[tid]&page={echo max(1, $thread[pages]);}{/if}" c="1">$thread[lastposter]</a><!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
    <em><a rel="nofollow" href="{if $thread[digest] != -2 && !$thread[ordertype]}forum.php?mod=redirect&tid=$thread[tid]&goto=lastpost$highlight#lastpost{else}forum.php?mod=viewthread&tid=$thread[tid]{if !$thread[ordertype]}&page={echo max(1, $thread[pages]);}{/if}{/if}">$thread[lastpost]</a></em>
</td>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值