MyBB Community Forums

Full Version: Update board stats after register
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello! 

I want to update board stats after register from another website.

For example, I have main website demo-website.com and forum on demo-website.com/forum.

I have a page demo-website.com/register.php with forms and there the user will be inserted in mybb_users table.

After that, user will be register in mybb forum. Now the problem is board stats. Member count not increasing and last member registered is not updated. Can you help me? Thanks
The function your are looking for is rebuild_stats() its contained in inc/functions_rebuild.php, you need include the global core and init for this.
Hello!

I included global.php and all libraries needed.

But now I received this

Warning [2] Illegal string offset 'type' - Line: 10 - File: inc/config.php PHP 7.1.6 (Linux)
Warning [2] Illegal string offset 'database' - Line: 11 - File: inc/config.php PHP 7.1.6 (Linux)
Warning [2] Illegal string offset 'table_prefix' - Line: 12 - File: inc/config.php PHP 7.1.6 (Linux)
Warning [2] Illegal string offset 'hostname' - Line: 14 - File: inc/config.php PHP 7.1.6 (Linux)
Warning [2] Illegal string offset 'username' - Line: 15 - File: inc/config.php PHP 7.1.6 (Linux)
Warning [2] Illegal string offset 'password' - Line: 16 - File: inc/config.php PHP 7.1.6 (Linux)
Warning [2] Illegal string offset 'encoding' - Line: 80 - File: inc/config.php PHP 7.1.6 (Linux)

And in bottom page this:

Quote:MyBB Internal Error

MyBB has experienced an internal error and cannot continue.
Error Type:MyBB Error (42)Error Message:Your board has not yet been upgraded. Please do so before attempting to browse it.
Please contact the MyBB Group for technical support.

Any help?