2011-08-08, 03:30 PM
Pages: 1 2
2011-08-08, 03:38 PM
So it's the full Who's Online feature that you want to block? The small list on the index should be available to everyone?
2011-08-08, 03:54 PM
Yes, I'd like to show the who's online list on the board statistics on the forum home page to all members - but the complete list only access by admin
ThankYou
ThankYou
2011-08-08, 03:57 PM
1. Open the online.php file in a text editor.
2. Find:
3. Change to:
4. Replace 1,2,3 with the gid of the usergroups that you want to allow to use the full Who's Online feature.
2. Find:
if($mybb->usergroup['canviewonline'] == 0)
{
error_no_permission();
}
3. Change to:
$list_exempt_groups = "1,2,3";
$exempt_groups = explode(",",$list_exempt_groups);
if($mybb->usergroup['canviewonline'] == 0 || !in_array($mybb->user['usergroup'],$exempt_groups))
{
error_no_permission();
}
4. Replace 1,2,3 with the gid of the usergroups that you want to allow to use the full Who's Online feature.
2011-08-08, 04:05 PM
Thank You very much
HI ,
I've changed the code as instructed
But when login as administrator, when click on the complete list, I've got an error message : " You do not have permission to access this page. ..."
Is there anyway to not even showing the text/link "complete List" to the not-allowed group ?
Thank You .
HI ,
I've changed the code as instructed
But when login as administrator, when click on the complete list, I've got an error message : " You do not have permission to access this page. ..."
Is there anyway to not even showing the text/link "complete List" to the not-allowed group ?
Thank You .
2011-08-08, 06:27 PM
Replace above with this;
if($mybb->usergroup['canviewonline'] == 0 || in_array($mybb->user['usergroup'],array(1,2,5,7)))
{
error_no_permission();
}
Now change 1,2,5,7 to the Usergroup IDs you do not want them to see complete online page.2011-08-08, 06:31 PM
My code works, I've tested it. You're just doing the opposite Yaldaram, and in my opinion it's a lot easier to indicate the usergroups you don't want to access it.
Is that what you did MayKim? Did you indicate the gid of the usergroups you don't want to access the page? Because if you added the admin's gid (4), then it will obviously block you.
Is that what you did MayKim? Did you indicate the gid of the usergroups you don't want to access the page? Because if you added the admin's gid (4), then it will obviously block you.
2011-08-08, 06:35 PM
Yes, I guess I did it wrong then - I had gid 4 in the the $list_exempt_groups
ThankYou
Is there anyway to even not display link for the "complete list" ?
Thank You
ThankYou
Is there anyway to even not display link for the "complete list" ?
Thank You
2011-08-08, 06:46 PM
Yeah, you could do it, but do you really think that's necessary?
2011-08-08, 06:55 PM
I guess it is not really necessary , just if it is better if the feature is not presented to the user than the user having an error message
Thanks
Thanks
Pages: 1 2