Import function from Jambook

Micha
Phoca Member
Phoca Member
Posts: 26
Joined: 17 Oct 2008, 02:43
Location: Netherlands

Import function from Jambook

Post by Micha »

Hi Jan,

Import entries from other guestbooks wood be great.
It kost me nou 3 hr and it's not finished.
Struggle with the conversion.

Micha
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47891
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Import function from Jambook

Post by Jan »

Hi, the problem is I cannot find time for e.g. doing new features on my extensions, answering all the posts, writing manuals so I suspect that I don't find time for learning some other component's framework and do some import function... but maybe some user here has made such addon. If yes then it will be great if someone can paste it here...

Jan
If you find Phoca extensions useful, please support the project
gerlag
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 01 Feb 2009, 11:56
Location: Netherlands
Contact:

Re: Import function from Jambook

Post by gerlag »

Importing can be done using CSV files. It's rather straighforward. Recently I imported a jax guestbook using CSV-file as intermediate medium.
I used PHPMyAdmin for exporting/importing the data. Almost all ISP's offer PHPMyAdmin to manage the databases.
Procedure:

  • get yourself the content of the old guestbook as (kind of) CSV file (delimited text file). In my case, the old guestbook directly wrote into a CSV file, but you can export into CSV form any database table using PHPMyAdmin
  • study the columns
  • look into the table jos_phocaguestbook_items, using PHPyAdion, and study the table lay out
  • now you have to alter the CSV file of the old guestbook in order to fit the phocaguestbook_items table. I imported the CSV file in excel (yes..) and replaced/combined and reformatted date notation in colums to fit. Had to add some extra colums too... I assume that the OpenOffice spread sheet could do the job even better.
  • at the end you can import the resulting CSV file into the table jos_phocaguestbook_items.
It is some work, of course, it took me a couple of hours to sort everything out from scratch.

Result can be seen at http://www.vkij.nl/gastenboek.html
Cheers, Gerlag
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47891
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Import function from Jambook

Post by Jan »

Great, thank you for this information.

Jan
If you find Phoca extensions useful, please support the project
Post Reply