修改方法:
1,在/source/function/function_admincp.php查找
- if(in_array('forum_forumdisplay', $_G['setting']['rewritestatus'])) {
- $data['search']['forum_forumdisplay'] = "/".$_G['domain']['pregxprw']['forum']."\?mod\=forumdisplay&(amp;)?fid\=(\w+)(&page\=(\d+))?"([^\>]*)\>/e";
- $data['replace']['forum_forumdisplay'] = "rewriteoutput('forum_forumdisplay', 0, '\\1', '\\3', '\\5', '\\6')";
- }
复制代码
在下面添加如下:
- if(in_array('forum_forumdisplay_type', $_G['setting']['rewritestatus'])) {
- $data['search']['forum_forumdisplay_type'] = "/".$_G['domain']['pregxprw']['forum']."\?mod\=forumdisplay&(amp;)?fid\=(\w+)(&typeid\=(\w+))?(&filter\=typeid)?(&typeid\=(\w+))?(&filter\=typeid)?(&page\=(\d+))?"([^\>]*)\>/e";
- $data['replace']['forum_forumdisplay_type'] = "rewriteoutput('forum_forumdisplay_type', 0, '\\1', '\\3', '\\8', '\\11', '\\12')";
- }
复制代码
查找:
- $data['rulesearch']['forum_forumdisplay'] = 'forum-{fid}-{page}.html';
- $data['rulereplace']['forum_forumdisplay'] = 'forum.php?mod=forumdisplay&fid={fid}&page={page}';
- $data['rulevars']['forum_forumdisplay']['{fid}'] = '(\w+)';
- $data['rulevars']['forum_forumdisplay']['{page}'] = '([0-9]+)';
复制代码
在下面添加如下:
- $data['rulesearch']['forum_forumdisplay_type'] = 'forum-{fid}-{typeid}-{page}.html';
- $data['rulereplace']['forum_forumdisplay_type'] = 'forum.php?mod=forumdisplay&fid={fid}&filter=typeid&typeid={typeid}&page={page}';
- $data['rulevars']['forum_forumdisplay_type']['{fid}'] = '(\w+)';
- $data['rulevars']['forum_forumdisplay_type']['{typeid}'] = '(\w+)';
- $data['rulevars']['forum_forumdisplay_type']['{page}'] = '([0-9]+)';
复制代码
2、在/source/function/function_core.php查找
- if($type == 'forum_forumdisplay') {
- list(,,, $fid, $page, $extra) = func_get_args();
- $r = array(
- '{fid}' => empty($_G['setting']['forumkeys'][$fid]) ? $fid : $_G['setting']['forumkeys'][$fid],
- '{page}' => $page ? $page : 1,
- );
- }
复制代码
在下面添加如下:
- if($type == 'forum_forumdisplay') {
- list(,,, $fid, $page, $extra) = func_get_args();
- $r = array(
- '{fid}' => empty($_G['setting']['forumkeys'][$fid]) ? $fid : $_G['setting']['forumkeys'][$fid],
- '{page}' => $page ? $page : 1,
- );
- } elseif($type == 'forum_forumdisplay_type') {
- list(,,, $fid, $typeid, $page, $extra) = func_get_args();
- $r = array(
- '{fid}' => empty($_G['setting']['forumkeys'][$fid]) ? $fid : $_G['setting']['forumkeys'][$fid],
- '{typeid}' => $typeid,
- '{page}' => $page ? $page : 1,
- );
- }
复制代码
3、在/source/language/lang_admincp.php里查找
- 'setting_seo_rewritestatus_forum_forumdisplay' => '论坛主题列表页',
复制代码
在这行下面添加如下:
- 'setting_seo_rewritestatus_forum_forumdisplay_type' => '论坛主题分类页',
复制代码
下面是主题贴子静态化方法:
1,在/source/function/function_admincp.php查找
- <span style="line-height: 1.5;">if(in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {</span>
- $data['search']['forum_viewthread'] = "/".$_G['domain']['pregxprw']['forum']."\?mod\=viewthread&(amp;)?tid\=(\d+)(&extra\=(page\%3D(\d+))?(%26filter%3Dtypeid%26typeid%3D(\d+))?)?(&page\=(\d+))?"([^\>]*)\>/e";
- $data['replace']['forum_viewthread'] = "rewriteoutput('forum_viewthread', 0, '\\1', '\\3', '\\10', '\\6', '\\11')";
- }
复制代码
修改为:
- <span style="line-height: 1.5;">if(in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {</span>
- $data['search']['forum_viewthread'] = "/".$_G['domain']['pregxprw']['forum']."\?mod\=viewthread&(amp;)?tid\=(\d+)(&extra\=(page\%3D(\d+))?(%26filter%3Dtypeid%26typeid%3D(\d+))?)?(&page\=(\d+))?"([^\>]*)\>/e";
- $data['replace']['forum_viewthread'] = "rewriteoutput('forum_viewthread', 0, '\\1', '\\3', '\\10', '\\6', '\\11')";
- }
复制代码
演示:http://www.ys166.com/sort-2-2-1.html |