Advertisement:

Author Topic: [SMF Converter] PHP-Nuke Stories 7.9  (Read 16354 times)

Offline SleePy

  • Site Team
  • SMF Master
  • *
  • Posts: 28,959
  • Gender: Male
  • Thats his happy face.
    • @jdarwood on Twitter
    • SleePy Code - My personal site
[SMF Converter] PHP-Nuke Stories 7.9
« on: June 19, 2008, 08:15:52 PM »
Software: PHP-Nuke
Version: 7.9

This is the official support topic for PHP-Nuke Stories converter.  Use this topic to ask for support for this converter.

Note: This converter assumes you have a clean version of SMF and had previously just used the PHP-Nuke converter. This converter does not remove anything it converts, so running it multiple times may result in duplicate boards and messages.
This was tested on PHP-Nuke 7.9, but should in theory work on other versions of PHP-Nuke if the database changes have not been to great.

Changelog

How to convert
Use this convert.php with the .sql file attached in this topic.
« Last Edit: October 25, 2008, 09:10:04 PM by SleePy »
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub
G+

Offline N0ctrnl

  • Newbie
  • *
  • Posts: 9
Re: [SMF Converter] PHP-Nuke Stories 7.9
« Reply #1 on: July 02, 2008, 12:44:31 AM »
Hmm, this bombs out trying to actually convert the story.

Code: [Select]
Creating the new category... Successful.
Getting our Max Board, Topic and Message IDs ... Successful.
Creating the default Board ... Successful.
Converting Story Categories into Boards ...
Notice: Undefined index: story_boards in /home/me/public_html/nuke/phpnuke_stories_to_smf.php on line 189
Successful.
Converting Stories as posts/messages... Unsuccessful!
This query:

    INSERT IGNORE INTO `host_smf2`.smf_messages
    (ID_TOPIC, ID_BOARD, posterTime, subject, posterName, ID_MEMBER, posterEmail, posterIP, body)
    VALUES (0, , 1082527200,'Testing', 'admin', '2', 'me@myhost.org', '0', '<body text=\"#000000\" bgcolor=\"#ffffff\" link=\"#F5F5DC\" vlink=\"#F5F5DC\" alink=\"#F5F5DC\">
    <p align=\"center\"><font face=\"Comic Sans MS\">Test!</font></p>
    <p align=\"center\"><font face=\"Comic Sans MS\">Blah</font></p>
    <br /><center>
    <img src=\"images/user/pic3a.gif\"></p>
    <img src=\"images/user/pic5a.gif\"></p>
    <img src=\"images/user/pic7a.gif\"></p>
    <img src=\"images/user/pic10a.gif\"></p>
    <img src=\"images/user/pic13a.gif\"></p>
    <img src=\"images/user/pic14a.gif\"></p>
    <img src=\"images/user/pic15a.gif\"></p>
    <img src=\"images/user/pic11a.gif\"></p>
    <center>
    </body> ');

Caused the error:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1082527200,'Testing', 'admin', '2', 'me@myhost.org', '0', '<body te' at line 3

This have anything to do with the html tags in the story?

Offline SleePy

  • Site Team
  • SMF Master
  • *
  • Posts: 28,959
  • Gender: Male
  • Thats his happy face.
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] PHP-Nuke Stories 7.9
« Reply #2 on: July 02, 2008, 01:18:09 PM »
No, It is saying the ID_BOARD is empty for some reason.
 
How much of the data did it convert to the forums?
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub
G+

Offline N0ctrnl

  • Newbie
  • *
  • Posts: 9
Re: [SMF Converter] PHP-Nuke Stories 7.9
« Reply #3 on: July 02, 2008, 01:20:09 PM »
None of it.  This is the first entry in the stories table.

Just for grins, I went in and hard coded the ID_BOARD to 1 and it moved everything to the first forum without issue.  Thought that might be helpful.
« Last Edit: July 02, 2008, 01:29:21 PM by N0ctrnl »

Offline SleePy

  • Site Team
  • SMF Master
  • *
  • Posts: 28,959
  • Gender: Male
  • Thats his happy face.
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] PHP-Nuke Stories 7.9
« Reply #4 on: July 02, 2008, 01:35:13 PM »
Yea, hard coding it would work. This script trys to put things in their categories and boards respectfully
 
Are you able to send me a database dumb of your php_nuke? My email is on the team page (Its encoded there so thats why I am pointing to it).
This way when I get time I can try to run it and see where it might be possibly having this issue.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub
G+

Offline N0ctrnl

  • Newbie
  • *
  • Posts: 9
Re: [SMF Converter] PHP-Nuke Stories 7.9
« Reply #5 on: July 02, 2008, 01:39:02 PM »
Sure.  I'll make a dump of it and zip it up for you.  I'll just put it on my webserver and send you a PM.

As I said, the conversion did work when I hard coded the board ID.  Now the trick is going to be going back and editing all the stories to use bbcode for images and such.  Something I no doubt need to do anyway. :)

Thanks a ton for all your work and help.  I'm giddy that I can actually convert the stories now.

Offline SleePy

  • Site Team
  • SMF Master
  • *
  • Posts: 28,959
  • Gender: Male
  • Thats his happy face.
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] PHP-Nuke Stories 7.9
« Reply #6 on: July 02, 2008, 01:42:42 PM »
Hmm..
I didn't think I used htmlspecialchars or anything during the convesion so it should just allow the HTML straight in there.
 
Though you could also add
[nobbc][nobbc] around the message if you wanted to and it should force that our as straight HTML.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub
G+

Offline N0ctrnl

  • Newbie
  • *
  • Posts: 9
Re: [SMF Converter] PHP-Nuke Stories 7.9
« Reply #7 on: July 02, 2008, 04:42:06 PM »
For what it's worth, I went through and updated the convert script(s) to work with 2.0 beta 3.  It's not really a huge deal to do (mostly just changing names for database stuff), but if you (or anybody) want that, I'll be happy to send it.

Offline SleePy

  • Site Team
  • SMF Master
  • *
  • Posts: 28,959
  • Gender: Male
  • Thats his happy face.
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] PHP-Nuke Stories 7.9
« Reply #8 on: July 02, 2008, 05:44:20 PM »
I have a the 2.0 versions already ;)
I wrote up a quick script that changes the column names to their proper 2.0 ones and had it run through all the converter .sql files.

The part I am working on with the 2.0 converters would be the convert.php to properly support different databases such as postgresql. I theoretically have it all functional, the last part is just actually getting time to do proper testing and bug fixes :)
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub
G+

Offline N0ctrnl

  • Newbie
  • *
  • Posts: 9
Re: [SMF Converter] PHP-Nuke Stories 7.9
« Reply #9 on: July 02, 2008, 06:34:23 PM »
Well, again, just yell if you need a guinea pig.