无限星辰工作室-客户无限互联网动力之源

标题: Discuz!x3.2 实现 分类信息伪静态显示方法 [打印本页]

作者: crx349    时间: 2014-12-10 09:20
标题: Discuz!x3.2 实现 分类信息伪静态显示方法
1.添加伪静态规则
  1. RewriteRule ^(.*)/xmspace-(\w+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=forumdisplay&fid=$2&filter=typeid&typeid=$3&$5
复制代码


代码中 xmspace  这个可以根据自己的爱好来设置(后面需要使用到,请记住你的设置)。
2. 打开这个文件 /source/module/forum/forum_forumdisplay.php
       查找以下代码:
  1. if($_G['forum']['threadtypes']['prefix'] == 1) {
  2.                         $thread['typehtml'] = '<em>[<a href="forum.php?mod=forumdisplay&fid='.$_G['fid'].'&amp;filter=typeid&amp;typeid='.$thread['typeid'].'">'.$_G['forum']['threadtypes']['types'][$thread['typeid']].'</a>]</em>';
复制代码


修改为:
  1. if($_G['forum']['threadtypes']['prefix'] == 1) {
  2.                         $thread['typehtml'] = '<em>[<a href="xmspace-'.$_G['fid'].'-'.$thread['typeid'].'.html">'.$_G['forum']['threadtypes']['types'][$thread['typeid']].'</a>]</em>';
复制代码


4.替换同名文件 更新缓存 完成




欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://www.xmspace.net/) Powered by Discuz! X3.4