PJ3全静态模式下侧边栏不显示问题

声明:本帖并非原创.来源网站:
http://www.hibug.com.cn/article/other/diyside.htm
本帖主要实现两个功能:
1.实现在控制面板中取消/设定系统模块的功能。
2.实现静态页面依然能够显示侧边栏。

功能预览:
1.
2.到我网站上去预览吧
http://www.x-sword.org

以前的帖子:http://bbs.pjhome.net/viewthread.php?tid=40595&highlight=%BE%B2%CC%AC
我试过了,不知道为什么不好用。

实现步骤:
1.打开插件目录下的install.xml文件(注意:这两行的“*”和“**”要对应,即上“*”=下“*”,上“**”=下“**”)
找到
程序代码 程序代码
side_html=replace(side_html,"<$*$>",**)
在下面插入一行:
程序代码 程序代码
side_html_static=replace(side_html_static,"<$*$>",**)
2.

需要修改的相关文件如下:
static_js.asp
static_js_mod.asp
common\cache.asp

control\c_skins.asp
control\Action.asp

==========================

static_js.asp

复制内容到剪贴板 程序代码
程序代码 程序代码
  'Response.CacheControl = "no-cache"
将前面的'去掉。

==========================

static_js_mod.asp
程序代码 程序代码

<!--#include file="BlogCommon.asp" -->
<!--#include file="common/function.asp" -->
<!--#include file="common/library.asp" -->
<!--#include file="common/cache.asp" -->
<!--#include file="common/checkUser.asp" -->
<!--#include file="common/ModSet.asp" -->
<!--#include file="class/cls_article.asp" -->
改成:
程序代码 程序代码

<!--#include file="BlogCommon.asp" -->
<!--#include file="common/function.asp" -->
<!--#include file="common/library.asp" -->
<!--#include file="common/ubbcode.asp" -->
<!--#include file="common/cache.asp" -->
<!--#include file="common/checkUser.asp" -->
<!--#include file="common/ModSet.asp" -->
<!--#include file="class/cls_article.asp" -->
<!--#include file="Plugins.asp" -->
==========================

common\cache.asp


复制内容到剪贴板 程序代码
程序代码 程序代码

                If blog_module("IndexOnly") = False Then
                    side_html = side_html&"<div id=""Side_"&blog_module("name")&""" class=""sidepanel"">"
                    If Len(blog_module("title"))>0 Then side_html = side_html&"<h4 class=""Ptitle"">"&blog_module("title")&"</h4>"
                    side_html = side_html&"<div class=""Pcontent"">"&blog_module("HtmlCode")&"</div><div class=""Pfoot""></div></div>"
                End If
                
                If blog_module("IsSystem") = True Then
                    side_html_static = side_html_static&"<div id=""Side_"&blog_module("name")&""" class=""sidepanel"">"
                    If Len(blog_module("title"))>0 Then side_html_static = side_html_static&"<h4 class=""Ptitle"">"&blog_module("title")&"</h4>"
                    side_html_static = side_html_static&"<div class=""Pcontent"">"&blog_module("HtmlCode")&"</div><div class=""Pfoot""></div></div>"
                End If
改成:
程序代码 程序代码
If blog_module("IndexOnly") = False Then
                    side_html_static = side_html_static&"<div id=""Side_"&blog_module("name")&""" class=""sidepanel"">"
                    If Len(blog_module("title"))>0 Then side_html_static = side_html_static&"<h4 class=""Ptitle"">"&blog_module("title")&"</h4>"
                    side_html_static = side_html_static&"<div class=""Pcontent"">"&blog_module("HtmlCode")&"</div><div class=""Pfoot""></div></div>"
                    side_html = side_html&"<div id=""Side_"&blog_module("name")&""" class=""sidepanel"">"
                    If Len(blog_module("title"))>0 Then side_html = side_html&"<h4 class=""Ptitle"">"&blog_module("title")&"</h4>"
                    side_html = side_html&"<div class=""Pcontent"">"&blog_module("HtmlCode")&"</div><div class=""Pfoot""></div></div>"
                End If
==========================
control\c_skins.asp

control\c_skins.asp中找到
程序代码 程序代码
<option value="doIndex">  - 设置首页独享</option>
<option value="cancelIndex">  - 取消首页独享</option>
在下面加
程序代码 程序代码

<option>------------------------</option>
<option value="doSystem">  - 模块系统化</option>
<option value="cancelSystem">  - 取消系统化</option>
==========================
control\Action.asp

control/Action.asp中找到
程序代码 程序代码

Case "doIndex":
                conn.Execute("update blog_module set IndexOnly=true where id="&selectID(i))
Case "cancelIndex":
                conn.Execute("update blog_module set IndexOnly=false where id="&selectID(i))
在下面加
程序代码 程序代码
Case "doSystem":
                conn.Execute("update blog_module set IsSystem=true where id="&selectID(i))
Case "cancelSystem":
                conn.Execute("update blog_module set IsSystem=false where id="&selectID(i))



如果您喜欢本篇文章,也许您也会喜欢下面推荐的文章!
其实我不想帮你找... (轩辕网的日志真乱 -_-#.. )

在线RSS阅读器订阅:
feedsky
抓虾 pageflakes Rojo
google reader my yahoo newsgator
bloglines 有道

手机订阅:


本站订阅地址:
RSS2:  【点击复制
Atom:  【点击复制
免责说明:
本站提供的文件均通过卡巴斯基最新版扫描无毒,请放心使用
本站所发表内容或来自互联网,或本人原创,只为学习交流之用,不存在任何商业用途
遵循创作共同协议,您可自由复制等方式传播本作品。
如果本站内容不慎侵犯了您的版权,请及时联系我们,我们将尽快处理。

遵循创作共同协议,您可自由复制,发行,广播或通过信息网络传播本作品。
但须遵守下列条件:
◎ 署名. 您必须按照作者或者许可人指定的方对作品进行署名。
◎ 非商业性使用. 您不得将该作品用于商业目的。
◎ 禁止演绎. 您不得修改、转换或者以本作品为基础进行创作。
任何再使用或者发行,您都必须向他人清楚地展示本作品使用的许可协议条款。
如果得到著作权人的许可,您可以不受任何这些条件的限制。
评论: 0 | 引用: 0 | 查看次数: - | TOP ↑
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.