评论系统HashOver的安装使用

下载与安装

GITHUB下载,目前为2.0开发版(hashover 2.0里2.0是名称的一部分,不是版本号,至少目前不是)。把hashover文件夹上传到服务器或者本地环境相对位置,编辑hashover/backend/classes/secrets.php中的这几项

1
2
3
4
5
6
7
8
9
10
11
// E-mail for notification of new comments
public $notificationEmail = 'example @ example.com';

// Unique encryption key (case-sensitive)
protected $encryptionKey = '8CharKey';

// Login name to gain admin rights (case-sensitive)
protected $adminName = 'admin';

// Login password to gain admin rights (case-sensitive)
protected $adminPassword = 'passwd';

hashover默认使用xml方式存储评论数据,如果使用数据库需要编辑hashover/backend/classes/secrets.php中的这几项,上面选择存储方式可以不管,之后在后台管理修改。

1
2
3
4
5
6
7
8
9
// General database options
public $databaseType = 'sqlite'; // Type of database, sqlite or mysql
public $databaseName = 'hashover-threads'; // Database name

// SQL database options
public $databaseHost = 'localhost'; // Database host name
public $databaseUser = 'root'; // Database login user
public $databasePassword = 'password'; // Database login password
public $databaseCharset = 'utf8'; // Database character set

hashover/backend/classes/sensitivesettings.php还有两项,一个是图片后缀,一个是域名管理,其中域名必填否则连不上,本地测试用就填”localhost”

1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Types of images allowed to be embedded in comments
public $imageTypes = array (
'jpeg',
'jpg',
'png',
'gif'
);

// External domains allowed to remotely load HashOver scripts
public $allowedDomains = array (
// '*.example.com',
// '*.example.org',
// '*.example.net'
);

之后访问“域名/hashover/admin/”按照之前填写的信息登录就可以管理了,后台有中文 功能也不多无需多言,使用就是在需要嵌入评论的位置加上

1
<script type="text/javascript" src="/hashover/comments.php"></script>

使用问题

试了试基本功能还算齐全,不过没有屏蔽词功能,目前没文档,没安装向导 错误提示也比较简单直接,而且我测试的这个版本提示的文件位置还错了。。。

如果评论无法显示需要手动刷新,就去关闭异步加载即可。