Menu

Introduction how to use my genealogical scripts

20 Juni 2011 - Genealogy, PHP

On a special plea I wrote an introduction how to use my genealogical scripts. The wish was to write it in german. this was done two days ago, but I don’t want to deprived of this to you also in english.Firstly you need a webspace with PHP and minimum one MySQL database. This database normally have a admin interface called phpMyAdmin.

In this interface you have to create a database (a so called schema). Afterwards you can insert the SQL code from my previous post to create the empty tables. This can be done on the „SQL“ tab. This empty tables are needed for the script for filling all information in the database.

Now you must open the gedcomToDatabase2.php script with a text editor for editing following lines:

$path     = „path/to/gedcom/file/“; # path to the gedcom file (in the case descriped afterwards it is „./“)
$filename = „gedcomfile.ged“;       # GEDCOM file name
$hostport = „localhost“;            # host of database, information from hoster)
$user     = „root“;                 # database user name
$password = „“;                     # database password
$database = „stammbaum“;            # database schema name (like inserted in phpMyAdmin interface)

Now you have to upload the script gedcomToDatabase2.php together with the gedcom file on your webspace. If you do not have much knowing about web development, it will be the best to upload both in the root directory of your webspace. Now you can call the script with your webbrowser. (http://www.mywebsite.com/gedcomToDatabase2.php)

After this step the database is filled with all data from your gedcom file and you can, if you want, delete the gedcom file and the script gedcomToDatabase2.php again from your webspace.

Now you have to unpack the zipfile familytree.zip and open the php script dbConnect.php in a text editor. Here you have to insert the same database connection data like described before for the previous script. After saving this information you can upload everything which was in the zip file on your webspace.

Now the family tree starts working. You can call it with http://www.mywebsite.com/stammbaum.php to view the first result.

If you want to insert the tree in your own website design you can do this by editing the header.php and footer.php. But for this is a minimum basic knowledge in web programming necessary.

deutsche version: http://blog.luventas-webdesign.de/?p=137

Print Friendly, PDF & Email

3 thoughts on “Introduction how to use my genealogical scripts

Andrew

Hi
love your work

After doing my tree for quite a number of years, I’m finding more and more info out there, and wanting to add to my data. QUite a bit of it can be downloaded as GEDCOM’s, so I’ve found your site

I’ve loaded a sample GEDCOM into a datanase via your script which worked great.

But the files in the familytree.zip appear to be in German… can you provide an English version

Cheers
Andrew
Sydney, Australia

Reply
Andrew

oops
I should read some code before testing… thanks 8^D

All done. Now to make some changes, such as if an ancestor’s box is empty, hide it

Reply
Arnold

Hello Carsten,
just found your site and this code. My main interest was mainly in seeing how the GEDCOM relates to a Mysql DB, so I don’t think that the code will be used on any website, but it is still very interesting and useful for myself mostly for learning more about this aspect of GEDCOM.

In reading and parsing one of my .GED files, I did find a minor issue when some NAME records which do not follow the expected format, such as the name record sub-record for REPO
My patch at line 141
if ( count($tmp ) > 1 ) {
$surn = $tmp[1];

Reply

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.