View Full Version : Whats the code for only some people can see the button?
Hi,
i want make a special delete Button in the showthread.php and i want that only the thread starter, admin, mods of this forum can see the button, how can i do it?
thanks :)
you would do
if ($bbuserinfo['userid'] == $post['userid'] or $bbuserinfo['usergroupid'] == 6 or $bbuserinfo['usergroupid'] == 7 or $bbuserinfo['usergroupid'] == 5) {
// do button stuff//
}
hi thanks but i have many self made mod groups and so i must always change the IDs.
is there no other way so that the board looks if the mod can delete in his forum?
Boofo
04-07-2003, 06:18 PM
You could also add this to that line.
$permissions[ismoderator]
i think this will work too
if ($bbuserinfo['userid'] == $post['userid'] or ismoderator()) {
// do button stuff//
}
Boofo
04-08-2003, 04:23 AM
If you use just ismoderator(), then any mod can delete the message. If you use $permissions[ismoderator], then just the moderators of that forum can delete the message (as well as Admins and Supermods, of course).
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.