|
 
- 积分
- 6728
- PJ币
- 1570 元
- 注册时间
- 2008-5-30
|
1#
发表于 2008-12-25 14:47
| 只看该作者
[插件修改] 全静态模式下别名系统导致wbc相关日志||热门日志||最新日志url地址错误的解决办法
昨天连夜升级到了最新版本却发现全静态模式下新增的别名系统导致以前的一些插件链接错误
因为以前的插件在全静态模式下都默认文章放在article下,如今使用别名系统,会导致url和后缀名(.htm,.html)的改变
暂时有以下3个插件
1.wbc相关日志
2.热门文章
3.最新文章
一 wbc相关日志的修改步骤为:
1.打开wbc_getarticle.asp找到第二个- Select log_Title,log_id,log_ViewNums from blog_Content where log_tag like '%"&wbc_tag(i)&"}%' and log_ID<>"&id&" order by log_PostTime desc
复制代码 修改为- Select log_Title,log_id,log_ViewNums,log_ctype,log_cname,cate_Part from blog_Content ,blog_Category where log_CateID=cate_ID and log_tag like '%"&wbc_tag(i)&"}%' and log_ID<>"&id&" order by log_PostTime desc
复制代码 2.找到- if blog_postFile = 2 then
- urlLink = "article/"&RsT(1)&".htm"
- else
复制代码 修改为:- if blog_postFile = 2 then
- if RsT(5)="" then
- if RsT(3)="0" then
- urlLink = "article/"&RsT(4)&".htm"
- else
- urlLink = "article/"&RsT(4)&".html"
- end if
- else
- if RsT(3)="0" then
- urlLink = "article/"&RsT(5)&"/"&RsT(4)&".htm"
- else
- urlLink = "article/"&RsT(5)&"/"&RsT(4)&".html"
- end if
- end if
- else
复制代码 二 热门日志修改步骤为
1.打开热门日志插件的install.xml找到- SELECT top 10 C.*,L.cate_ID,L.cate_Secret FROM blog_Content AS C,blog_Category AS L where L.cate_ID=C.log_CateID and L.cate_Secret=false and C.log_IsDraft=false order by log_ViewNums Desc
复制代码 修改为- SELECT top 10 C.*,L.cate_ID,L.cate_Secret,L.cate_Part FROM blog_Content AS C,blog_Category AS L where L.cate_ID=C.log_CateID and L.cate_Secret=false and C.log_IsDraft=false order by log_ViewNums Desc
复制代码 2.找到- book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&"[隐藏分类日志]"
- elseif book_HotArticles("log_IsShow") then
- book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&book_HotArticles("log_title")
- else
- book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&"[隐藏日志]"
复制代码 替换为- book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&"[隐藏分类日志] "&"|,|"&book_HotArticles("cate_Part")&"|,|"&book_HotArticles("log_ctype")&"|,|"&book_HotArticles("log_cname")
- elseif book_HotArticles("log_IsShow") then
- book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&book_HotArticles("log_title")&"|,|"&book_HotArticles("cate_Part")&"|,|"&book_HotArticles("log_ctype")&"|,|"&book_HotArticles("log_cname")
- else
- book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&"[隐藏日志]"&"|,|"&book_HotArticles("cate_Part")&"|,|"&book_HotArticles("log_ctype")&"|,|"&book_HotArticles("log_cname")
复制代码 3.找到- if blog_postFile = 2 then
- urlLink = "article/"&HotArticle_Item(0)&".htm"
复制代码 替换为- if blog_postFile = 2 then
- if HotArticle_Item(4)="" then
- if HotArticle_Item(5)="0" then
- urlLink = "article/"&HotArticle_Item(6)&".htm"
- else
- urlLink = "article/"&HotArticle_Item(6)&".html"
- end if
- else
- if HotArticle_Item(5)="0" then
- urlLink = "article/"&HotArticle_Item(4)&"/"&HotArticle_Item(6)&".htm"
- else
- urlLink = "article/"&HotArticle_Item(4)&"/"&HotArticle_Item(6)&".html"
- end if
- end if
复制代码 三 最新日志修改方法
1.打开最新日志插件的install.xml文件找到- SELECT top 10 C.log_ID,C.log_Author,C.log_IsShow,C.log_PostTime,C.log_title,L.cate_ID,L.cate_Secret FROM blog_Content AS C,blog_Category AS L where L.cate_ID=C.log_CateID and L.cate_Secret=false and C.log_IsDraft=false order by log_ID Desc
复制代码 修改为- SELECT top 10 C.log_ID,C.log_Author,C.log_IsShow,C.log_PostTime,C.log_title,C.log_ctype,C.log_cname,L.cate_ID,L.cate_Secret,L.cate_Part FROM blog_Content AS C,blog_Category AS L where L.cate_ID=C.log_CateID and L.cate_Secret=false and C.log_IsDraft=false order by log_ID Desc
复制代码 2.找到- book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&"[隐藏分类日志]"
- elseif book_Articles("log_IsShow") then
- book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&book_Articles("log_title") else
- book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&"[隐藏日志]"
复制代码 替换为- book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&"[隐藏分类日志]"&"|,|"&book_Articles("cate_Part")&"|,|"&book_Articles("log_ctype") &"|,|"&book_Articles("log_cname")
- elseif book_Articles("log_IsShow") then
- book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&book_Articles("log_title")&"|,|"&book_Articles("cate_Part")&"|,|"&book_Articles("log_ctype") &"|,|"&book_Articles("log_cname")
- else
- book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&"[隐藏日志]"&"|,|"&book_Articles("cate_Part")&"|,|"&book_Articles("log_ctype") &"|,|"&book_Articles("log_cname")
复制代码 3.找到- if blog_postFile = 2 then
- urlLink = "article/"&Article_Item(0)&".htm"
复制代码 替换为- if blog_postFile = 2 then
- if Article_Item(4)="" then
- if Article_Item(5)="0" then
- urlLink = "article/"&Article_Item(6)&".htm"
- else
- urlLink = "article/"&Article_Item(6)&".html"
- end if
- else
- if Article_Item(5)="0" then
- urlLink = "article/"&Article_Item(4)&"/"&Article_Item(6)&".htm"
- else
- urlLink = "article/"&Article_Item(4)&"/"&Article_Item(6)&".html"
- end if
- end if
复制代码 好了修改的就这些,大家修改完成后,先到后台反安装原来的插件,然后重新安装
安装完成后,初始化数据(更新日志到文件),清除服务器缓存(一定要多点几下清除缓存)
附件为已经修改好了的,觉得麻烦的可以直接下载
注意:附件为部分修改的文件,不是完整的插件
[ 本帖最后由 macbeth 于 2008-12-25 14:51 编辑 ] |
附件: 您所在的用户组无法下载或查看附件
-
3
评分次数
-
|