Quote:
Originally Posted by Tim Wheatley
Can someone please tell me where/how I can hard code the userid of those I want to allow to post events? I don't want to risk the complications of setting up new usergroups, as some of those I want to post events are mods, some registered, etc etc. I don't expect this to be added to the hack, btu the knowledge would be useful to some. 
|
There are probably a couple of places you should do this. The first would be in newthread.php
There'll be a section like this:
PHP Code:
if (!($forumperms & CANPOSTVBOOKIEEVENT))
{
unset($_POST['postvbookieevent']);
}
You could change that to something like:
PHP Code:
if (!$bbuserinfo['userid'] != 126)
{
unset($_POST['postvbookieevent']);
}
Also:
PHP Code:
if (($forumperms & CANPOSTVBOOKIEEVENT) && ($vbookiesettings['active'] != 0))
{
$show['vbookieevent'] = true;
}
To:
PHP Code:
if (($bbuserinfo['userid'] == 126) && ($vbookiesettings['active'] != 0))
{
$show['vbookieevent'] = true;
}
That should hide the checkbox for adding a new event from everyone but the allowed user.
Then, in vbookie.php, find the section that starts:
PHP Code:
if ($_REQUEST['do'] == 'newevent')
Then, below that, find the lines:
PHP Code:
if (!($forumperms & CANVIEW) OR !($forumperms & CANPOSTNEW) OR !($forumperms & CANPOSTVBOOKIEEVENT))
{
print_no_permission();
}
Change that to:
PHP Code:
if (!($forumperms & CANVIEW) OR !($forumperms & CANPOSTNEW) OR !($bbuserinfo['userid'] == 126))
{
print_no_permission();
}
There will be a similar change to make in the section that starts:
PHP Code:
if ($_POST['do'] == 'postevent')
Just search on 'CANPOSTVBOOKIEEVENT' to find the two locations.
I think that'd be enough, but it's just from my head and not tested in any way.