*Guess who's back* hehe..
I've been trying to look through the two MODs, pointing out anything which could be improved (in regards to the phpBB coding standards).
sj26:- (I couldn't get to your site so this from memory of the previous version). Really well thought out, coded to a high standard. One little thing: foreach() is a PHP4 construct. phpBB 2.0.x was intended to run on both PHP 3 and 4 and therefore part of your code would fail under PHP 3. Instead try using:
Code: Select all
while( list($var, $param) = @each($trim_var_list) )
{
if ( !empty($HTTP_POST_VARS[$param]) )
{
$$var = trim($HTTP_POST_VARS[$param]);
}
}
Thats all I can remember from your mod, if I had a copy, there would be a lot more.
Wooly Spud: Great ideas, bursting with features, very simple installation. Coding however doesn't do this MOD any favours. The most striking thing is the non-use of phpBB DBAL (Database Abstraction Layer) and the use of mysql_query, etc. If the MOD is only intended to work with one DB system, try using:
Code: Select all
switch(SQL_LAYER)
{
case 'mysql':
case 'mysql4'
$sql = 'Select....'
$db->sql_query($sql);
etc.
break;
}
There is some good code in there, it's just some of it need to be refined. Also make sure any GET/POST requests are checked (numbers go through the intval() function, etc.).
This is all just my opinion on both MODs as they stand from a coding point of view. Feel free to ignore.
