這些snippets滿有用的,例如這個:Blogroll based on aggregator feeds demo - 愛喵部落格,右欄下方列出所有聯播的部落格。 綜合問題 發表回應前,請先登入或註冊 可選擇列出某分類的feed: <?php $result = db_query("SELECT a.title, a.url, a.fid, a.link FROM {aggregator_feed} a INNER JOIN {aggregator_category_feed} b ON a.fid = b.fid WHERE b.cid = '1' ORDER BY a.fid"); $output = '<ul>'; while ($feed = db_fetch_object($result)) { $output .= '<li>' . l($feed->title, $feed->link) . '</li>'; } $output .= '</ul>'; $output .= '<p><a href="/aggregator/sources">more</a></p>'; return $output; ?> 發表回應前,請先登入或註冊
可選擇列出某分類的feed: <?php $result = db_query("SELECT a.title, a.url, a.fid, a.link FROM {aggregator_feed} a INNER JOIN {aggregator_category_feed} b ON a.fid = b.fid WHERE b.cid = '1' ORDER BY a.fid"); $output = '<ul>'; while ($feed = db_fetch_object($result)) { $output .= '<li>' . l($feed->title, $feed->link) . '</li>'; } $output .= '</ul>'; $output .= '<p><a href="/aggregator/sources">more</a></p>'; return $output; ?> 發表回應前,請先登入或註冊
可選擇列出某分類的feed:
<?php
$result = db_query("SELECT a.title, a.url, a.fid, a.link FROM {aggregator_feed} a INNER JOIN {aggregator_category_feed} b ON a.fid = b.fid WHERE b.cid = '1' ORDER BY a.fid");
$output = '<ul>';
while ($feed = db_fetch_object($result)) {
$output .= '<li>' . l($feed->title, $feed->link) . '</li>';
}
$output .= '</ul>';
$output .= '<p><a href="/aggregator/sources">more</a></p>';
return $output;
?>