How can I convert (move) individual HTML webpages in bulk into Simple machines?

Started by MKDan, August 08, 2016, 05:56:06 AM

Previous topic - Next topic

MKDan

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:- hxxp:drive.google.com/file/d/0B4RFn3PmjNy9YTNkbE5mejBfV1U/view?usp=sharing [nonactive]


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.

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Antes

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).

MKDan

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.

hxxp:www.terjemar.net/php/2011/09/converting-static-pages-to-dynamic-pages-using-php-and-mysql-part-1/ [nonactive] (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 hxxp:simplehtmldom.sourceforge.net/manual.htm [nonactive] 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.

Colin

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.

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Antes

Well I can only tell you what you need in theorical perspective you need some preg_ stuff to find what you want.

Advertisement: