/[drupal]/contributions/sandbox/alaa/snippets/manalaa_aggregator2_feed_block.php
ViewVC logotype

Contents of /contributions/sandbox/alaa/snippets/manalaa_aggregator2_feed_block.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Tue Mar 21 23:19:50 2006 UTC (3 years, 8 months ago) by alaa
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
some page and block snippets
1 <?php
2 $html = "";
3 $cid = "manalaa:posts_block";
4 $cached = cache_get($cid);
5 $fid = 661;
6
7 if ($cached){
8 $html = $cached->data;
9 } else {
10
11 $query = "select i.link,n.title from aggregator2_item as i, node as n where i.fid=$fid and i.nid=n.nid ORDER BY n.sticky DESC, n.created DESC limit 30";
12
13 $result = db_query($query);
14
15 $rows=array();
16
17
18 while ($row=db_fetch_object($result)) {
19 $rows[] = theme('aggregator_block_item',$row);
20 }
21
22 $html =l theme('item_list',$rows);
23
24 cache_set($cid, $html, time()+(60*60));
25 }
26 print $html;
27
28 ?>
29 <div class="more-link flop"><?php print l("more","http://www.eglug.org/alaa"); ?></div>

  ViewVC Help
Powered by ViewVC 1.1.2