I have been playing with your new IIP on a 5.5.1 board, and ran into a problem with the randprofilepal.php.
In the 5.5.1 database, U_Number is generated with auto_increment, and when you delete a user, that number is not re-used.
What happens then is this: Say I have user numbers 1, 2, 3, 4. I delete user 4. Then someone else registers, and they are assigned User ID 5. Now I have Numbers: 1, 2, 3, 5.
randprofilepal.php is looking at $palshowregs to get the number of users registered. In the above example it would return a value of "4". Now there is no user ID for the number 4. That means that 25% of the time, randprofilepal.php will fail, and simply not be displayed. Also, user ID "5" will never be displayed.
I believe I have fixed the problem by letting MySQL perform the rand function. There may be a more efficient way to do this, but this worked for me.
I changed the following syntax in randprofilepal.php:
code: $query = " SELECT U_Number FROM w3t_Users ORDER BY RAND() LIMIT 1 "; $sth = $dbh -> do_query($query); list ($profID_q) = $dbh -> fetch_array($sth); $dbh -> finish_sth($sth);
Anyone see any problems with that? It adds another query on the database, but it is the only way I can see to get around this particular bug.
I dont know if this affects board running 6.0 since that is what randprofilepal.php was written for anyway . But if you are thinking of making a backwards-compatible version of IIP, that is one bit of code that you might need to look at.
Thanks again for the great mod Dave! IIP really helped to improve user participation on my board.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.