×
Kunena 5.1.6.1 Released - Security Release (09 Nov 2018)

The Kunena team has announce the arrival of Kunena 5.1.6 [K 5.1.6] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1. This is a Security release.

K5.1.6.1 is a install update.

× This is for users to help other users, to discuss topics that are related to forum administration in general or problems in running Joomla. This is not the place to ask for Joomla support. If you want assistance with Joomla please ask at forum.joomla.org

Solved Kunena Importer from MD-PRO

More
6 years 7 months ago - 6 years 7 months ago #1 by dariocdj
Hello, i'm Dario from www.palermoanimali.it
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
Last edit: 6 years 7 months ago by dariocdj. Reason: missing code

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #2 by dariocdj
Excuse me, when I open a new thread, the number of thread is stored only in kunena_messages ? Why after that i try to change a thread number thread disappear from category ? This is my problem, if i import lots of thread i can see just some title thread and no message inside....
UP pleaseeee !

Dario

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #3 by dariocdj
C'mon please someone help me ! It's for an animal association, no money !
Thanks
Dario

Please Log in or Create an account to join the conversation.

  • sozzled
  • Visitor
6 years 6 months ago - 6 years 6 months ago #4 by sozzled
Replied by sozzled on topic Kunena Importer from MD-PRO
We often see requests like these, from people who were using a once-upon-a-time forum solution that they're no longer happy with (or one that's no longer an option for them to use) that they want others to help them but they're unable to pay for professional web development services to fulfil their needs. I suggest that you read I want to migrate my forum to Kunena ... which discusses the whole issue of what people need to think about when they have a forum somewhere and they decide that they want to use Kunena (or anything else, for that matter).
Last edit: 6 years 6 months ago by sozzled.

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #5 by dariocdj
Yes i know it is normal !
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.

More
6 years 6 months ago - 6 years 6 months ago #6 by Matias
Replied by Matias on topic Kunena Importer from MD-PRO
You cannot just create categories, you need to migrate those too to keep the mapping right. Otherwise messages will become orphaned.

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!
Last edit: 6 years 6 months ago by Matias.
The following user(s) said Thank You: dariocdj

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #7 by dariocdj
Ok all done it... very difficult but done !!!
Thanks all!

Dario

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #8 by Matias
Replied by Matias on topic Kunena Importer from MD-PRO
Good that you got it solved. I hope that everything went fine, because of it's so easy to "corrupt" data.

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to add attachements.
  • Not Allowed: to edit your message.
Time to create page: 0.092 seconds