PDA

View Full Version : Help a PHP no0b (moderator abilities)


SWFans.net
05-02-2002, 08:54 AM
I was curious if there may be anyone interested in helping me to create a custom PHP file to add to my mod folder that would give them an additional function, well specifically two functions. But as near as I can tell from looking over the query structure in options.php and the board database, it is from a single setting group.

I would like to give my moderators the ability to ban by IP and ban by username. Both features are enabled in the Admin CP and after doing some other modifications to mod abilities, such as edit custom profile fields and profiles, I thought this would be a moderately easy task too, but learned quickly by looking at the array and looping structure of options.php that I was out of my league.

I don’t think it would take too much PHP source to pull, display, and allow modification of those two aspects of the Banning Options setting, but my ability in PHP and MySQL just isn’t up to snuff.

Does anyone find this little project interesting enough to take on?

Admin
05-02-2002, 09:37 AM
Well, you can copy options.php over to your /mod forum, and change this code:
if (isset($settinggroupid)) {
$sqlwhere=" WHERE settinggroupid=$settinggroupid ";
} else {
$sqlwhere=" WHERE displayorder<>0 ";
}
To this:
$sqlwhere = ' WHERE settinggroupid = XX';
Where XX is the SettingGroupID of the banning options.

SWFans.net
05-02-2002, 06:36 PM
Thank you very much, that works good. :)