News:

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

Main Menu

[SMF Converter] PHP-Nuke Stories 7.9

Started by SleePy, June 19, 2008, 08:15:52 PM

Previous topic - Next topic

SleePy

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.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

N0ctrnl

Hmm, this bombs out trying to actually convert the story.


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', '[email protected]', '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', '[email protected]', '0', '<body te' at line 3


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

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

N0ctrnl

#3
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.

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

N0ctrnl

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.

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

N0ctrnl

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.

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

N0ctrnl

Well, again, just yell if you need a guinea pig.

Advertisement: