Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[发布] X2.0&x2.5分类信息默认伪静态<前卫音乐首发>

[复制链接]
136245992 发表于 2012-9-29 01:19:27 | 显示全部楼层 |阅读模式
本帖最后由 136245992 于 2012-9-29 01:20 编辑

更改文件template/default(你当前使用的模板也行)/forum/forumdisplay_list.htm
X2.5方法<查找>
  1. <a href="forum.php?mod=viewthread&tid=$thread[tid]&{if $_GET['archiveid']}archiveid={$_GET['archiveid']}&{/if}extra=$extra"$thread[highlight]{if $thread['isgroup'] == 1 || $thread['forumstick']} target="_blank"{else} onclick="atarget(this)"{/if} class="xst" >$thread[subject]</a>
复制代码
改为
  1. <a href="forum.php?mod=viewthread&tid=$thread[tid]{if $_G['gp_archiveid']}&archiveid={$_G['gp_archiveid']}{/if}"$thread[highlight]{if $thread['isgroup'] == 1 || $thread['forumstick']} target="_blank"{else} onclick="atarget(this)"{/if} class="xst" >$thread[subject]</a>
复制代码
-----------------------------------------------------------------------------------------
X2.0方法<查找>
  1. <a href="forum.php?mod=viewthread&tid=$thread[tid]&{if $_G['gp_archiveid']}archiveid={$_G['gp_archiveid']}&{/if}extra=$extra"$thread[highlight]{if $thread['isgroup'] == 1 || $thread['forumstick']} target="_blank"{else} onclick="atarget(this)"{/if} class="xst" >$thread[subject]</a>
复制代码
改为
  1. <a href="forum.php?mod=viewthread&tid=$thread[tid]{if $_GET['archiveid']}&archiveid={$_GET['archiveid']}{/if}"$thread[highlight]{if $thread['isgroup'] == 1 || $thread['forumstick']} target="_blank"{else} onclick="atarget(this)"{/if} class="xst" >$thread[subject]</a>
复制代码
-----------------------------------------------------------------------------------------
本站用的2.0版本,在论坛找了个2.5的教程我发现了规则,很简单原来区别就在x2.5默认的是{if $_GET['archiveid']}  X2.0默认的却是{if $_G['gp_archiveid']} 两种方法改成反方向即可,您发现了没?区别就在这里很简单!
推荐帖子图片滑动显示分类信息【前卫音乐作品】
https://discuz.dismall.com/thread-3023326-1-1.html
 楼主| 136245992 发表于 2012-9-29 03:57:18 | 显示全部楼层

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

 楼主| 136245992 发表于 2012-9-29 05:54:57 | 显示全部楼层
本帖最后由 136245992 于 2012-9-29 06:02 编辑

免费奉上X2.5&X2.0标签与插件伪静态完美方法(免去购买那些收费插件的烦恼)

伪静态文件用 httpd.ini 的, 加2条规则到最后,如果加了插件伪静态规则代码,则放到插件规则的上面!(另外奉上插件伪静态规则代码,此方法无需修改任何文件加这段代码到httpd.ini里即可实现插件伪静态!X2.0&X2.5通用
  1. RewriteRule ^(.*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html(\?(.*))*$ $1/plugin\.php\?id=$2:$3&$5
复制代码
插件访问形式:http://www.qianwe.com/kk_weibo_weibo.html  插件内链访问形式:http://www.qianwe.com/kk_weibo_weibo.html?参数=参数&参数=参数(懂意思了吗?第一个参数用?问号,第二个参数用&符号,第三个参数继续用&...)
1、好了,下面继续回到标签伪静态!加下面两条规则到httpd.ini文件里,插件的是最后一条,标签的是倒数第二和第三条,此顺序要注意!
  1. RewriteRule ^(.*)/tag-(.+)\.html*$ $1/misc.php\?mod=tag&id=$2
  2. RewriteRule ^(.*)/tag\.html*$ $1/misc.php\?mod=tag
复制代码
2、修改帖子内标签链接
打开 \template\default(模板目录)\forum\viewthread_node.htm
查找:
  1. <a title="$var[1]" href="misc.php?mod=tag&id=$var[0]" target="_blank">$var[1]</a>
复制代码
替换
  1. <a title="$var[1]" href="tag-$var[0].html" target="_blank">$var[1]</a>
复制代码
3、修改标签页标签链接
打开 \template\default\tag\tag.htm
查找:
  1. <a href="misc.php?mod=tag&id=$tag[tagid]" title="$tag[tagname]" target="_blank" class="xi2">$tag[tagname]</a>
复制代码
替换:
  1. <a href="tag-$tag[tagid].html" title="$tag[tagname]" target="_blank" class="xi2">$tag[tagname]</a>
复制代码
4、修改标签列表页导航链接
打开 \template\default\tag\tagitem.htm
查找:
  1. <a href="misc.php?mod=tag">{lang tag}</a>
复制代码
替换:
  1. <a href="tag.html">{lang tag}</a>
复制代码
----------------------
查找:
  1. <a href="misc.php?mod=tag&id=$id">$tagname</a>
复制代码
替换:
  1. <a href="tag-$id.html">$tagname</a>
复制代码
-------------------------------------------------------
Discuz 默认禁止蜘蛛抓取标签页面,解决方法为:
删除或注释掉根目录下misc.php第18行的:
  1. $discuz->reject_robot();
复制代码

回复

使用道具 举报

 楼主| 136245992 发表于 2012-9-29 06:30:11 | 显示全部楼层
本帖最后由 136245992 于 2012-9-29 06:32 编辑

免费奉上勋章位置调动到头像资料卡里面<适用任何模板和DZ版本>(省去头像下面内容一大堆)
template/default(如没用默认风格改你使用的模板)/forum/viewthread_node.htm
放到这代码的下面↓
  1. <dl class="cl">{$post[custominfo][menu]}</dl>
复制代码
也就是这代码的上面↓
  1. <div class="imicn">
复制代码
代码如下↓
  1. <!--{if $post['medals']}-->
  2. <p class="md_ctrl">
  3. <a href="home.php?mod=medal">
  4. <!--{loop $post['medals'] $medal}-->
  5. <img id="md_{$post[pid]}_{$medal[medalid]}" src="{STATICURL}image/common/$medal[image]" alt="$medal[name]" title="" onmouseover="showMenu({'ctrlid':this.id, 'menuid':'md_$medal[medalid]_menu', 'pos':'12!'});" />
  6. <!--{/loop}-->
  7. </a>
  8. </p>
  9. <!--{/if}-->
复制代码
记住先查找要替换的代码↑删除后再加这段代码到相应的位置,避免头像下面和头像资料卡里面两个地方同时出现!效果图

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

chengjiabing 发表于 2012-9-29 08:49:11 | 显示全部楼层
好东西收藏了。。。。


http://www.yioso.com
回复

使用道具 举报

hua7328wang 发表于 2012-9-29 09:17:01 | 显示全部楼层
我来顶你了啊 太感谢了
回复

使用道具 举报

hi.friend 发表于 2012-9-29 09:23:05 | 显示全部楼层
不错!收下了...
回复

使用道具 举报

飞天鱼儿精 发表于 2012-9-29 09:31:37 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

vvmci 发表于 2012-12-2 18:18:26 | 显示全部楼层
为啥我改完模版就 空白了?
回复

使用道具 举报

xiaomu 发表于 2012-12-2 18:22:07 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-9-28 00:07 , Processed in 0.218173 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表