Jump to content

Invision power board ban system help


Lumbergh

Recommended Posts

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 1
SQL 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!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.