Syncing forum counter(s) to actual status

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Get Involved
Locked
GibsonLP
Registered User
Posts: 65
Joined: Wed Aug 17, 2005 8:06 am

Syncing forum counter(s) to actual status

Post by GibsonLP » Sat Jan 22, 2011 8:31 pm

Hello,
I have managed to convert the majority of the data off my friend's forum to phpbb3, I populated the users, the topics and the posts tables with information from the old forum.
I am currently facing 2 issues:

1. Forums posts counters are zero
2. (probably due to the same reason) - Each forum shows only the first page of topics as if there are no more pages of topics to show.

I managed to reset the users' posts count by updating their user_posts to '' and synchronizing the posts count via ACP, I could not fix the forums counter though no matter what I did (tried all 3 resynchronizes on the ACP as well as purging the cache).
Any suggestions?

Thanks.

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Syncing forum counter(s) to actual status

Post by D¡cky » Sat Jan 22, 2011 8:50 pm

To resynchronize the forums, go to Manage Forums and click the orange double-arrow.
Have you hugged someone today?

GibsonLP
Registered User
Posts: 65
Joined: Wed Aug 17, 2005 8:06 am

Re: Syncing forum counter(s) to actual status

Post by GibsonLP » Sat Jan 22, 2011 9:25 pm

Oooops :)
You are right, completely forgot about that!

Last question (hopefully) -
The old forum stored the password in plain text format (yeah, I know... I didn't write it...)
Is there an easy way to hash them? I know it's not just an md5 as there a salt involved as well, right?

Thanks again.

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Syncing forum counter(s) to actual status

Post by D¡cky » Sat Jan 22, 2011 11:09 pm

Apply phpbb_hash to the password. So ... like

Code: Select all

$password = 'plain_text_password';
$forum_password = phpbb_hash($password);
Have you hugged someone today?

GibsonLP
Registered User
Posts: 65
Joined: Wed Aug 17, 2005 8:06 am

Re: Syncing forum counter(s) to actual status

Post by GibsonLP » Sun Jan 23, 2011 5:06 am

Thanks but I was having a hard time including phpBB's functions file, is there an easy way to include it?
I tried:

Code: Select all

define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '/var/www/phpBB3/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
//include($phpbb_root_path . 'includes/functions.' . $phpEx);
I commented out functions.php as it complained about redeclaration in that file so I figured common is including it already, I do get an error with that though:
PHP Fatal error: Call to a member function sql_escape() on a non-object in /var/www/phpBB3/includes/functions.php on line 147

I hoped that someone already "exported" the function in a manner that does not require to include the entire project, but if not - I would be very glad on assistance with including phpbb's functions into my small piece of code in order to use internal phpbb3 functions.

Thanks.

GibsonLP
Registered User
Posts: 65
Joined: Wed Aug 17, 2005 8:06 am

Re: Syncing forum counter(s) to actual status

Post by GibsonLP » Sun Jan 23, 2011 5:13 am

Forgot to start a session...
Now it works fine, Thanks!

Locked

Return to “[3.0.x] Convertors”