Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Import from SMF db?  (Read 1966 times)

3nd3r

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
    • http://www.pajareo.com
Import from SMF db?
« on: August 16, 2007, 10:18:22 am »

Hi guys!

I've recently discover sNews (not installed yet, but early I will...) and I think it's fantasticly light and simple blog tool!

But I'm going to tell you my suggestion:

You can see in my webpage that I have a SMF Forum with the appaerance of a blog. The thing is that I started the web as a forum, but by the time was passing by, I've become the only poster (just like a blog).

So, I'm looking for a blog system, but I need to dump posts and comments database to the new system.

I already tried with WordPress, but the dump is really horrible, slow and annoying.

So, is there or will be a way to import SMF database into sNews one?

Thanks in advance for your time.
Logged
If it's difficult you can get it
If it's impossible you can try

Estamos de pajareo. Para estar informado el primero, visita pajareo! : http://www.pajareo.com

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Import from SMF db?
« Reply #1 on: August 16, 2007, 02:14:12 pm »

Welcome 3nd3r. I would say no at this point in time. No database conversion scripts have been written to convert data from another CMS.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

3nd3r

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
    • http://www.pajareo.com
Import from SMF db?
« Reply #2 on: August 16, 2007, 02:30:06 pm »

Ok, I see...
Maybe it wiil be a couple of SQL sentences somebody could try... :/

I would do it, but I'm not an SQL expert. So, I'll wait and search for a 'how to'.

Thanks for your answer
Logged
If it's difficult you can get it
If it's impossible you can try

Estamos de pajareo. Para estar informado el primero, visita pajareo! : http://www.pajareo.com

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Import from SMF db?
« Reply #3 on: August 16, 2007, 03:44:11 pm »

Quote from: 3nd3r
Ok, I see...
Maybe it wiil be a couple of SQL sentences somebody could try... :/
It is not a simple task. The data required to fill in all the fields in the sNews articles database table is structured and assigned using values that are different from those used in the database tables used by the bb system. As an example... a phpBB forums system stores the data in more than one table... post data in the bbposts table... and posted text in the bbposts_text table... and so on. In this case, the conversion script would need to taked INSERT INTO data from several phpBB tables... extract the data required to create new INSERT INTO strings for the sNews articles table... and assemble that data so that the strings have all of the right information in them... so that you can simply import the file to fill in the table.

Perhaps the best way to learn more about creating conversion scripts would be to visit the SMF website and download an existing conversion script to see how it is structured, how it works. Then create your own using it as a reference.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Import from SMF db?
« Reply #4 on: August 16, 2007, 04:28:47 pm »

Quote from: bakercad
I'm assuming that someone would have an understanding of how the database tables are constructed and how to move the info from one db to another.  IMO, it would be pretty easy to do, but tedious to prepare the code....not impossible by any means.
Exactly. I'd never really looked at auto-conversion scripts for database conversion before. Out of interest... I just downloaded the SMF converter scripts to convert XOOPS data to go into an SMF database. All of their converter scripts have 2 files:
- convert.php - does the work and contains just over 2,000 lines of code,
- xoops_to_smf.sql - relatively short at 165 lines of code, it selects the data from the XOOPS tables and truncates it to the go into the SMF tables.

After looking this over... I would have no idea how to create a script to auto-convert from SMF to sNews, and I have no interest in going there... far too time consuming for me. But, you could manually structure your own INSERT INTO strings for all your articles in a new .sql file and dump them into the articles table once you have them all done. As bakercad notes... doing this maually would be tedious not not impossible.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

3nd3r

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
    • http://www.pajareo.com
Import from SMF db?
« Reply #5 on: August 16, 2007, 08:16:04 pm »

Hey guys, thank you very much for your time.

I will look for someone who can do it or explain me how to do it for myself, as my knowledge of SQL programming is medium-low. As I can see my SMF db has 57 tables (original install SMF creates 41) ... And I see in the installation readme.html that sNews has only 4 !!

My god, what a lighter CMS... I want it! sigh...  :rolleyes:
Logged
If it's difficult you can get it
If it's impossible you can try

Estamos de pajareo. Para estar informado el primero, visita pajareo! : http://www.pajareo.com