NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

Post a reply

Write your message and submit
Options
Humanity test

What is nine + six?

Go back

Topic review (newest first)

Waccoon
01-31-2011 19:29:51

The problem is not here, so there must be something else in your boot file that's causing the parsing error.

PHP will return an "unexpected $end" error when you have too many open curly brackets in your code.  Somewhere, you're missing a closing curly bracket.  These problems are very hard to debug because no line numbers are available, so you'll have to carefully look at each code block.  Having a text editor that matches brackets is a big help.

Now, what you're doing here is actually very risky, because it modifies the permissions of all members every time the board is viewed, and there's a risk that your status as the owner could be revoked if there's a bug.  I'd recommend moving this code into the script that updates the infractions, so the database will only search for infractions when a new infraction is assigned.  I'd also add a clause that will make the code ignore anyone with a rank above 8, so the owner will not be affected.  This is important because only the owner can access the config file.

Pinkie
01-31-2011 09:38:53

Hi,

I modified the oekaki to include an infraction system. In boot.php, I added the following to the end:

Code:

//Infractions
if ($cfg['use_infractions'] == 'yes') {
    $delete_flags = db_query("UPDATE {$db_mem}oekaki SET usrflags = '', rank = '0' WHERE infractions >= '{$cfg['total_infractions']}'");
}



// Regular maintenance
// For now, we'll only run this during normal browsing, not on a scheduler
if (!$quiet_mode && empty ($mode) && empty ($action)) {
    require ('maint.php');
}

?>

However, I now get $send errors where I previously did not on one of my boards. I am wondering if you could help me spot the mistake?

Thanks

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB