【公告】微博客全面改版
换链接请首先加上我们的链接,然后留言,24小时内我们会完整链接。
链接地址:www.xujianwei.com
链接关键词:微博客
关于本站微博客程序相关问题
【如何自定义编辑器】
编辑器采用的是wangeditor2,为什么没用3呢,因为3不自适应了,感觉2在修改之后也基本够用了。
关于如何自定义编辑器,请修改admin.js编辑器相关部分。官方已经有很详细的文档了,修改参考请移步:https://www.kancloud.cn/wangfupeng/wangeditor2/113975
-
【如何让博客的ID从1开始】
虽然没有必要,但是就是很纠结怎么办?
sqlite管理软件里执行如下sql语句,文章和评论都会从1开始:
DELETE FROM Log;
DELETE FROM sqlite_sequence WHERE name = 'Log';
DELETE FROM Pl;
DELETE FROM sqlite_sequence WHERE name = 'Pl'
如果你阅读过源码会发现index.php里有类似代码彩蛋,不过注释掉了,那么接下来你应该懂了吧。
-
【如何修改博客宽度】
其实很简单直接替换style.css里宽度代码即可。
style.css文件在哪里?
assets\qblog目录下即可找到
如何替换?
记事本打开替换,把980px替换成你喜欢宽度即可
比如:
1000px 1280px
最后保存,刷新查看,记得清空浏览器缓存,否则可能因为缓存问题不生效。
-
【如何修改博客颜色】
其实很简单直接替换style.css里颜色的代码即可。
style.css文件在哪里?
assets\qblog目录下即可找到
如何替换?
记事本打开替换,把#2d6dcc替换成你喜欢的颜色
比如:
#1bb565
#5eaad1
#c81623
#444444
这些可以百度搜索颜色卡
最后保存,刷新查看,记得清空浏览器缓存,否则可能因为缓存问题不生效。
-
【轻博客程序目录结构】
轻博客程序目录结构,帮助大家修改二次开发及模板制作。
│ index.php 程序入口文件
├─app 动态文件目录│ ├─class 功能目录│ │ api.php ajax管理操作文件│ │ codes.php 验证码│ │ config.php 配置/密码公用函数类│ │ page.php 分页类│ │ upload.php 上传类│ │ │ └─db 数据库│ log.db│ └─assets 静态文件目录 ├─file 图片上传目录 ├─js js目录 │ │ ajax.js ajax操作js文件 │ │ jquery.min.js jquery库 │ │ │ ├─edit 编辑器目录 │ │ nicEdit.js │ │ nicEditorIcons.gif │ │ │ └─laydate 日期插件目录 │ └─qblog 模板目录 │ foot.php 底部 │ head.php 头部 │ index.php 首页 │ login.php 登陆 │ plist.php 评论列表 │ post.php 发布/编辑 │ right.php 右侧边栏 │ setting.php 设置 │ style.css 样式文件 │ theme.php 模板配置文件 │ view.php 文章页 │ widget.php 边栏设置 │ └─images 字体图标目录 iconfont.eot iconfont.svg iconfont.ttf iconfont.woff
-
【轻博客伪静态规则】
Apache: .htaccess
#Options +FollowSymlinks #本条非必需
RewriteEngine on
#博客安装目录以/结尾
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule post-([0-9]+)\.html$ index.php?act=pl&id=$1 [L]
RewriteRule comment-([0-9]+)\.html$ index.php?act=plist&p=$1 [L]
RewriteRule index-([0-9]+)\.html$ index.php?p=$1 [L]
RewriteRule list-([0-9]+)\.html$ index.php?tid=$1 [L]
RewriteRule list-([0-9]+)-([0-9]+)\.html$ index.php?tid=$1&p=$2 [L]
RewriteRule index\.html$ index.php [L]
RewriteRule archives\.html$ index.php?act=archives [L]
RewriteRule comment\.html$ index.php?act=plist [L]
Ngnix:
rewrite ^/post-([0-9]+).html /index.php?act=pl&id=$1 last;rewrite ^/comment-([0-9]+).html /index.php?act=plist&p=$1 last;rewrite ^/index-([0-9]+).html /index.php?p=$1 last;
rewrite ^/list-([0-9]+)\.html$ /index.php?tid=$1 last;
rewrite ^/list-([0-9]+)-([0-9]+)\.html$ /index.php?tid=$1&p=$2 last;
rewrite ^/index.html /index.php last;
rewrite ^/archives.html /index.php?act=archives last;
rewrite ^/comment.html /index.php?act=plist last;
IIS:web.config :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rule11" stopProcessing="true">
<match url="^post-([0-9]+).html" />
<action type="Rewrite" url="index.php?act=pl&id={R:1}" />
</rule>
<rule name="rule13" stopProcessing="true">
<match url="^comment-([0-9]+).html" />
<action type="Rewrite" url="index.php?act=plist&p={R:1}" />
</rule>
<rule name="rule14" stopProcessing="true">
<match url="^index-([0-9]+).html" />
<action type="Rewrite" url="index.php?p={R:1}" />
</rule>
<rule name="rule15" stopProcessing="true">
<match url="^index.html" />
<action type="Rewrite" url="index.php" />
</rule>
<rule name="rule16" stopProcessing="true">
<match url="^comment.html" />
<action type="Rewrite" url="index.php?act=plist" />
</rule>
<rule name="rule17" stopProcessing="true">
<match url="list-([0-9]+).html" />
<action type="Rewrite" url="index.php?tid={R:1}" />
</rule>
<rule name="rule18" stopProcessing="true">
<match url="list-([0-9]+)-([0-9]+).html" />
<action type="Rewrite" url="index.php?tid={R:1}&p={R:2}" />
</rule>
<rule name="rule19" stopProcessing="true">
<match url="archives.html" />
<action type="Rewrite" url="index.php?act=archives" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
-
【关于使用记事本修改源码导致一系列问题的说明】
首先说明下说明是bom头:
BOM是用来判断文本文件是哪一种Unicode编码的标记,其本身是一个Unicode字符("\uFEFF"),位于文本文件头部。
在不同的Unicode编码中,对应的bom的二进制字节如下:
FE FF UTF16BE
FF FE UTF16LE
EF BB BF UTF8
会导致那些问题:
虽然BOM字符起到了标记文件编码的作用但是他并不属于文件的内容部分,所以会产生一些问题:
1.在某些使用场景下就会有问题。例如我们把几个JS文件合并成一个文件后,如果文件中间含有BOM字符,就会导致浏览器JS语法错误。
2.PHP就不能识别bom头,PHP并不会忽略BOM,所以在读取、包含或者引用这些文件时,会把BOM作为该文件开头正文的一部分。根据嵌入式语言的特点,这串字符将被直接执行(显示)出来。由此造成即使页面的 top padding 设置为0,也无法让整个网页紧贴浏览器顶部,因为在html一开头有这3个字符呢!
使用系统自带的记事本在保存为utf-8格式下自动加bom头,因此导致一系列的诸如头部错乱,间隙过大等问题,请仔细回忆是否用记事本修改过源码。
如果你要修改源码请第三方编辑器,比如editplus等等,本站不再就修改源码产生的问题做解答,自定义有风险,修改需谨慎!
-
【忘记密码怎么办】
留言问博主会告诉你!
微博客 2022-12-10 23:33:39 通过 网页 浏览(2059)
共有12条评论!
站长,你这个是asp的还是php的?
admin回复:php
这个版没以前那个好看啊
admin回复:还行吧
之前的内容都去哪了?以前的段子不少啊
admin回复:改版了!
站长这个支持手机版快速发布吗
admin回复:支持!
手机支持,只是不怎么好操作
admin回复:我感觉也是,需要改进一下!
在哪下载?
admin回复:点开我的友情链接中无名微博就可以下载!
test...
admin回复:系统?
哥们 友链吗
admin回复:发你的关键词和链接
大佬,导航下的图怎么整的,我的都压缩了,83wo.com
admin回复:不懂你什么意思,请描述的清楚一点好吗
没用订阅地址,订阅不了博主哈~
admin回复:收到~
什么叫订阅博主?他有出杂志吗?
admin回复:没有!个人微博而已
哟。。换程序了 以前好像是TY的吧 友联不
admin回复:关键词发一下