Hey Fluffy --
First off -- excellent work!
First off, if I am a registered user but not a member of a group, I can browse open groups, look at members, and read 'bulletins'.
I can even read a group's forum posts (I have integrated Joomlaboard). In fact, I can still post to a group's forum post.
I think that these forums are meant to be for group members only -- ie only group members should post and 'see' their own forum.
However, there is a problem with this code:
[code:1] if($result == $group_cat )
{
$q=("SELECT group_id from #__gj_jb, #__gj_users WHERE category_id='$catid' AND $my->id=id_user AND id_group=group_id"«»);
$database->setQuery($q);
$gid=$database->loadResult();
$groupjive=1;
if(!empty($gid))
{
showgroup($gid);
}
else
{
echo "You are not authorized to view this page.";
}
} [/code:1]
When a user who is not a member, clicks on the "Group Forum" link, they are presented with the message "You are not authorized to view this resource"
That is great, but the problem is that the forum still displays underneath this message.
That is because when a user clicks on the "Group Forum" link, the modified joomlaboard file is called.
This modified file "includes" groupjive_jb.php which runs the above check (in the case of a non-member, displaying the "unauthorized" message) but after it runs the above check, it still outputes the group forum.
I hope my message was clear!
What do you think?