News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Migrating from an ancient kunena forum

Started by dtyson, February 14, 2025, 02:13:47 PM

Previous topic - Next topic

dtyson

I have been tasked to migrate a busy (500+ users) forum based on an ancient version of Joomla and an equally ancient version of Kunena. I did have a look at the conversion tool - but it didn't work and my knowledge of php is somewhat lacking. I make up by being fairly experienced in hacking databases...

I set up SMF 2.1.4 with a suitable prefix XXX and managed to load the user data into XXX_members and XXX_themes. I also copied all the avatars into custom_avatar. I couldn't copy the hashed password over as the formats are different and so generated dummy passwd and password_salt values. Users have successfully used the 'forgotten password' and everything is OK so far.

I am just starting to look at extracting and reformatting the huge number of posts which need to be kept as they have a lot of useful historical info and just wanted to check a few things out:

I preserved the users #posts value from the old system, but decided it would be better if this was regenerated once I had pulled a few posts over. I have created (using the forum, rather a db load) a few test posts and I tried the forum tool to recount forum totals hoping it would clear the counts to (the mainly zero) values. I didn't seem to work. Should this work?

Regarding attachments, the code seems to generate a hash from an md5 of the file and time and then rehashes this with sha1. I guess this is to generate a unique value - so its not really a hash of the file contents. Am I correct?

Are there any gotch's to be worried about? The category/board/topics/messages seem a lot simpler than the convoluted kunena DB tables and so if I can extract the data then I think I should be able to write sensible SMF DB entries...

Cheers,
Dave

dtyson

Just to follow up on this, I found a smf package to fix up the post count but it wouldn't install on 2.1.4 despite saying it supported it. However a quick look at the sql code shows how to fix it quite easily.

I have managed to copy a complete thread from Kunena into SMF, updating the messages, topics and board databases. Everything seems to work OK except the board which has been updated is marked as having new posts and the topic is also marked as new - this is despite the dates of the posts being 12 years ago.

I was wondering if it was possible to reset the markers, either by admin commands or tweaking database tables. I haven't found where the 'new' elements are flagged, so maybe someone familiar with the code can give a hint.

I am quite pleased is has been fairly straightforward to pull the stuff into SMF - however this is just one thread and I have over 6000 left.

Dave

dtyson

Just a final note. I have managed to complete the move from Kunena to SMF. All the users/posts/avatars/attachments have copied across OK and I have had a few 'guinea pig' users check it out.

Everything works fine under postgres 16.3 - the test server runs NetBSD 10, but for production I guess I will be forced to use Linux :-(

I did most of the conversion by selecting the appropriate fields from the various Joomla/kunena tables (joining where necessary) and used some hacked together C code to generate files to update the SMF tables and copy across the attachments/avatars with the right filenames.

Once I got my head round the way SMF worked, the task wasn't too bad. Not sure I can really be bothered to learn PHP yet!


A big thank you to the developers and support staff!

Dave

Advertisement: