Please forgive me if I come across as an idiot, because I know virtually nothing about php, just enough to plug in snippets I find and hope that they work, which is my present trouble, a snippet not doing what I'd hoped. I've searched the forum, but may have overlooked or just not found what I am looking for. If you know of something that already addresses this, a link to that post would be greatly appreciated, as would all help that can be offered.
I'm creating a site using druapl 6.13 that will aggregate content from a variety of sites. While I can put together the standard block for aggregation, I'm trying to get the most recent posts to show in a static page that is the site's homepage. I'm able to get the links to show, but I'd like the name of the blog from which it comes, a timestamp, and a teaser to also show. I have no idea how to go about doing that and I'm hoping someone can set me in the right direction.
Here's the snippet I'm using:
$output ="Inland NW Cycling News Feeds"; $listlength='15'; $output .= '<div class="item-list"><ul>'; $query = "SELECT a.fid, a.iid, a.title, a.timestamp FROM {aggregator_item} a ORDER BY a.iid DESC LIMIT " . $listlength; $queryResult = db_query($query); while ($links = db_fetch_object($queryResult)) { $latestfeeds .= "<li>" . l($links->title,'aggregator/sources/'.$links->fid) . "</li>"; } $output .= $latestfeeds; $output .= "</ul></div>"; if ($latestfeeds): print $output; else: print "There are no news on this site yet..."; endif;
If you want to look at the site, it's at http://inwcn.org and you can see what I'm trying to do (I hope) and see how it would be nicer to have the blog name, time stamp, and a teaser as part of the content.
TIA for any help or suggestions you can offer.
Bradley