Lumbergh Posted July 23, 2006 Share Posted July 23, 2006 Alright... I just installed "easyban" on my 2.1 board, which is a little module that allows bans by the click of a button, and I wanted to modify it a little. I'd like to add a time feature where you can ban a member for a certain amount of time, then after the time is up they get put back into their original usergroup. I've modified the easyban skin thing to show a text box for time, with name "time". Easy enough. Now I'm trying to modify the easyban to take the value of time and put it into the mysql database under ibf_members in time, and then set mgroup2 = mgroup so that they're original group is saved. Here is the little snippet of code I have(I have it so that if the user enters 0 it bans them forever... I think):[code]// For how long? if($ibforums->input['time']!="0") { $time = time(); $this->ipsclass->DB->query("INSERT INTO ibf_members VALUES('', '$time', mgroup2)"); $this->ipsclass->DB->query("UPDATE ibf_members SET mgroup=mgroup2 WHERE id=".$id); }[/code]When I just try it i keep getting this error: [code]mySQL query error: INSERT INTO ibf_members VALUES('', '1153678576', mgroup2)SQL error: Column count doesn't match value count at row 1SQL error code: Date: Sunday 23rd of July 2006 01:16:16 PM[/code]Now, keep in mind I'm VERY new to php/mysql, and I'm just trying this to the best of my ability. Am I even going about this the correct way? How do I fix this error? Also, how would I make it so that when the time is up it sets mgroup = mgroup2 so the user is set back into their original group? If you need more of the code, just tell me.Thanks for the help! Quote Link to comment https://forums.phpfreaks.com/topic/15429-invision-power-board-ban-system-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.