Ah, I was imagining a different setup.
No problem
The modification that you have linked to will work, with a little modification of it's own.
Replace
Code:
!$bbuserinfo['userid']
with
Code:
in_array($bbuserinfo['usergroupid'], array(5,6,7))
If you have any additional usergroups that you wish to see the posts, add the id number to the list. Any usergroups not listed here will not meet the condition and so will not see the posts. I have allowed Moderators, Super Moderators and Administrators to view the posts in the code given.