Download & Extend

Recent Posts Block only to display public threads

Project:Drupal vB
Version:6.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi all,

we are using DrupalVB and also have the block "Recent Posts" active on the site. However, our forum contains non-public forums as well but the Recent Post block shows all new threads regardless from access rights.

I believe the SQL statement used for the Recent Post function is this:
SELECT t.threadid, t.title, t.replycount, t.dateline AS created, t.postuserid AS userid, t.postusername AS name FROM {thread} t INNER JOIN {forum} f ON f.forumid = t.forumid WHERE f.showprivate = 0 AND t.lastpost >= %d ORDER BY t.dateline DESC LIMIT %d

How would I gave to change that statement so that only those new threads are displayed that the public (unregistered) has access to?

Can anybody help?

Best regards,
George

Comments

#1

subscribe

#2

When viewing the home page, it doesn't display my private forum threads but if you are anywhere else on the site it does

#3

Version:5.x-2.2» 6.x-2.x-dev
Component:Miscellaneous» Code
Category:support request» task

#896096: Hide private forum threads from Last Post/Thread block has been marked as duplicate of this issue.

nobody click here