一、在/index.php中找到
复制内容到剪贴板
代码:
elseif ($_GET['action'] == 'login') {
$pagefile = 'login';
$referer = getreferer();
if ($sax_uid && $sax_pw && $sax_group && $sax_hash) {
message('您已经处于登陆状态');
}
$options['title'] = settitle('登陆');
}在下面添加
复制内容到剪贴板
代码:
// SEBUG信息滚动板
elseif ($_GET['action'] == 'sebug-feed') {
$pagefile = 'sebug-feed';
$referer = getreferer();
$options['title'] = settitle('SEBUG安全信息滚动板');
}二、在/global.php中查找
复制内容到剪贴板
代码:
$archives_url = $options['url'].'archives/';在下面添加
复制内容到剪贴板
代码:
$sebug_feed_url = $options['url'].'sebug-feed/';查找
复制内容到剪贴板
代码:
$archives_url = $options['url'].'?action=archives';在下面添加
复制内容到剪贴板
代码:
$sebug_feed_url = $options['url'].'?action=sebug-feed';三、在.htaccess中查找
复制内容到剪贴板
代码:
# 用户列表、高级搜索、注册、登陆
RewriteRule ^(archives|search|reg|login|index|links)?/?$ index.php?action=$1 [QSA,L]改为
复制内容到剪贴板
代码:
RewriteRule ^(archives|search|reg|login|index|links|sebug-feed)?/?$ index.php?action=$1 [QSA,L]四、将以下代码另存为sebug-feed.php上传到您的模板目录下,要以UNTF-8存储。
复制内容到剪贴板
代码:
<?php if(!defined('SABLOG_ROOT')) exit('Access Denied');?>
{template header}
<div id="page">
<div id="wrap">
<!-- SEBUG信息滚动板-->
<div id="feed-control" a><span style="padding-right: 4px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; margin: 10px; color: #676767; padding-top: 4px">正在加载...</span> </div>
<!-- Google Ajax Api-->
<script src="http://www.google.com/jsapi?key=ABQIAAAAMWsJSzOzHYyl_H0EC6pYohRN2Hiih803MV3Bg4G-JEky5ALmtxQUM9jeRUIO0JBatd856vJUKKuGsQ" type="text/javascript"></script>
<!-- Dynamic Feed Control and Stylesheet -->
<script src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js" type="text/javascript"></script>
<p>
<style type="text/css">
@import url("http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css");
</style>
</p>
<script type="text/javascript">
function LoadDynamicFeedControl() {
var feeds = [{title: 'SEBUG', url: 'http://feed.sebug.net' }];
var options = {
numResults : 25,//显示条数
displayTime : 2000,
fadeOutTime : 4000,
scrollOnFadeOut : true,
pauseOnHover : true,
stacked : false,
horizontal : false,
title : 'SEBUG安全信息滚动板'
}
new GFdynamicFeedControl(feeds, 'feed-control', options);
}
// Load the feeds API and set the onload callback.
google.load('feeds', '1');
google.setOnLoadCallback(LoadDynamicFeedControl);
</script>
<!-- SEBUG信息滚动板-->
</div>
<div id="sidebar">
<h4>Categories</h4>
<!--{if !$catecache}-->
N
<!--{else}-->
<!--{loop $catecache $data}-->
<a href="$data[url]">$data[name]</a> <span>($data[articles])</span> /
<!--{/loop}-->
<!--{/if}-->
<!--{if $options['archives_num']}-->
<h4>Archives</h4>
<ul>
<!--{if !$archivecache}-->
<li>没有任何归档</li>
<!--{else}-->
<!--{loop $archivecache $key $data}-->
<li><a href="$data[url]">$key</a> <span>($data[num])</span></li>
<!--{/loop}-->
<!--{/if}-->
</ul>
<!--{/if}-->
<h4>Other</h4>
<img src="$options[url]images/amxku.png" alt="amxku.net"><br />
<a href="$options[url]wap" title="Security Box wap">WAP</a> /
<a href="http://feed.amxku.net" target="_blank">RSS</a> /
<a href="$options[url]sitemap.php" target="_blank">SiteMap</a> /
<a href="$options[url]aboutus" target="_blank">Aboutus</a>
<li>Since:10/2005</li>
</div>
</div>五、在模板中的适当位置添加
复制内容到剪贴板
代码:
<a href="$sebug_feed_url">滚动板</a>在后台更新模板就OK了。
演示页面
http://www.amxku.net/sebug-feed/
[
本帖最后由 amxku 于 2008-8-6 01:43 编辑 ]