Gregarius 安装说明
查看全部词条命名空间:Main
然后到Gregarius的官方网站下载最新版本,下载地址,解压缩,然后按照以下说明修改其中文件夹中的相关文件。
- 1. dbinit.php.sample
将文件名改为 dbinit.php
define ('DBTYPE','mysql');
//define ('DBTYPE',"sqlite");
//
// The name of your database
//
define ('DBNAME','数据库名称'); // 数据库名称
//
// The username to use when connecting to the database. Make sure that
// thus user owns privileges to CREATE database tables on the above
// database!
//
define ('DBUNAME','数据库用户名'); // 数据库用户名
//
// The password to use when connecting to the database
//
define ('DBPASS', '数据库密码'); // 数据库密码
- 2. cls/nav.php
function Navigation() {
$this->appendNavItem(getPath(),LBL_NAV_HOME,LOCATION_HOME);
$this->appendNavItem(getPath().'update.php',LBL_NAV_UPDATE,LOCATION_UPDATE);
$this->appendNavItem(getPath().'search.php',LBL_NAV_SEARCH,LOCATION_SEARCH);
$this->appendNavItem('http://www.linji.cn',<span>B</span>log); // 加入Blog链接
$this->appendNavItem(getPath().'admin/',LBL_NAV_CHANNEL_ADMIN,LOCATION_ADMIN);
- 3. themes/default/web/footer.php
在网页下面加入两个链接
<a href="http://gregarius.net/">Gregarius</a> <?php echo _VERSION_; ?><?php echo
rss_svn_rev('.'); ?> // 以下为加入代码
| <a href="http://sourceforge.net/project/showfiles.php?group_id=98845">公开
版下载地址</a> | <a href="http://gregarius.net/nightlies/">开发版下载地址</a>
- 4. util.php
如果你是以 http://yourdomain/rss 来访问,请不要修改这个文件
如果你是以 http://yourdomain 来访问,就一定要修改这个文件
/**
* Returns the relative path of the install dir, e.g:
* http://host.com/thing/ -> "/thing/"
* http://host.com/ -> "/"
*/
function getPath() {
static $ret;
if ($ret === NULL) {
$ret = dirname($_SERVER['REMOTE_HOST']);
if (defined('RSS_FILE_LOCATION') && eregi(RSS_FILE_LOCATION."$", $ret)) {
$ret = substr($ret, 0, strlen($ret) - strlen(RSS_FILE_LOCATION));
}
if (substr($ret, -1) != "/") {
$ret .= "/";
}
}
return $ret;
}
$dummy = getPath();
修改为
/**
* Returns the relative path of the install dir, e.g:
* http://host.com/thing/ -> "/thing/"
* http://host.com/ -> "/"
*/
function getPath() {
static $ret;
if ($ret === NULL) { // 修改地方
$ret .= "/";
}
return $ret;
}
$dummy = getPath();
- 5. themes/lilina/web/item.php
<?php
global $lastDate;
$thisDate = date("F d, Y", $GLOBALS['rss']->currentItem->date);
if (!$lastDate || $lastDate != $thisDate) {
?>
修改为
<?php
global $lastDate;
$thisDate = date("Y年m月d日", $GLOBALS['rss']->currentItem->date); // 修改时间格式
if (!$lastDate || $lastDate != $thisDate) {
?>
- 6. cls/wrappers/item.php
function rss_item_css_class() {
if ($GLOBALS['rss'] -> currentItem -> isUnread) {
return "item unread"; // 修改地方
}
修改为
function rss_item_css_class() {
if ($GLOBALS['rss'] -> currentItem -> isUnread) {
return "item even"; // 修改地方
}
- 7. admin/index.php
."<h1 id=\"top\">" .rss_main_title() ."</h1>";
修改为
." <font size=\"5px\"><b>".rss_main_title()."</b></font><br /><br />";
- 8. themes/lilina/web/index.php
<h1 id="top"><?php echo rss_main_title() ?></h1>
修改为
<font size="5px"><b><?php echo rss_main_title() ?></b></font><br /><br />
- 9. themes/default/web/header.php
如果你是以 http://ourdomain/rss 来访问,请不要修改这个文件
如果你是以 http://yourdomain 来访问,就一定要修改这个文件
<?php if(rss_header_autorefreshtime() > 0) { ?>
<meta http-equiv="refresh" content="<?php echo rss_header_autorefreshtime(); ?>;
<?php echo rss_header_autorefreshurl() ?>" />
<?php } ?>
修改为
<?php if(rss_header_autorefreshtime() > 0) { ?>
<meta http-equiv="refresh"
content="<?php echo rss_header_autorefreshtime(); ?>;
URL=http://feed.linji.cn/update.php" /> // 修改自动刷新地址
<?php } ?>
- 10. admin/folders.php
让程序可以支持中文文件夹(分类)名称
case 'LBL_ADMIN_ADD':
$label=sanitize($_REQUEST['new_folder'],RSS_SANITIZER_CHARACTERS_EXT);
修改为
case 'LBL_ADMIN_ADD':
$label=$_REQUEST['new_folder'];
case CST_ADMIN_SUBMIT_EDIT:
// TBD
$new_label = sanitize($_REQUEST['f_name'], RSS_SANITIZER_CHARACTERS_EXT);
修改为
case CST_ADMIN_SUBMIT_EDIT:
// TBD
$new_label = $_REQUEST['f_name'];
- 11. 后台设置 ( admin | config )
- rss.config.dateformat 值修改为 Y年 m月 d日 g:i a (预览格式:2006年 02月 24日 10:18 am)
- rss.config.refreshafter 值:45 // 自动更新时间间隔
- rss.output.title 值:Gregarius ( 如:Linji's Blog | 新闻聚合 ) // 网页标题
最后, 把改好的程序上传到你空间即可。