2008-08
30
Sat
PJ3日志显示彩色标题【支持全静态】
作者:Edge 日期:2008-08-30 15:05
演示效果如本站,由于前段时间PJ3一直处于测试阶段,也就没有着手各种完善功能的修改
目前PJ3大体功能的完工,我也完成了博客整站的升级工作。涉及到静态模式,可能有些朋友不会
故把相关教程发布出来
代码改动比较多,忘改动之前做好备份!
修改文件有blogedit.asp、blogpost.asp、class\cls_logAction.asp、class\cls_default.asp、article.asp、class\cls_article.asp
1.打开blogedit.asp
1.1找到
程序代码
换行插入
程序代码
1.2找到
程序代码
换行输入
程序代码
2.打开blogpost.asp 找到
2.1找到
程序代码
换行输入
程序代码
2.2找到
程序代码
换行输入
程序代码
3.打开class\cls_logAction.asp 以下要注意修改
3.1找到
程序代码
3.2找到
程序代码
换行输入
程序代码
3.3找到(有两处,全部修改)
程序代码
换行输入
程序代码
3.4找到
程序代码
换行添加
程序代码
3.5找到
程序代码
在后面加上
程序代码
3.6找到(两处全部替换)
程序代码
替换成
程序代码
3.7找到
程序代码
替换成
程序代码
4.打开 class\cls_default.asp 注意参数所对应的序号!
4.1找到以下两段代码分别在后面添加
程序代码
程序代码
在后面加入
程序代码
4.2找到(其中数字17,根据你修改的情况对应读取编号)
程序代码
替换成
程序代码
4.3找到
程序代码
替换成
程序代码
[pagebreak]
5.打开article.asp 找到
程序代码
在后面添加
程序代码
6.打开class\cls_article.asp 找到
程序代码
替换成
程序代码
7.打开common/function.asp在头部<% 后面添加
程序代码
8.打开Template/static.htm 找到
程序代码
替换成
程序代码
9.下载升级文件解压到BLOG根目录
10.运行updata.asp,运行后删除该文件 到后台重新生产日志,并清空服务器缓存!完成
点击下载此文件
目前PJ3大体功能的完工,我也完成了博客整站的升级工作。涉及到静态模式,可能有些朋友不会
故把相关教程发布出来
代码改动比较多,忘改动之前做好备份!
修改文件有blogedit.asp、blogpost.asp、class\cls_logAction.asp、class\cls_default.asp、article.asp、class\cls_article.asp
1.打开blogedit.asp
1.1找到
程序代码 lArticle.logPublishTimeType = request.form("PubTimeType")
换行插入
程序代码lArticle.logthestyle = request.form("log_thestyle")
1.2找到
程序代码<input name="title" type="text" class="inputBox" id="title" size="50" maxlength="50" value="<%=lArticle.logTitle%>"/>
换行输入
程序代码 <select name="log_thestyle">
<option value="1" <%if lArticle.logthestyle=1 then response.Write "selected"%>>默认效果</option>
<option value="5" <%if lArticle.logthestyle=5 then response.Write "selected"%> >彩色闪光</option>
<option value="6" <%if lArticle.logthestyle=6 then response.Write "selected"%>>來回波浪</option>
<option value="7" <%if lArticle.logthestyle=7 then response.Write "selected"%>>霓虹醒目</option>
<option value="8" <%if lArticle.logthestyle=8 then response.Write "selected"%>>逐字突出</option>
<option value="9" <%if lArticle.logthestyle=9 then response.Write "selected"%>>红色背景</option>
<option value="10 <%if lArticle.logthestyle=10 then response.Write "selected"%>">蓝色背景</option>
<option value="11" <%if lArticle.logthestyle=11 then response.Write "selected"%>>绿色背景</option>
<option value="12" <%if lArticle.logthestyle=12 then response.Write "selected"%>>红框醒目</option>
<option value="13" <%if lArticle.logthestyle=13 then response.Write "selected"%>>蓝框醒目</option>
<option value="14" <%if lArticle.logthestyle=14 then response.Write "selected"%>>绿框醒目</option>
<option value="15" <%if lArticle.logthestyle=15 then response.Write "selected"%>>淡蓝空心</option>
<option value="16" <%if lArticle.logthestyle=16 then response.Write "selected"%>>红色阴影</option>
<option value="17" <%if lArticle.logthestyle=17 then response.Write "selected"%>>交替变色</option>
</select>
<option value="1" <%if lArticle.logthestyle=1 then response.Write "selected"%>>默认效果</option>
<option value="5" <%if lArticle.logthestyle=5 then response.Write "selected"%> >彩色闪光</option>
<option value="6" <%if lArticle.logthestyle=6 then response.Write "selected"%>>來回波浪</option>
<option value="7" <%if lArticle.logthestyle=7 then response.Write "selected"%>>霓虹醒目</option>
<option value="8" <%if lArticle.logthestyle=8 then response.Write "selected"%>>逐字突出</option>
<option value="9" <%if lArticle.logthestyle=9 then response.Write "selected"%>>红色背景</option>
<option value="10 <%if lArticle.logthestyle=10 then response.Write "selected"%>">蓝色背景</option>
<option value="11" <%if lArticle.logthestyle=11 then response.Write "selected"%>>绿色背景</option>
<option value="12" <%if lArticle.logthestyle=12 then response.Write "selected"%>>红框醒目</option>
<option value="13" <%if lArticle.logthestyle=13 then response.Write "selected"%>>蓝框醒目</option>
<option value="14" <%if lArticle.logthestyle=14 then response.Write "selected"%>>绿框醒目</option>
<option value="15" <%if lArticle.logthestyle=15 then response.Write "selected"%>>淡蓝空心</option>
<option value="16" <%if lArticle.logthestyle=16 then response.Write "selected"%>>红色阴影</option>
<option value="17" <%if lArticle.logthestyle=17 then response.Write "selected"%>>交替变色</option>
</select>
2.打开blogpost.asp 找到
2.1找到
程序代码lArticle.logPublishTimeType = request.form("PubTimeType")
换行输入
程序代码lArticle.logthestyle = request.form("log_thestyle")
2.2找到
程序代码<input name="title" type="text" class="inputBox" id="title" size="50" maxlength="50"/>
换行输入
程序代码<select name="log_thestyle">
<option value="1" selected>默认效果</option>
<option value="5">彩色闪光</option>
<option value="6">来回波浪</option>
<option value="7">霓虹醒目</option>
<option value="8">逐字突出</option>
<option value="9">红色背景</option>
<option value="10">蓝色背景</option>
<option value="11">绿色背景</option>
<option value="12">红框醒目</option>
<option value="13">蓝框醒目</option>
<option value="14">绿框醒目</option>
<option value="15">淡蓝空心</option>
<option value="16">红色阴影</option>
<option value="17">交替变色</option>
</select>
<option value="1" selected>默认效果</option>
<option value="5">彩色闪光</option>
<option value="6">来回波浪</option>
<option value="7">霓虹醒目</option>
<option value="8">逐字突出</option>
<option value="9">红色背景</option>
<option value="10">蓝色背景</option>
<option value="11">绿色背景</option>
<option value="12">红框醒目</option>
<option value="13">蓝框醒目</option>
<option value="14">绿框醒目</option>
<option value="15">淡蓝空心</option>
<option value="16">红色阴影</option>
<option value="17">交替变色</option>
</select>
3.打开class\cls_logAction.asp 以下要注意修改
3.1找到
程序代码 Public logIsShow, logIsDraft, logWeather, logLevel, logCommentOrder, logReadpw, logPwtips
[code]
替换成
[code] Public logIsShow, logIsDraft, logWeather, logLevel, logCommentOrder, logReadpw, logPwtips, logthestyle
[code]
替换成
[code] Public logIsShow, logIsDraft, logWeather, logLevel, logCommentOrder, logReadpw, logPwtips, logthestyle
3.2找到
程序代码 logPwtips = ""
换行输入
程序代码 logthestyle = ""
3.3找到(有两处,全部修改)
程序代码 weblog("log_Pwtips")=logPwtips
换行输入
程序代码 weblog("log_thestyle")=logthestyle
3.4找到
程序代码 logPwtips = weblog("log_Pwtips")
换行添加
程序代码logthestyle = Trim(weblog("log_thestyle"))
3.5找到
程序代码 sqlString = "Select top 1 log_CateID,log_Author,log_Title,log_edittype,log_ubbFlags,log_Intro,log_weather,log_Level,log_comorder,log_DisComment,log_IsShow,log_IsTop,log_IsDraft,log_From,log_FromURL,log_Content,log_tag,log_PostTime,log_CommNums,log_QuoteNums,log_ViewNums,log_Readpw,log_Pwtips
在后面加上
程序代码 ,log_thestyle
3.6找到(两处全部替换)
程序代码 Temp1 = Replace(Temp1, "<$log_Title$>", HtmlEncode(log_View("log_Title")))
替换成
程序代码 Temp1 = Replace(Temp1, "<$log_Title$>",showStyle(log_View("log_thestyle"),HtmlEncode(log_View("log_Title"))))
Temp1 = Replace(Temp1, "<$log_Titles$>",HtmlEncode(log_View("log_Title")))
Temp1 = Replace(Temp1, "<$log_Titles$>",HtmlEncode(log_View("log_Title")))
3.7找到
程序代码 Temp2 = Replace(Temp2, "<$log_Title$>", HtmlEncode(log_View("log_Title")))
替换成
程序代码 Temp2 = Replace(Temp2, "<$log_Title$>", showStyle(log_View("log_thestyle"),HtmlEncode(log_View("log_Title"))))
4.打开 class\cls_default.asp 注意参数所对应的序号!
4.1找到以下两段代码分别在后面添加
程序代码 strSQL = "log_ID,log_CateID,log_Author,log_Title,log_PostTime,log_IsShow,log_CommNums,log_QuoteNums,log_ViewNums,log_IsTop,log_Readpw
程序代码 strSQL = "log_ID,log_CateID,log_Author,log_Title,log_PostTime,log_IsShow,log_CommNums,log_QuoteNums,log_ViewNums,log_IsTop,log_Intro,log_Content,log_edittype,log_DisComment,log_ubbFlags,log_tag,log_Readpw
在后面加入
程序代码,log_thestyle
4.2找到(其中数字17,根据你修改的情况对应读取编号)
程序代码 <a class="titleA" href="<%=aUrl%>"><%=HtmlEncode(webLogArr(3,PageCount))%></a>
替换成
程序代码 <a class="titleA" href="<%=aUrl%>"><%= showStyle(webLogArr(17,PageCount),HtmlEncode(webLogArr(3,PageCount)))%></a>
4.3找到
程序代码 <a href="<%=logLink%>" title="作者:<%=webLogArr(2,PageCount)%> 日期:<%=DateToStr(webLogArr(4,PageCount),"Y-m-d")%>"><%=HtmlEncode(webLogArr(3,PageCount))%></a>
替换成
程序代码 <a href="<%=logLink%>" title="作者:<%=webLogArr(2,PageCount)%> 日期:<%=DateToStr(webLogArr(4,PageCount),"Y-m-d")%>"><%= showStyle(webLogArr(11,PageCount),HtmlEncode(webLogArr(3,PageCount)))%></a>
[pagebreak]
5.打开article.asp 找到
程序代码 SQL = "Select top 1 log_ID,log_CateID,log_title,Log_IsShow,log_ViewNums,log_Author,log_comorder,log_DisComment,log_Content,log_PostTime,log_edittype,log_ubbFlags,log_CommNums,log_QuoteNums,log_weather,log_level,log_Modify,log_FromUrl,log_From,log_tag,log_Readpw,log_Pwtips
在后面添加
程序代码,log_thestyle
6.打开class\cls_article.asp 找到
程序代码<%=HtmlEncode(log_ViewArr(2,0))%>
替换成
程序代码<%= showStyle(log_ViewArr(22,0),HtmlEncode(log_ViewArr(2,0)))%>
7.打开common/function.asp在头部<% 后面添加
程序代码'*************************************
'彩色标题
'*************************************
Function showStyle(color,thename)
dim rndNo
rndNo=int((rnd()*10000))
if color<>"" and thename<>"" then
Select Case Cint(color)
case 0: showStyle=thename
case 1: showStyle=thename
case 5: showStyle="<!--[if IE]><span style=behavior:url(thestyle/font.htc)><![endif]--> " &thename& "<!--[if IE]></span><![endif]-->"
case 6: showStyle="<!--[if IE]><span textoffset1=-4 textoffset2=-2 speed=100 letters1=1 letters2=1 pause=1000 style='behavior:url(thestyle/z_WaveText.htc);color:#FF6600;background-color:transparent'><![endif]--> " &thename& "<!--[if IE]></span><![endif]-->"
case 7: showStyle="<!--[if IE]><span textcolor1=#FFFF00 textbkcolor1=transparent textcolor2=#FFCC99 textbkcolor2=transparent speed=100 letters1=1 letters2=1 pause=500 style='behavior:url(thestyle/z_FlashText.htc);color:#c000c0;background-color:transparent'><![endif]-->" &thename& "<!--[if IE]></span><![endif]-->"
case 8: showStyle="<!--[if IE]><span textcolor=#ff0000 basesize=12 textsize1=14 textsize2=14 speed=100 letters1=1 letters2=1 pause=500 style='behavior:url(thestyle/z_ResizeText.htc);color:#993300;background-color:transparent;'><![endif]--> " &thename& "<!--[if IE]></span><![endif]-->"
case 9: showStyle="<span Style='font-weight: bold;color: #FFFFFF;background-color: red;'>" &thename& "</Span>"
case 10: showStyle="<span Style='font-weight: bold;color: #FFFFFF;background-color: blue;'>" &thename& "</Span>"
case 11: showStyle="<span Style='font-weight: bold;color: #FFFFFF;background-color: #55AA55;'>" &thename& "</Span>"
case 12: showStyle="<span style='border:solid 1px red;border-left-width:5px;border-left-color:red;background:#ffffff;padding:1px 6px 2px 6px;font-size: 8pt'>" &thename& "</span>"
case 13: showStyle="<span style='border:solid 1px blue;border-left-width:5px;border-left-color:blue;background:#ffffff;padding:1px 6px 2px 6px;font-size: 8pt'>" &thename& "</span>"
case 14: showStyle="<span style='border:solid 1px #55AA55;border-left-width:5px;border-left-color:#55AA55;background:#ffffff;padding:1px 6px 2px 6px;font-size: 8pt'>" &thename& "</span>"
case 15: showStyle="<span style='PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FILTER: glow(color=BLUE,strength=3); PADDING-BOTTOM: 2px; COLOR: white; PADDING-TOP: 2px; HEIGHT: 10px' >" &thename& "</span>"
session("styleadd")=session("styleadd")+3.6
case 16: showStyle="<!--[if IE]><span color=red><span style='height:1;filter:shadow(color=-87cefa;d9d9d9,direction=5)'><![endif]--> <B>" &thename& "</B><!--[if IE]></span></span><![endif]--> "
case 17: showStyle="<span id='k"&rndNo&"'>" &thename& "</span><img src='' width='0' height='0' onerror=setInterval(""document.getElementById('k"&rndNo&"').style.color=Math.random()*255*255*255"",300) border=0>"
End Select
Else
showStyle=thename
End if
End function
'彩色标题
'*************************************
Function showStyle(color,thename)
dim rndNo
rndNo=int((rnd()*10000))
if color<>"" and thename<>"" then
Select Case Cint(color)
case 0: showStyle=thename
case 1: showStyle=thename
case 5: showStyle="<!--[if IE]><span style=behavior:url(thestyle/font.htc)><![endif]--> " &thename& "<!--[if IE]></span><![endif]-->"
case 6: showStyle="<!--[if IE]><span textoffset1=-4 textoffset2=-2 speed=100 letters1=1 letters2=1 pause=1000 style='behavior:url(thestyle/z_WaveText.htc);color:#FF6600;background-color:transparent'><![endif]--> " &thename& "<!--[if IE]></span><![endif]-->"
case 7: showStyle="<!--[if IE]><span textcolor1=#FFFF00 textbkcolor1=transparent textcolor2=#FFCC99 textbkcolor2=transparent speed=100 letters1=1 letters2=1 pause=500 style='behavior:url(thestyle/z_FlashText.htc);color:#c000c0;background-color:transparent'><![endif]-->" &thename& "<!--[if IE]></span><![endif]-->"
case 8: showStyle="<!--[if IE]><span textcolor=#ff0000 basesize=12 textsize1=14 textsize2=14 speed=100 letters1=1 letters2=1 pause=500 style='behavior:url(thestyle/z_ResizeText.htc);color:#993300;background-color:transparent;'><![endif]--> " &thename& "<!--[if IE]></span><![endif]-->"
case 9: showStyle="<span Style='font-weight: bold;color: #FFFFFF;background-color: red;'>" &thename& "</Span>"
case 10: showStyle="<span Style='font-weight: bold;color: #FFFFFF;background-color: blue;'>" &thename& "</Span>"
case 11: showStyle="<span Style='font-weight: bold;color: #FFFFFF;background-color: #55AA55;'>" &thename& "</Span>"
case 12: showStyle="<span style='border:solid 1px red;border-left-width:5px;border-left-color:red;background:#ffffff;padding:1px 6px 2px 6px;font-size: 8pt'>" &thename& "</span>"
case 13: showStyle="<span style='border:solid 1px blue;border-left-width:5px;border-left-color:blue;background:#ffffff;padding:1px 6px 2px 6px;font-size: 8pt'>" &thename& "</span>"
case 14: showStyle="<span style='border:solid 1px #55AA55;border-left-width:5px;border-left-color:#55AA55;background:#ffffff;padding:1px 6px 2px 6px;font-size: 8pt'>" &thename& "</span>"
case 15: showStyle="<span style='PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FILTER: glow(color=BLUE,strength=3); PADDING-BOTTOM: 2px; COLOR: white; PADDING-TOP: 2px; HEIGHT: 10px' >" &thename& "</span>"
session("styleadd")=session("styleadd")+3.6
case 16: showStyle="<!--[if IE]><span color=red><span style='height:1;filter:shadow(color=-87cefa;d9d9d9,direction=5)'><![endif]--> <B>" &thename& "</B><!--[if IE]></span></span><![endif]--> "
case 17: showStyle="<span id='k"&rndNo&"'>" &thename& "</span><img src='' width='0' height='0' onerror=setInterval(""document.getElementById('k"&rndNo&"').style.color=Math.random()*255*255*255"",300) border=0>"
End Select
Else
showStyle=thename
End if
End function
8.打开Template/static.htm 找到
程序代码<title><$log_Title$> - <$siteName$></title>
替换成
程序代码<title><$log_Titles$> - <$siteName$></title>
9.下载升级文件解压到BLOG根目录
10.运行updata.asp,运行后删除该文件 到后台重新生产日志,并清空服务器缓存!完成
点击下载此文件
]不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧不是吧
2008-12-21 01:00 PM 回复该评论
非常感谢博主分享、经过细心修改代码、我以完全成功升级、现在正在使用中、不过其中有两个效果不可用、(淡蓝空心、红色阴影)
不过那两个效果都不重要了、再次谢谢你分享、顺便想和贵博交换连接、希望通过...
Candy's Blog 申请链接
已经提交后台,感谢你百忙中查看
From: www.mxsf.net/
不过那两个效果都不重要了、再次谢谢你分享、顺便想和贵博交换连接、希望通过...
Candy's Blog 申请链接
已经提交后台,感谢你百忙中查看
From: www.mxsf.net/
2008-09-18 08:09 AM 回复该评论
哦,,,,谢谢版主老大!!!压缩包里的thestyle文件夹!在我运行updata.asp升级文件后。我也把thestyle文件夹删了。。哎,理解错了。以为全部删耶!!!版主是我们四川人的骄傲。版主是四川哪里的》?
2008-09-17 06:39 PM 回复该评论
是不是第七步里的颜色代码有问题????
Edge于2008-09-17 09:10 AM回复
你没有把压缩包里的thestyle目录及所有文件放在BLOG的根目录2008-09-15 08:23 PM 回复该评论
版主: 我照你的方法修改了。但是有些功能不能使用!我使用的是PJBlog3 v2.8.5.157 版本。没有使用全静态
谢谢版主老大解决下.
谢谢版主老大解决下.
Edge于2008-09-15 03:11 PM回复
演示地址,或是把相应的修改部分发给我!2008-09-15 04:30 AM 回复该评论
顺利升级!就是第六步的不太好找
<%=HtmlEncode(log_ViewArr(2,0))%>
这个现在157里面是
<%=HtmlEncode(log_ViewArr(2, 0))%>
中间有空格!~~郁闷哦
<%=HtmlEncode(log_ViewArr(2,0))%>
这个现在157里面是
<%=HtmlEncode(log_ViewArr(2, 0))%>
中间有空格!~~郁闷哦
Edge于2008-09-05 09:06 PM回复
细心就好了!2008-09-05 08:40 PM 回复该评论
发表评论


文章来自:
Tags: