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

02 May 2002, 10:54
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?

02 May 2002, 11:37
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.

02 May 2002, 20:36
Thank you very much, that works good. :)