MyBB Community Forums

Full Version: Certain plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.
is fhere any certain plugin that i need to make pages where only certain groups can view?
.thank you.
if(!in_array( $mybb->user['usergroup'], [4,3,2] )) {
die(' You're not allowed to view this page. ');
}

Change 4,3,2 to your GIDS. Simple PHP works, no need for a plugin.
(2015-07-12, 09:52 PM)Akay Wrote: [ -> ]
if(!in_array( $mybb->user['usergroup'], [4,3,2] )) {
die(' You're not allowed to view this page. ');
}

Change 4,3,2 to your GIDS. Simple PHP works, no need for a plugin.

Thank you for your great and quick response, one more question....
where do i actually find the php that you gave?

Thanks.
(2015-07-12, 09:55 PM)Chupipsoo Wrote: [ -> ]
(2015-07-12, 09:52 PM)Akay Wrote: [ -> ]
if(!in_array( $mybb->user['usergroup'], [4,3,2] )) {
die(' You're not allowed to view this page. ');
}

Change 4,3,2 to your GIDS. Simple PHP works, no need for a plugin.

Thank you for your great and quick response, one more question....
where do i actually find the php that you gave?

Thanks.

What page do you want to edit? post the page here. Also, i created the php code myself and it works.
This page....

http://forum.legendarymu.net/games.php
user: test
pass: 123456

Thank you.
(2015-07-12, 09:27 PM)Chupipsoo Wrote: [ -> ]Hi.
is fhere any certain plugin that i need to make pages where only certain groups can view?
.thank you.

Why not simply by forum permissions, there you can exclude certain usergroups from viewing a forum.

Or do you mean other type of pages? But which then?