Hi everybody,
I am having a problem integrating with a Phpbb board modded with Categories Hierarchy.
Basically everything works apart that by inserting a new user through the Joomla/CB registration procedure with Phpbbconnector plugin the cache that stores the "newest registered user" and "number of registsred users" stats is not updated and it stays at the last registered user through the normal phpbb registration procedure (which is to be disactivated once the bridge is completed).
I have found where CH modifies the registration process
In usercp_register.php around line 528
[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]
And again around line 611:
[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]
Does anyone know what should I add to
phpbbconnector.php in order to have it perform this cache update in phpbb everytime I register a new user to the forum through teh Joomla CB registraton? (
comprofiler.php).
If you could make it work it would be of enourmous importance for me and for all those people that use this popoular (essential I would say) Phpbb modification.
I attach the whole
usercpd_register.php file so you can check it all.
Thanx!
Attachment ceb7b70ac9cbaee6cc144dfba78cf804. not found
Post edited by: Yossarian, at: 2006/04/16 15:40
Post edited by: Yossarian, at: 2006/04/16 15:41