--- ../../../../../../tmp/kde-brenda/cervisiadpSBGb-comments_page.module-HEAD 2007-11-14 13:35:34.000000000 +1300 +++ comments_page.module 2007-11-14 13:34:56.000000000 +1300 @@ -49,8 +49,16 @@ function comments_page_user($uid) { drupal_set_title($title = t("@name's comments", array('@name' => $account->name))); $output = ''; $result = pager_query(db_rewrite_sql("SELECT c.comment, c.cid, c.nid, c.uid, c.timestamp, n.title, u.name FROM {comments} c INNER JOIN {node} n ON c.nid = n.nid INNER JOIN {users} u ON c.uid = u.uid WHERE c.uid = %d AND n.status = 1 ORDER BY c.timestamp DESC"), variable_get('default_nodes_main', 10), 0, NULL, $account->uid); while ($comment = db_fetch_object($result)) { + $output .= theme('comments_page_user', $comment); + } + $output .= theme('pager', NULL, variable_get('default_nodes_main', 10)); + return $output; + } +} + +function theme_comments_page_user($comment) { $output .= '
'; $output .= '
'; $output .= '

'.l($comment->title, "node/".$comment->nid, array('title' => $comment->title)).'

'; $output .= '
'.l(check_plain($comment->name), "user/".$comment->uid, array('title' => $comment->name."'s profile")).'
'; @@ -61,13 +69,10 @@ function comments_page_user($uid) { $output .= l('View Comment', "node/".$comment->nid, NULL, NULL, "comment-$comment->cid"); $output .= '
'; $output .= '
'; $output .= ''; - } - $output .= theme('pager', NULL, variable_get('default_nodes_main', 10)); return $output; } -} /** * Displays a Drupal page containing recent comments of all users. */