diff -upN advanced_forum/advanced_forum.module advanced_forum_patched/advanced_forum.module
--- advanced_forum/advanced_forum.module	2008-03-23 02:22:28.000000000 +0000
+++ advanced_forum_patched/advanced_forum.module	2008-03-31 23:38:05.619000000 +0100
@@ -15,24 +15,20 @@ function advanced_forum_init() {
 /**
  * Implementation of hook_menu.
  */
-/*
-//TODO: Update this to work with the D6 menu.
-function advanced_forum_menu($may_cache) {
+
+function advanced_forum_menu() {
   $items = array();
-  if ($may_cache) {
-    global $user;
-    $items[] = array(
-               'path' => "forum/markasread",
-               'title' => 'Helper page to mark forums read.',
-               'callback' => 'advanced_forum_markasread',
-               'access' => user_access('access content') && $user->uid,
-               'type' => MENU_CALLBACK,
-               );
-  }
-  
+
+  $items['forum/markasread'] = array(
+    'title' => 'Helper page to mark forums read.',
+    'page callback' => 'advanced_forum_markasread',
+    'access callback' => 'user_access',
+    'access arguments' => array('access content'),
+    'type' => MENU_CALLBACK,
+  );
+
   return $items;
 }
-*/
 
 /**
  * Implementation of hook_theme.
@@ -459,33 +455,34 @@ function advanced_forum_preprocess_forum
  */
 function advanced_forum_markasread() {
   global $user;
-  $tid = arg(2);
-
-  $sql = 'REPLACE INTO {history} (uid,nid,timestamp)'
-         .' SELECT %d, n.nid, %d FROM {node} n'
-         .($tid ? ' INNER JOIN {term_node} r ON n.nid=r.nid' : '')
-         .' INNER JOIN {node_comment_statistics} l ON l.nid=n.nid'
-         .' WHERE (n.created > %d'
-         .' OR l.last_comment_timestamp > %d)';
-  $args = array($user->uid, time(), NODE_NEW_LIMIT, NODE_NEW_LIMIT);
+  $tids = arg(2);
 
-  if ($tid) {
-    $sql .= ' AND r.tid = %d';
-    $args[] = $tid;
+  if (empty($tids)) {
+    // Not for single forum - get all forum tid's
+    $vid = variable_get('forum_nav_vocabulary', '');
+    $tids = db_query('SELECT tid WHERE vid = %d', $vid);
+  }
+  else {
+    $forumid = $tids;
   }
-  
-  //*D6* Need to change this for all forum types
-  $type = 'forum';
-  $sql .= ' AND n.type = \'%s\'';
-  $args[] = $type;
 
-  db_query($sql, $args);
+  while ($tid = drupal_fetch_array($tids)) {
+    $sql = 'REPLACE INTO {history} (uid,nid,timestamp)'
+           .' SELECT %d, n.nid, %d FROM {node} n'
+           .($tid ? ' INNER JOIN {term_node} r ON n.nid=r.nid' : '')
+           .' INNER JOIN {node_comment_statistics} l ON l.nid=n.nid'
+           .' WHERE (n.created > %d'
+           .' OR l.last_comment_timestamp > %d) AND r.tid = %d';
+    $args = array($user->uid, time(), NODE_NEW_LIMIT, NODE_NEW_LIMIT, $tid);
+
+    db_query($sql, $args);
+  }
   
-  if ($tid) {
-    drupal_set_message(t('All topics in forum marked as read'));
-    drupal_goto('forum/'.$tid);
+  if (isset($forumid)) {
+    drupal_set_message(t('All content in this forum has been marked as read'));
+    drupal_goto('forum/'.$forumid);
   } else {
-    drupal_set_message(t('All forum posts have been marked as read'));
+    drupal_set_message(t('All forum content been marked as read'));
     drupal_goto('forum');
   }
   
Common subdirectories: advanced_forum/themes and advanced_forum_patched/themes
