Menu

Include your family tree in your webpage, new Version

22 Juni 2011 - Genealogy, PHP

I created a new version of my php script to show your family tree on your webpage. Like the version before, I offer this script for free, because genealogy is my hobby.The script is also included in my own webpage http://www.genealogiearchiv.de where you can have a look how it looks.

To run the script you need myscript for filling the database before. It can be downloaded by this post.

In introduction how to implement the scripts, ist also written in this blog in this post.

The previous version can be seen and downloaded from this post.

Have fun with this scripts and please send me a hint, on which page you inplements it as comment in this blog post or as email.

Familytree script Version 2.0.5

Print Friendly, PDF & Email

16 thoughts on “Include your family tree in your webpage, new Version

Cijunas

Great job!
Two questions.
1. Did you experienced with large gedcom file where more than 10.000 persons?
2. How to merge your script in to WordPress system?

Reply
    luventas

    Thanks!
    I do not ttested it with such big gedcom files.
    I have no merging script to wordpress…

    Greetings
    Carsten Fröhlich

    Reply
Cijunas

Hi.
I found some mistake. If I will to look childrens of living parents and living grandparents, then I get Notice table instead of standard cell of person on the first left column of tree.

Text of notice table is here:
—————-
( ! ) Notice: Undefined variable: partarr in E:\wamp\www\luventas\stammbaum\getdata.php on line 110
Call Stack
# Time Memory Function Location
1 0.0010 670256 {main}( ) ..\stammbaum.php:0
2 0.2912 1078200 include( ‚E:\wamp\www\luventas\stammbaum\stammbaumview.php‘ ) ..\stammbaum.php:3
3 0.5148 1088880 getPartner( ) ..\stammbaumview.php:417

Living Living
————————

Reply
    luventas

    Thanks for that hint. It seems, that I do not tested the popups deep enough…
    But do it like Microsoft: The public user is the beta tester… 😉

    Greetings
    Carsten Fröhlich

    Reply
Francisco Pino

Carsten

Thanks a lot for your great work. I have loaded my family tree without problems (with a necessary character conversion for a Spanish version).
I have tested the php script version 2.05 and previous and I have a problem with the single persons in the function getparner (Files\wamp\www\stammbaum\getdata.php on line 110). Can you give me an advice to solve this issue?

Again thanks a lot

Regards

Francisco

Reply
    luventas

    Hi Francisco,

    can you send me the text of the error message you get or post the link of this family tree, if it is online?
    Possibly this person has incorrect partner data included? Then the count does not work. But without the error I cannot really help.

    ……
    103 while ($part = mysql_fetch_array($parterg)) {
    104 if($sex == „M“)
    105 {$partarr[] = $part[‚wife‘].“,“.$part[‚marr_date‘].“,“.$part[‚marr_plac‘];}
    106 elseif($sex == „F“)
    107 {$partarr[] = $part[‚husband‘].“,“.$part[‚marr_date‘].“,“.$part[‚marr_plac‘];}
    108 }
    109
    110 $integ = count($partarr);
    …..

    Reply
Claude

Good morning,

I run a website about genealogy, French Canadian genealogy to be exact and i implemented your script so my user can upload their gedcom to my site, actually they send me the gedcom and I do the upload, I ran into an issue though with a gedcom and I was wondering if you could help me out.

The gedcom was created on Ancestry.ca the world wide genealogy website and when I ran it through the script the famchild table and the family table are getting populated but not the person_st table (actually getting one name in).

That is a large gedcom with almost half a million lines to read, so I don’t know if it is to big of a file for the script or if it is the gedcom from Ancestry that is not formated properly.

Any advice would be very welcome.

Thanks

Reply
    luventas

    Hi,

    Normally GEDCOM is a standard format, but some software puts its own fields in these files.
    Maybe you can send me 2 ore 3 person data snippets from your file that I can analyse it.
    carsten.froehlich@luventas-webdesign.de

    Greetings
    Carsten Fröhlich

    Reply
      luventas

      the problem is really simple to solve…
      Your Software is writing the Individual IDs like:
      0 @P5026@ INDI
      My Software ist writing the IDs like:
      0 @I5026@ INDI

      The difference ist the P vs. I

      Here you can see, that GEDCOM is not a real standard, even if it should be…

      In the line 99 of my script is the regular expression „if(preg_match(„/0\x20\x40(I.*)\x40/“, $lines[$i], $id)) {“
      Change this to „if(preg_match(„/0\x20\x40(P.*)\x40/“, $lines[$i], $id)) {“ and everything works like it should…

      Reply
      Claude

      Update.

      I had a gedcom created by Ancestry and Carsten’s script would not be able to read the individuals in the gedcom files, so I submit the problem to Carsten and he came up with the solution in a record time and I am glad to say that I was able to upload a gedcom file to my site that contains almost half a million lines and a total of 36,995 individuals.

      Great job on the script Carsten and your support is first class.

      Reply
Alexis

Hello !

Great job but it don’t work for me because my individual ID are like this:

0 @9I@ INDI

The ‚I‘ is at the end…

🙁

Regards,
Alexis

Reply
    luventas

    In this case, replace it like following:

    In the line 99 of my script is the regular expression “if(preg_match(“/0\x20\x40(I.*)\x40/”, $lines[$i], $id)) {”
    Change this to “if(preg_match(“/0\x20\x40(.*I)\x40/”, $lines[$i], $id)) {” and everything works like it should…

    And sorry, that it took so long for a reply, but I swapped to another employer last year and I had to learn so much new, that I forgot to answer…

    Reply
Howie Milburn

Hi

After some difficulty I managed to load my GEDCOM file into the MySQL database. When viewed in phpMyAdmin, ,the data looks OK but when I click on Family Tree in your script, all the boxes are empty except for the bottom left one which says ‚SQL-Fehler in getPartner2‘ which looks like a data relationship problem.

Can you help? My GEDCOM file was produced from ancestory.co.uk

Howie

Reply
    luventas

    I wrote you an email.
    In the last half year, I canged a lot on the gedcomToDatabase2 script, but I think, since now I did not change the homepage script to fit the changes… Maybe this is the reason. I will check it, if you send me a small amount of test data, if possible.

    Reply
    luventas

    Hi Howie,

    there where two issues, why this is not working.
    One is in my header.php, one is somehow in your gedcom file:

    The first Person, „Firstname Lastname, @P1“, has no gender given. This is the error message you got.
    I changed the script to have female as default gender. It is attached as gedcomToDatabaseV105.php in a zipfile. (It also includes the P in the Personal data, so you do not need to change that)

    The second one is a problem on my site: I included somwhere in past the user_id to the database, but it is not filled until now, which means, that it is always 0.
    But in the Homepage script it in all database queries it is called with 1, so we do not get any data from database.

    What you now have to do:
    – Remove all Data from database
    – Call the script gedcomToDatabaseV105.php to fill it again
    – open the header.php and change the line 3 from „$_SESSION[‚userid‘] = 1;“ to „$_SESSION[‚userid‘] = 0;“, then everything works like it should.

    Greetings

    Carsten Fröhlich

    Reply
Hem Singh

Plz send me mysql data script query

Reply

Schreibe einen Kommentar

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