1.乱码问题:
在很多情况下会出现乱码问题,那是因为Z-BLOG的编码是UTF-8编码,所以当出现乱码的时候请大家自行修改成UTF-8编码。
2.博客标题修改颜色:
修改 themes/GlossyBlueII/style/style.css 文件,找到 h1 a, h1 a:visited 和 #headerimg .description,这两个对应的大括号里都有 color:颜色代码(比如 color:#C9EEFE;),把#C9EEFE改为自己想要的颜色的代码就可以了。
3.屏蔽垃圾评论:
找到FUNCTION/c_system_event.asp 的598行左右 :
inphomepage=request.form("inphomepage")
在其后面增加禁止止发表含有关键字的代码(下面列出禁止在评论里发域名的),有多少关键字加多少行:
if instr(inparticle,"http")>0 then call showerror(14)
if instr(inparticle,"www")>0 then call showerror(14)
if instr(inparticle,"com")>0 then call showerror(14)
if instr(inparticle,"net")>0 then call showerror(14)
if instr(inparticle,"网址")>0 then call showerror(14)
4.侧栏增加qq等联系方式:
第一种:
把下面压缩包seo-qq.rar解压上传到THEMES\default\INCLUDE文件夹内。依次点:博客后台-文件管理-THEMES-default-TEMPLATE,找到default.html,点[编辑],找到下面代码:
<div class="function" id="divCalendar">
<h3><#ZC_MSG050#></h3>
<div><#CACHE_INCLUDE_CALENDAR#></div>
</div>
在上面代码后加:
<#TEMPLATE_INCLUDE_QQ#>
效果同侧栏评论等。同样的在catalog.html、search.html、single.html、tags.html文件处加相关代码。
第二种:
传 seo-Contact.rar 里的js文件到跟目录,在上面所提及的default.html、catalog.html、search.html、single.html、tags.html的
</head>
前加
<SCRIPT src="<#ZC_BLOG_HOST#>Contact.js" type=text/javascript></SCRIPT>
然后点击文件重建。
5.动态地址映射:
现在根目录下建立一个catalog文件夹(文件夹名称自己定义),然后到博客后台-网站设置管理-静态目录配置及文件重建设置,把 "生成分类和按月归档的静态首页" 这个勾上,在下面的 "自定义分类和按月归档的静态首页配置" 这里写上你新建的那个文件夹的名字,然后到文件重建那,有个" 静态日志目录重建"点下后就应该可以了.然后要每个分类都写上一个别名,代替 cat_2.html
6.主题文章添加"上一篇"和"下一篇"连接的方法
我们找到自己主题文件下面的 TEMPLAPE\b_article-single.html 文件,这是一个文章内容区的源文件:
<div class="post cate<#article/category/id#> auth<#article/author/id#>">
<h2 class="post-title"><a href="<#article/url#>"><#article/title#></a></h2>
<span class="post-dates"><#article/posttime/monthname#> <#article/posttime/day#>, <#article/posttime/year#></span><span class="post-cat"><a href="<#article/category/url#>" rel="category"><#article/category/name#></a></span>
<div class="entry"><#article/content#></div>
Tags: <#template:article_tag#><!--这里..这里.是我们的tags区,我们给文章写的tags就是在这里,我们就把"上一篇和下一篇写在这个的下面"-->
<h6>
<script language="JavaScript" type="text/javascript">strBatchCount+="spn<#article/id#>=<#article/id#>,"</script>
</h6>
</div>
<h3 id="comments"><#article/commnums#> Responses to "<#article/title#>" </h3>
<#template:article_comment#>
<#template:article_commentpost#>
看到上面代码中的注释部分了吗?写在tags下面:
<div style="font-size:1em;width:100%;margin-top:5px;">
<div>后一篇:<#template:article_navbar_l#></div>
<div style="margin-top:5px;">前一篇:<#template:article_navbar_r#></div>
</div>
7.首页生成静态页面
这个在Z-BLOG论坛中有插件,使用方法非常简单!
好了,关于Z-BLOG的优化就先整理到这里,如果转载请注明版权:沈阳SEO