How can I convert (move) individual HTML webpages in bulk into Simple machines forum?
What I have is just the 1000s of html pages which consist of question and answers. Now how can I move them into Simple machines forum.
This is how my question/answer html pages looks like:- drive.google.com/file/d/0B4RFn3PmjNy9YTNkbE5mejBfV1U/view?usp=sharing
So now what I have to do exactly? I just want to move the questions and answers. Don't want user login details or anything else. I have thousands of pages like this.
There is no good/easy way to do that...
SMF is a database driven forum.
If you had another database, we could instruct you on how to put it into the messages table... however, taking HTML pages into a database is difficult, at best.
Not sure about this but that's the only thing comes to my mind. You need to write a custom script which reads files and inserts them into SMF db with fixed time/board/user.
http://www.terjemar.net/php/2011/09/converting-static-pages-to-dynamic-pages-using-php-and-mysql-part-1/ (and other 4 parts may help you).
Quote from: Antes on August 08, 2016, 05:41:13 PM
Not sure about this but that's the only thing comes to my mind. You need to write a custom script which reads files and inserts them into SMF db with fixed time/board/user.
http://www.terjemar.net/php/2011/09/converting-static-pages-to-dynamic-pages-using-php-and-mysql-part-1/ (and other 4 parts may help you).
The question title is in between the tags <title> and </title> (also present in between <h1> and </h1> tags).
The question description is in between the <div id="summaryDescription">
All the answer descriptions are in between div classes <div class="postContent">
Only these above 3 are I needed [I don't want the user informations, it can be null or just from the account named anonymous).
Now how can I create the php script (I tried reading this simplehtmldom.sourceforge.net/manual.htm but I can't understand any). How can I make an sql query out for all those files? Then how to send them to server via shell?
Please guide me. Thanks in advance.
This is going to require a bit of knowledge and know how to do. Your best bet may be making a post in the Help Wanted section either free or paid to see if anyone is taking on this task.
Well I can only tell you what you need in theorical perspective you need some preg_ stuff to find what you want.