Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Importing legacy content


Reply

4 Posts   1300 Views

Avatar
Henk Poley

5 October 2007 at 2:29am (Last edited: 5 October 2007 2:30am), 30 Posts

I'm planning on converting [url=http://waterscouting.com/]a site[/url] to SilverStripe. The site currently uses a custom made BBCode. Converting the content to HTML that can be edited by TinyMCE shouldn't be that much of a problem. But how do I get it into SilverStripe?

I know some PHP, I know SQL. So it's not perse a problem. But is there any recommended way of adding new content so the database remains in a consistent state? Such as, adding logins for the content authors, some form of a consistent menu tree to start editing on, adding connected files and images to the files section of the CMS.

There is sapphire/tools/importer.php but doesn't seem to contain much atm. I also read some [url=http://www.silverstripe.com/general-discussion/flat/1186]advice to "create SiteTree-objects"[/url]. Even in saphire/tests/SiteTreeTest.php they don't use SiteTree directly. So how do you do this?

Avatar
Henk Poley

5 October 2007 at 4:12am 30 Posts

sapphire/tests/SapphireTest.php seems to touch the DB directly ('not' a unit test) and contains a function loadFixture() that loads page content from a YAML file. I'll see if I understand it enough to convert that to an importer.

Some pointer to documentation would still be helpfull though.

Avatar
Willr

5 October 2007 at 9:37am (Last edited: 5 October 2007 9:47am), Forum Moderator, 5511 Posts

Brian, our COO has converted his [url=http://unbounded.org/]wicked site[/url] from typo3? to silverstripe and that managed to work.. Im not all to sure how he did it but he might be able to provide his insights. But it can be done! :D

Avatar
Ingo

6 October 2007 at 1:59am Forum Moderator, 801 Posts

i think brian used [url=http://typosphere.org/]typo[/url] (a rails blogging system), and wrote a small converter. in case anybody wants to start a structured effort for blog-converters, have a look at the way mephisto (another blogging system) does this: http://trac.hasno.info/mephisto/browser/trunk/vendor/plugins/mephisto_converters