Jump to content


Invision power board ban system help

  • Please log in to reply
No replies to this topic

#1 Lumbergh

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 23 July 2006 - 10:30 PM

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):

// For how long?
		  $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);
When I just try it i keep getting this error:

mySQL query error: INSERT INTO ibf_members VALUES('', '1153678576', mgroup2)

SQL error: Column count doesn't match value count at row 1
SQL error code: 
Date: Sunday 23rd of July 2006 01:16:16 PM

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!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users