Skip to content

Luventas Web Design

A new blog for developers in PHP, Java and mobile Development

  • Home
  • 2011
  • Mai
  • 28
  • Include your family tree in your webpage

Include your family tree in your webpage

Posted on 28 Mai 201122 Juni 2011 By luventas 1 Kommentar zu Include your family tree in your webpage
Genealogy, PHP

Yesterday I’ve posted for all interested genealogists and webmaster, how they can create a database out of their gedcom file. But how you can display this information on your website?

In this post I want to explain, how I do this and share you my PHP code for free to use it on your website. I only please you for let my link in the code, that I have also something out from it.In the zipfile are a lot of PHP files. You can use them nearly unchanged. Only in the dbConnect.php you have to include your own database connection.

$hostport = "localhost"; // host of your database
$user = "root"; // the username to connect to your database
$password = ""; // your password to connect

To use your own website design, you can change the header and the footer file. I have also in these two files the whole design of my webpage. If you want to change the design of the family tree itself, you can customize the stammbaum.css file. there are all styles for the family tree stored in.

To display the family tree in the browser, you have to call the stammbaum.php. For the list of all person in your database, alphabetically ordered, you have to call the personen.php. For the list of all last names, you can call the familiennamen.php. Here are all last names listed which are stored in your database. When you click on one of the names, the personenpart.php is called. Then there is a list of all persons with this last name shown.

The default start ID is your I1 from your Gedcom file. When you click on a person in one of the above described lists, this person is shown as start person in the tree view.

In the tree view are always 5 past levels shown. If you want to go deeper in the past, you can click on one of the arrows which are pointing to the right. The you go on level deeper in the past.

A mouse over effect over the person in the tree view shows you all available information about this person. Also by mouse over you can see a list of the partners of this person and a list of the childs. These persons (pertners and childs) are clickable too. Then the tree is rebuild with tis person as start person.

Persons, who are not dead, are only displayed as „Living, Living“ because of data security. If no death date is included the age of this person is calculated. If the person is older than 110 Years, then its death will be provided and all information of this person is shown.

I’m sorry for using a lot of german words in the php files and file names. I created this scripts in the past when my english was not as good as today.

Now I wish you a lot of fun with implementing my code in your website that you can show the results of your genealogical research to the world. Please note, that is necessary to use the database like in „Post „Create a database from your GEDCOM file“ described.

An example how the script can be used, is shown in http://www.genealogiearchiv.de.

familytree php files for download

Print Friendly, PDF & Email

Beitrags-Navigation

❮ Previous Post: Google Chrome: Problems with inaccurate „enctype“-data in HTML forms
Next Post: Create your website multilingual ❯

You may also like

Genealogy
Anleitung zur Verwendung meiner genealogischen Skripte
17 Juni 2011
PHP
Create Random Password with PHP
23 Mai 2011
PHP
Create your website multilingual
29 Mai 2011
Genealogy
Create a database from your GEDCOM file
27 Mai 2011

One thought on “Include your family tree in your webpage”

  1. Hem Singh sagt:
    1 Juli 2014 um 13:03 Uhr

    Please send me Data base script

    Antworten

Schreibe einen Kommentar Antworten abbrechen

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

Copyright © 2023 Luventas Web Design.

Theme: Oceanly News by ScriptsTown

Diese Website nutzt Cookies, um bestmögliche Funktionalität bieten zu können. OK, verstanden
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
immer aktiv
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SPEICHERN & AKZEPTIEREN