--- forum.module.orig 2004-11-06 07:01:39.000000000 -0500 +++ forum.module 2005-02-06 10:27:01.403435888 -0500 @@ -116,20 +116,31 @@ */ function forum_block($op = 'list', $delta = 0) { + $block = array(); + if ($op == 'list') { - $blocks[0]['info'] = t('Forum topics'); + $blocks[0]['info'] = t('Forum Active topics'); + $blocks[1]['info'] = t('Forum New topics'); } else { if (user_access('access content')) { - $content = node_title_list(db_query_range("SELECT DISTINCT(n.nid), n.title, l.last_comment_timestamp FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid ". node_access_join_sql() ." WHERE n.status = 1 AND n.type='forum' AND ". node_access_where_sql() ." ORDER BY l.last_comment_timestamp DESC", 0, variable_get('forum_block_num', '5')), t('Active forum topics:')); - - $content .= node_title_list(db_query_range("SELECT DISTINCT(n.nid), n.title FROM {node} n ". node_access_join_sql() ." WHERE n.type = 'forum' AND n.status = 1 AND ". node_access_where_sql() ." ORDER BY n.nid DESC", 0, variable_get('forum_block_num', '5')), t('New forum topics:')); + switch ($delta) { + case 0: + $subject = t('Forum Active topics'); + $content = node_title_list(db_query_range("SELECT DISTINCT(n.nid), n.title, l.last_comment_timestamp FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid ". node_access_join_sql() ." WHERE n.status = 1 AND n.type='forum' AND ". node_access_where_sql() ." ORDER BY l.last_comment_timestamp DESC", 0, variable_get('forum_block_num', '5')), ''); + break; + + case 1: + $subject = t('Forum New topics'); + $content .= node_title_list(db_query_range("SELECT DISTINCT(n.nid), n.title FROM {node} n ". node_access_join_sql() ." WHERE n.type = 'forum' AND n.status = 1 AND ". node_access_where_sql() ." ORDER BY n.nid DESC", 0, variable_get('forum_block_num', '5')), ''); + break; + } if ($content) { $content .= ''; } - $blocks['subject'] = t('Forum topics'); + $blocks['subject'] = $subject; $blocks['content'] = $content; } }