- Posts: 5
- Thank you received: 0
- Forum
- Community self help
- Kunena and other Joomla extensions
- Miscellaneous, off-topic and general Joomla
- Kunena Importer from MD-PRO
Kunena 5.2.1 Addons released (Yesterday)
The Kunena team has announce the arrival of Addons (modules and plugins made by Kunena team) in version 5.2.1 which is now available for download. This version addresses most of the issues that were discovered since the release of Kunena 5.2.3. Download the Kunena Addons
Solved Kunena Importer from MD-PRO
I'm migrating from md-pro (a postnuke based cms) to joomla and i've seen that in kunenaimporter there is PNPhpBB2 as option but just for migrating users.
I've seen that users are automatically taken from joomla users (that i've migrated), i've recreated categories, and now i've made a script to import messages, but something goes wrong....
Obviously i've worked on empty table.
Message appears but when i try to click a message it gives me Message ID not found, and when i try to go to page 2 it give's me "no message on this forum"
Please can someone help me ? Here is the file....
<?
include ("adjuststring.php");
//Cdj rules
// Should not need changed. This is the mysql host
$dbhost="localhost";
// Enter your Database name here
$db="XXX";
// Enter your Database username here
$dbuser="XXX";
// Enter your Database password here
$dbpass="XXX";
// The Test variable allows you to run the script without inserting into the database.
$Test="False";
// Set to true if you want to copy Topics from PostNuke to Categories in Joomla.
$Category="True";
// Set to true if you want to copy Stories from PostNuke to Content in Joomla.
$Story="False";
// Nothing below here should need changed.
// DB Connection Stuff
$sqlConnect=mysql_pconnect($dbhost,$dbuser,$dbpass);
if(!$sqlConnect):
echo "db connection error";
die();
else:
$sqlConnect=mysql_select_db($db);
if(!$sqlConnect):
echo "db selection error:<BR> unable to select_db()";
die();
endif;
endif;
// Starts Here
$postssql=mysql_query("select * from md_phpbb_posts");
while($row=mysql_fetch_array($postssql)):
$id=$row['post_id'];
$thread=$row['topic_id'];
$cat_id=$row['forum_id'];
$userid=$row['poster_id'];
//ricavarsi nome ed email !!!
$anagrafica=mysql_query("select * from joomla_users where id=$userid");
while($row2=mysql_fetch_array($anagrafica)):
$nome=$row2['username'];
$email=$row2['email'];
endwhile;
// echo $nome." ";
// echo $email."<br>";
echo "<br>";
// $posterip=$row['poster_ip'];
$time=$row['post_time'];
// Add Slashes to invalid database characters
addslashes($thread);
if ($cat_id==1):
$catcorrispondente='13' ;
// echo "ciao";
endif;
if ($cat_id==2):
$catcorrispondente = 14 ;
endif;
if ($cat_id==3):
$catcorrispondente = 15 ;
endif;
if ($cat_id==4):
$catcorrispondente = 16 ;
endif;
if ($cat_id==5):
$catcorrispondente = 17 ;
endif;
if ($cat_id==6):
$catcorrispondente = 18 ;
endif;
echo "La cat corrispondente : ".$catcorrispondente ;
//esci i subjects
$subjectsql=mysql_query("select * from md_phpbb_posts_text where post_id=$id");
while($row23=mysql_fetch_array($subjectsql)):
$subject=$row23['post_subject'];
addslashes($subject);
$newsubject = str_replace("'","\'",$subject);
endwhile;
$CdjQuery = "insert into joomla_kunena_messages (id, parent, thread, catid, name,userid, email, time,subject) values ('$id','0','$thread','$catcorrispondente','$nome','$userid','$email','$time','$newsubject');";
// echo ($CdjQuery);
mysql_query ("$CdjQuery");
endwhile;
$posttextssql=mysql_query("select * from md_phpbb_posts_text");
while($row3=mysql_fetch_array($posttextssql)):
$mesid=$row3['post_id'];
$message=$row3['post_text'];
// Add Slashes to invalid database characters
//$catname = AdjustAlphaString ($catname) ;
//$cattext = AdjustAlphaString ($cattext) ;
$newmessage = str_replace("'","\'",$message);
$CdjQuery3 = "insert into joomla_kunena_messages_text (mesid, message) values ('$mesid','$newmessage');";
echo "<br>Adesso i messaggi<br>";
// echo ($CdjQuery3);
mysql_query ("$CdjQuery3");
endwhile;
echo "<BR><B>Vedi se ci sono tutte<BR>";
?><BR>
Thanks
Dario
Please Log in or Create an account to join the conversation.
UP pleaseeee !
Dario
Please Log in or Create an account to join the conversation.
Thanks
Dario
Please Log in or Create an account to join the conversation.
Blue Eagle vs. Crypsis reference guide
Read my blog and

Please Log in or Create an account to join the conversation.
If we arrange some money to pay for this conversion, how much it cost this migration ? Only for thread and messages ...
Thanks
Dario
Please Log in or Create an account to join the conversation.
In your migration you have also another issue: topic_id from the old forum must probably be mapped to first message id.
So here's how Kunena 1.7 messages table works:
id = message id
parent = parent message id (0 for topic)
thread = topic id (points to message that has parent=0)
catid = category id (also sections are in the same table)
name = username
Hope that it helps!
Please Log in or Create an account to join the conversation.
Thanks all!
Dario
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Forum Access
- Not Allowed: to create new topic.
- Not Allowed: to reply.
- Not Allowed: to edit your message.
- Forum
- Community self help
- Kunena and other Joomla extensions
- Miscellaneous, off-topic and general Joomla
- Kunena Importer from MD-PRO