function aggregator_page_categories

cis7 aggregator_page_categories()
cle7 aggregator_page_categories()
elmsmedia7 aggregator_page_categories()
icor7 aggregator_page_categories()
meedjum_blog7 aggregator_page_categories()
mooc7 aggregator_page_categories()

Page callback: Displays all the categories used by the Aggregator module.

Return value

string An HTML formatted string.

See also


1 string reference to 'aggregator_page_categories'
aggregator_menu in modules/aggregator/aggregator.module
Implements hook_menu().


modules/aggregator/, line 379
User page callbacks for the Aggregator module.


function aggregator_page_categories() {
  $result = db_query('SELECT c.cid, c.title, c.description FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid LEFT JOIN {aggregator_item} i ON ci.iid = i.iid GROUP BY c.cid, c.title, c.description');

  $output = '';
  foreach ($result as $category) {
    if (variable_get('aggregator_summary_items', 3)) {
      $summary_items = array();
      $items = db_query_range('SELECT i.title, i.timestamp,, f.title as feed_title, as feed_link FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON i.iid = ci.iid LEFT JOIN {aggregator_feed} f ON i.fid = f.fid WHERE ci.cid = :cid ORDER BY i.timestamp DESC', 0, variable_get('aggregator_summary_items', 3), array(':cid' => $category->cid));
      foreach ($items as $item) {
        $summary_items[] = theme('aggregator_summary_item', array('item' => $item));
    $category->url = url('aggregator/categories/' . $category->cid);
    $output .= theme('aggregator_summary_items', array('summary_items' => $summary_items, 'source' => $category));

  return theme('aggregator_wrapper', array('content' => $output));