1

Topic: Trying to transfer to punbb

Hi, I am in the process of moving my custom built forum to punbb, the transfer works except for a couple of small bugs.

Firstly when transferring the old topics and posts how do I update the forum topic and posts counts? Is there a built in method or do I simply run a COUNT() on the tables for each forum?

Secondly I wanted to import the topics and posts, then force the members to transfer, primarily as a way to slim down my users table. I.e. non active users wouldn't make the move so would in turn delete themselves!

However this doesn't work as I see each post is inner joined on the user, therefore I would have to make the user id 0 or whatever the value punbb uses. Is there anyway round this? Should I simply import all the users then use the punbb tools to remove the old users? - If so what's the best bulk way to do this?

Thanks
Simon

Re: Trying to transfer to punbb

SiCo wrote:

Firstly when transferring the old topics and posts how do I update the forum topic and posts counts? Is there a built in method or do I simply run a COUNT() on the tables for each forum?

An example of how to update a forum topic and posts count can be found in the function "sync_forum" (<FORUM_ROOT>/include/functions.php lines 2280-2331)

SiCo wrote:

Should I simply import all the users then use the punbb tools to remove the old users?

Yes, it will work, I think. You can remove user with usage of forum function "delete_user" (<FORUM_ROOT>/include/functions.php lines 1709-1819)

3

Re: Trying to transfer to punbb

Slavok wrote:

An example of how to update a forum topic and posts count can be found in the function "sync_forum" (<FORUM_ROOT>/include/functions.php lines 2280-2331)

Excellent, out of interest is there an admin function to call this or is it just used when topics are posted etc.? It would be quite simple to make a plugin to run this though so it's not an issue.