Quote:
Originally Posted by bigcurt
Thanks a lot.
|
You're welcome
Quote:
Originally Posted by bigcurt
Any errors for anyone yet?
|
None for me
Quote:
Originally Posted by bigcurt
It would be incredibly nice if you could set which usergroups use this and which don't. I would like my regular users to be able to log out just not my banned ones.
|
Try editing the product file, replacing:
Code:
if (!isset($_COOKIE['NGBaccess'])) {
// we do NOT use vbsetcookie, because cookies set with vbsetcookie() are erased when the user logs out!
setcookie("NGBaccess", "yes", time()+31104000, "/");
}
with:
Code:
if (
!isset($_COOKIE['NGBaccess']) AND
!($vbulletin->userinfo['permissions']['genericoptions'] &
$vbulletin->bf_ugp_genericoptions['isnotbannedgroup'])
) {
// we do NOT use vbsetcookie, because cookies set with vbsetcookie() are erased when the user logs out!
setcookie("NGBaccess", "yes", time()+31104000, "/");
}
That *might* get the result you want, assuming the code is good and you've set all your banned groups to "is not a banned group: false" in your usergroup options.
If you haven't, you might try this :
Code:
if (
!isset($_COOKIE['NGBaccess']) AND
in_array($bbuserinfo['usergroupid'], array(8,9,10))
) {
// we do NOT use vbsetcookie, because cookies set with vbsetcookie() are erased when the user logs out!
setcookie("NGBaccess", "yes", time()+31104000, "/");
}
Where : "8,9,10" is a comma-separated list of the groups you want this to apply to. Don't actually use 8,9 and 10 unless these really are your banned groups
Please let me know if the isnotbannedgroup code above works

If it does, I might consider releasing an update to this hack which lets you choose whether to apply it to all registered members, banned members, or an admin-supplied list of group ids.