Hi Guys,

have tried numerous threads on this problem, including the node_filter_type module and the tips that go with it with no joy..any help appreciated..I'm guessing I'm just missing something very simple.

Problem: When I click on ACTIVE FORUM DISCUSSIONS link in the forum..it just links across to the tracker.module which displays a list of Recent "everything" added to the site..i.e. all node types.

As mentioned, I have tried and exhausted the search on here..the node_type_filter module wouldn't work for me...(i'm using 4.5. and would like to do the same with 4.6)

Any tips, guidance, pointers appreciated..

Dub

Comments

laura s’s picture

I'm not sure what the status is, but it has been reported as a feature suggestion under issues.

.:| Laura • pingV |:.

_____ ____ ___ __ _ _
Laura Scott :: design » blog » tweet

Dublin Drupaller’s picture

Thanks Laura...

yeah..I spotted a request/issue when I was looking for a solution, but, it seems to be left hanging...

was doing some work on this earlier and have narrowed down the problem to a few lines of code..anyone with a bit of knowledge of SQL willing to help out?

Here is the tracker_page query that needs to have the n.type='forum' statement inserted...which I gather, restricts the pager_query to only look at nodes where the type = 'forum' (see this thread http://drupal.org/node/19387) but I'm not sure where exactly it should go...

Any ideas?

$result = pager_query('SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, MAX(GREATEST(n.changed, c.timestamp)) AS last_post FROM {node} n '. node_access_join_sql() .' LEFT JOIN {comments} c ON n.nid = c.nid INNER JOIN {users} u ON n.uid = u.uid WHERE n.status = 1 AND (c.status = 0 OR c.status IS NULL) AND '. node_access_where_sql() .' AND (n.uid = %d OR c.uid = %d) GROUP BY n.nid, n.title, n.type, n.changed, n.uid, u.name ORDER BY last_post DESC', 25, 0, 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n '. node_access_join_sql() .' LEFT JOIN {comments} c ON n.nid = c.nid WHERE n.status = 1 AND '. node_access_where_sql() .' AND (n.uid = %d OR c.uid = %d)', $uid, $uid); 
  } 
  else { 
    $result = pager_query('SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, MAX(GREATEST(n.changed, c.timestamp)) AS last_post FROM {node} n '. node_access_join_sql() .' LEFT JOIN {comments} c ON n.nid = c.nid INNER JOIN {users} u ON n.uid = u.uid WHERE n.status = 1 AND (c.status = 0 OR c.status IS NULL) AND '. node_access_where_sql() .' GROUP BY n.nid, n.title, n.type, n.changed, n.uid, u.name ORDER BY last_post DESC', 25, 0, 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n '. node_access_join_sql() .' WHERE n.status = 1 AND '. node_access_where_sql()); 

Thanks in advance for anyone with any tips..and will hunut down that issue that was left hanging/closed without fixing and post a solution up there.....if I manage to get it sussed!

Dub

DUBLIN DRUPALLER
___________________________________________________
A drupal user by chance and a dubliner by sheer luck.
Using Drupal to help build Artist & Band web communities.

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

Dublin Drupaller’s picture

Tracking.module does the trick..

http://drupal.org/node/24504

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate