| 1 |
<?php
|
| 2 |
$html = "";
|
| 3 |
$tid = 226;
|
| 4 |
$cid = "egblogs:arabic_block";
|
| 5 |
$cached = cache_get($cid);
|
| 6 |
|
| 7 |
if ($cached){
|
| 8 |
$html = $cached->data;
|
| 9 |
} else {
|
| 10 |
$query = "select i.link,n.title from term_node as t, aggregator2_item as i, node as n where t.tid=$tid and t.nid=i.nid and t.nid=n.nid ORDER BY n.sticky DESC, n.created DESC limit 30";
|
| 11 |
|
| 12 |
$result = db_query($query);
|
| 13 |
|
| 14 |
$rows=array();
|
| 15 |
|
| 16 |
|
| 17 |
while ($row=db_fetch_object($result)) {
|
| 18 |
$rows[] = theme('aggregator_block_item',$row);
|
| 19 |
}
|
| 20 |
|
| 21 |
$html = theme('item_list',$rows);
|
| 22 |
cache_set($cid, $html, time()+(60*60));
|
| 23 |
}
|
| 24 |
print $html;
|
| 25 |
?>
|
| 26 |
<div class="more-link flop"><?php print l("more","taxonomy/term/$tid"); ?></div>
|