I have an online forun i just finished building. Now i need to build a script that moderates my forum witout me there.

It needs to be able to ban and unban users making bad posts, send an email when any fatal error is reported.

ban and unban users making bad posts

How would you determine this? You'll have to create rules for the script to follow.

Member Avatar for diafol

Automatically banning members can be a tricky thing to implement. You should take extreme care in implementing this typoe of facility in case you alienate valuable contributors. This is why real moderators are essential for a vibrant and well behaved forum-based site. A reporting tool would be an effective way of evaluating member-sent complaints. My 2p.

Yeah, i know its risky but, i dont have people who can moderate the forum. Its gonna be me only guys. Thats why i thought maybe i could build a script that does at least a little moderating work to minimize the number of moderators i'l have to get. Pls, help.

So far, i've got this.

 Class robot{
 private $location;

 public function getIp($ip){
       }

 private function sendIp(){
 }
      }

nw i have a script that reports an error to a text file whenever an error occurs or a suscpicious attack is happening, but before the report is made, the

   class robot  

is called, then the ip address of the user causing the error is sent to the method

 getip($ip)

. The method get the location of that i.p via google maps, then the

  private $location

is updated with the returned location. The function

 sendIp()

then mails the location, i.p , and username of that user(if he's logged in) to me.

Thats just a little of what i'm talkin bout guys. Your further help wil be so appreciated

My rules of baning. User's post containing too many links, too many errors coming from reports about a user, a user reported by another(robot wil review reason stated and check the user's posts for any abnormalities. Then bans if the user's posts truely contain some unwanted expressions or pattern.)

Yes, but a script does not understand "too many".

Start with making a method that checks a new post for a link count and work from there.

Yes thats true but, what about when the user is reported and i'l av to screen all its posts?

Member Avatar for diafol

You could always do a client-side check for the number of <a> tags - which should be replicated on the server side. A client-side solution for not p-ing off your regulars who put in one link too many and then lost their 1000 word masterpiece after getting told off by the server.

Just wondering, if this is a new forum, how many posts do you envisage per day? Could you not moderate it yourself until you hit a critical mass and then recruit moderators from your regular poster list?

Start small. Once you get going, you'll get more ideas on how to best handle certain situations. IMO if a user is reported, then you should have at least one post to start with. The user id will be the link to rest (if that is needed at all).

@priteas, thanks so much bro. I guess i'l have to use more of my ideas, if i run into any problems bro. I'l make sure i update this thread. The thread may stil be useful for others. Thanks again bro

@diafol. Thanks, i'll work somthing up.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.