本文档包括了可能对你有用的提示和建议。
Nucleus根据用户要求动态的创建文档。网址的格式是 index.php?archive=2001-09&blogid=1。但是 Google 和其他的一些搜索引擎并不喜欢这样存在“?”或者其他太多参数的网址格式。因为它们的蜘蛛(spiders)容易在此类网址上陷得太深。
对此,有如下两种解决方法。这两种方法并不能保证百分百的工作,工作效率取决与服务器的配置。
Nucleus在v2.0的时候就有了一个新的全局选项: 'URL mode'。将其设置成 'Fancy URL' 模式, 并执行下列的操作,将使你的网址变成这样: http://example.org/item/1234 ,而取代原来 http://example.org/index.php?itemid=1234 这样的格式。搜索引擎喜换前者那样的网址模式。
安装步骤:
/extra/fancyurls 目录下的所有文件 (除了 index.html,如果有该文件的话) 到你的 nucleus 主目录(就是你博客的 index.php 和 action.php 所在目录)。.htaccess 文件 (大部分的FTP软件默认的不显示隐藏文件,因此,在上传前请仔细检查是否存在该文件),就先将该文件下载到本地,将新的 .htaccess 文件 (在fancyurls目录中可以找到) 内容拷贝到该下载的 .htaccess 文件中。然后将其上传覆盖服务器上旧的文件。fancyurls.config.php 文件,将 $CONF['Self'] 指向你的主目录(就是你博客的 index.php 和 action.php 所在目录)。index.php 文件,使其变成如下所示:如果设置失败(比如出现 Internal Server Error),从服务器删除那些你从 /extra/fancyurls 目录拷贝上去的文件,然后重新在后台设置不使用Fancy URLs。然后从头再试一次。
本办法仅仅适用于那些运行 Apache 的服务器。如果你有权限,博客文档将以“伪静态”展现。
创建 .htaccess 文件,内容如下:
RewriteEngine On RewriteRule ^archive-([0-9]+)-([0-9]+)-([0-9]+).html+ index.php?archive=$2-$3&blogid=$1 RewriteRule ^item-([0-9]+).html+ index.php?itemid=$1 RewriteRule ^archivelist-([a-z]+).html+ index.php?archivelist=$1
上传该文件到主目录(就是你博客的 index.php 和 action.php 所在目录)。尝试打开 archive-1-2001-09.html 这样的网址。如果能打开,继续往下看。如果你得到一个 500 错误,说明此路不通,删掉 .htaccess 文件吧。
要将你的博客链接升级成为 archivelist-shortblogname.html 这样的格式,还必须在后台管理中进行设置。在后台面板的 layout (中文版本里面是 布局)中选择 Templates (中文版本里面是 模板),然后在出现的 Edit Templates (编辑模板)中选择编辑 default/index (或者其他模板的相应文件),找到 Achieve Lists 板块,修改 archivelist item 为下面所示的格式:
<a href="archive-<%blogid%>-<%year%>-<%month%>.html">...</a>
如果一切正常,就可以等待欢迎 Google 蜘蛛的到来了,呵呵。
为了使 Nucleus 更好的运行和更多功能的实现,有必要对文件或目录权限进行更改。以下是如何通过FTP软件修改权限的示例
首先,我们需要一个FTP软件,比如 CuteFTP。你能在 这里 下载到它的试用版本。
首先利用 FTP软件连接到你的服务器,选择你要更改的文件或者目录。
打开菜单 Commands > File Actions > CHMOD... ,或者 Commands > Directory > CHMOD...
将会有一个窗口弹出:
在底部,你能输入一个3个数字,如 775 或 444 ,然后点 OK 按钮即完成操作。
Nucleus在超级管理员模式下能够创建数据库的备份。强烈建议定期进行数据库备份。备份文件由标准的SQL查询语句构成,能够安全的重新恢复数据。
备份和恢复都很简单,如果有比要,可以进行数据库修复。可以有一下几种方法恢复你的数据库。
如果你有基于网页的数据库管理工具,如 PHPMyAdmin,你就能直接利用它恢复你的数据库。
如果你有 shell 帐户,用 mysql 命令可恢复数据库:
mysql -u username -p -h hostname databasename < backupfile.sql
作为超级管理员,你能在 Nucleus Management 创建一个新的博客。
这里有几种到达你的新博客的方法。
博客编号(blogid) 变量 :
http://yourhost.com/index.php?blogid=2
(你能在管理区查看到博客编号)
index.php 的副本。在本例中,index.php的副本为 copy.php 。如下面所示编辑 copy.php 文件。
$CONF['Self'] = 'copy.php';
include('./config.php');
selectBlog('shortblogname');
selector();
?>
(你能在管理区找到 shortblogname)
selectBlog 只是一种使用方法,使用 index.php 的副本,你能做更多的事情:
| 方法 | 介绍 |
|---|---|
selectBlog('shortblogname'); |
保证该博客为当前被选择的博客 |
selectSkin('skinname'); |
保证该皮肤是当前被选择的皮肤 |
selectCategory(1234); |
保证该分类是当前被选择的分类。用分类的编号作为变量,也可以用分类名(但分类名可能重名而导致问题) |
selectItem(1234); |
保证该文章是当前被选择的文章 |
selectLanguage('french'); |
保证该语言是当前被选择的语言 (注意: 可能导致出现 PHP 警告) |
在使用上述功能前,保证这些语句放置在 include('./config.php') 之后 , selector(); 之前!
在 http://yourhost.com/ 的子目录 http://yourhost.com/sub/ 中创建博客,只要在该子目录中创建 index.php 的副本,修改 include('./config.php'); 为 include('../config.php');即可。
If you see tags like <br /> in the source code of your webpage, it's because the output of Nucleus (except the things defined by templates and skins, of course) is compliant to the XHTML 1.0 standard from the W3C, which is the successor of HTML 4. This way, Nucleus is ready for the future of the web. As far as I know, this XHTML support does not cause any trouble with older browsers and is correctly interpreted.
What this means, is that you can perfectly create an XHTML-compliant site by using correct skins and templates. The default Nucleus skin is XHTML-compliant, but uses the "HTML 4 Loose" doctype. This way, users not knowing XHTML can not create documents with a false XHTML doctype.