OK, I identified the reson why it is not updating the "newest registered user" information at the bottom of the board.
It has to do with the categories hierarchy mod I have installed on phpbb to get the subforums feature.
This mod modifies the registration procedure and adds a "update last user" function.
I am puzzled... I don't understand where this information is stored.
I tried to integrate the strings of code in phpbbconncector.php, but failed miserably and still encounter the problem... when I register a new user from joomla it is perfectly added to phpbb's DB but the numer of users and the newest registered are not showed on the board.
I will post here the two phpbb files (one at a time) I believe are involved.
You will easily find the code I am referring to because it is commented, but I will post it here anyways so that everybody can see it.
Hoping that Greg's got some time to look into this mess.
Thanx!
Attachment usercp_register.php.zip not found
In usercp_register.php
[code:1]//-- mod : categories hierarchy
//-- add
// if name changed, update some data
if ( !empty($username_sql) )
{
$fields = array(
'forum_last_username' => stripslashes($username),
);
$db->sql_statement($fields);
// update forums last poster
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET ' . $db->sql_update . '
WHERE forum_last_poster = ' . intval($user_id);
$db->sql_query($sql, false, __LINE__, __FILE__);
// update last user
if ( ($user_id == $config->data) || empty($config->data) )
{
$config->set('stat_last_user', $user_id);
$config->set('stat_last_username', stripslashes($username));
}
// recache moderators
include_once($config->url('includes/class_forums'));
$moderators = new moderators();
$moderators->set_users_status();
$moderators->read(true);
}
//-- fin mod : categories hierarchy
[/code:1]
[code:1]//-- mod : categories hierarchy
//-- add
// update last user
$config->set('stat_last_user', $user_id);
$config->set('stat_last_username', stripslashes($username));
$sql = 'SELECT COUNT(user_id) AS total_users
FROM ' . USERS_TABLE . '
WHERE user_id <> ' . ANONYMOUS;
$result = $db->sql_query($sql, false, __LINE__, __FILE__);
$row = $db->sql_fetchrow($result);
$config->set('stat_total_users', intval($row) + 1);
//-- fin mod : categories hierarchy
[/code:1]
Post edited by: Yossarian, at: 2006/04/14 17:53
Post edited by: Yossarian, at: 2006/04/14 17:55