Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Okay, this solution worked. Looked at the comments.module and saw that function theme_comment_block() had a "WHERE n.status = 1" condition and I added this too to the live_discussions module. In line 83 just change
// create the SQL
$query = "SELECT c.nid, n.title, COUNT(c.nid) AS comment_count, MAX(c.timestamp) AS the_time FROM {comments} c ".
"LEFT JOIN {node} n ON n.nid = c.nid WHERE c.status = 0 ".$select_blog." GROUP BY c.nid ORDER BY the_time DESC ".
"LIMIT ".$commented_limit;
to
// create the SQL
$query = "SELECT c.nid, n.title, COUNT(c.nid) AS comment_count, MAX(c.timestamp) AS the_time FROM {comments} c ".
"LEFT JOIN {node} n ON n.nid = c.nid WHERE n.status = 1 AND c.status = 0 ".$select_blog." GROUP BY c.nid ORDER BY the_time DESC ".
"LIMIT ".$commented_limit;
Comments
Comment #1
noid commentedOkay, this solution worked. Looked at the comments.module and saw that function theme_comment_block() had a "WHERE n.status = 1" condition and I added this too to the live_discussions module. In line 83 just change
to
Comment #2
Prometheus6 commentedGood catch. Thanks.
Comment #3
Prometheus6 commented