PHP Classes

Genealogy Classes: Manage genealogy trees for a family

Recommend this page to a friend!
     
  Info   Demos   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 42%Total: 1,061 All time: 3,495 This week: 54Up
Version License PHP version Categories
genealogy 0.8GNU General Publi...4.0Databases, Libraries
Description 

Author

This package can manage genealogy trees for a family.

It can manage the records of information store in a MySQL database about a person and its parents and children.

A separate class can be used to export the genealogy structure of a family in the GEDCOM format.

Innovation Award
PHP Programming Innovation award winner
July 2011
Winner


Prize: One copy of RadPHP XE
Genealogy is the study of the parents of all members of a family.

This package provides a PHP solution for recording the members of a family and their parents relationships.

It can also export the recorded family information in a standard format, so it can be used by other programs.

Manuel Lemos
Picture of Pierre FAUQUE
  Performance   Level  
Name: Pierre FAUQUE <contact>
Classes: 18 packages by
Country: France France
Age: 77
All time rank: 15212 in France France
Week rank: 50 Up4 in France France Up
Innovation award
Innovation award
Nominee: 12x

Winner: 1x

Details

File: README-FIRST.txt (23/06/2011) This is what I think useful to read before using these scripts and classes. This documentation is still in progress. So, I'm not sure that all paragraphs are in a correct order. I hope you can understand my rough english :o( NOTA ---- I'm not an expert in genealogy neither in PHP. But these scripts can be used to begin your family database on the web. And you can complete the scripts with those you need. EXAMPLE ------- You can see and example in use of these scripts and classes at : http://www.fauque.fr/demogen (fictitious people data). AVAILABLE FILES --------------- a) PHP Classes: The PHP classes (personne and gedcom) and some files to see the essential fonctions of these classes : list of people, card or family of a person. All necessary scripts are provided to build a real database with fictitious people. A geographic database of french used cities in that example is provided. b) my own website: the rest of the used files to see all people of the database and produce a recapitulative PDF file, in brief all files I'm using on my own website. All necessary scripts are provided to build a real database with fictitious people. The geographic database of french cities is provided. CITIES ------ Each city (even small) have an identifier called INSEE number (INSEE is a french acronym standing for Institut National de la Statistique et des Etudes Economiques, i.e. National Institute for Statistics and Economic Studies). Several small cities near from each other can have the same postal code (zipcode) because they are served by the same post office. A set of cities make a department and several departments are administered by a region. There are 22 regions in France + 1 (overseas). In the database, cities are indicated by their INSEE code (bcode, dcode, icode, ucode, ecode -see dictionary data-). Their zipcode, department and region are deduced from the INSEE code. PHP Classes is used to share scripts, not to keep a lot of data. So, the only geographic data provided here are those which are used by the example scripts. Il you want the complete french cities list I have (insee, zipcode, longitude, latitude of 35330 cities), you have to download them from my website. Of course, you can adapt your geographic data to your country. DIRECTORIES ----------- The documentation supposes that your website organization is like that : /--+ ................. The root directory of your web site | ======= for your general PDF (genealogy and others) ======= +-- font .......... directory, sub-directory, files for making PDF files * +-- lib ........... library directory (with at least tfpdf.php) * | -------- for your genealogy ------------------------------- +-- gen ........... Your genealogy root directory | +-- bio ....... directory for later use (biography). Empty for the moment | +-- img ....... directory for icons and graphic symbols | +-- photos .... directory for people's pictures (158 x 200 px) | +-- src ....... directory for scanned documents (birth, death, marriage) | =========================================================== +-- your-other-directories +-- etc... * You can find these files and scripts (and others) at http://www.fpdf.org/ If it's not your organization, you have to modify the directories. You can modify them in : a) init.php - Setup in it your root genealogy directory - You have not to change the sub-directories if you keep the same organization (bio,img,photos,src) b) famille.php (not useful nor provided for the demo version on phpclasses.org). NB: This script is used to build a PDF file of all people stored into your database - (real path for font directory) : Once you have uploaded the font directory and his content to your root website directory, go to the URL http://<your.website.tld>/font/realfontdir.php where <your.website.tld> is the URL of your root website directory and execute the displayed indications to setup the real path of the font directory in the famille.php file. >>> YOU NEED THAT <<<. - relative path for the tFPDF class in the library directory You can keep this definition as it if you have the above directories tree. NB: It can be a good idea to protect your root genealogy directory with real data by a password using .htaccess and .htpasswd LANGUAGE -------- You can change the language in the 'init.php' file ($language='en' or $language='fr'). For the moment there are only two languages : French and English ('texts-fr.php' and 'texts-en.php') To have your own language, translate the 'texts-en.php' file into your language and save it into 'texts-xx.php' where 'xx' is your Top Level Domain (ex: it=Italy, es=Spain, pt=Portugal, etc...) The texts which are in the database aren't translated. So, if you have imported a gedcom file in which an approximative birthdate have been written in french such as 'vers 1938', this text will not be translated into 'about 1938', idem for 'Rupture' or 'Mariage' instead of 'Break-up' or 'Marriage'. If you've declared a missing language ($language='it' and 'texts-it.php' is missing), english will be applied. If there is no language texts in the directory, the script stops. ALLOWED DATAS ------------- a) Personal infos. Each person stored in the database has a number in the 'disp' field (what to DISPlay ?). This number is the sum of the allowed informations such as (for the moment) : Picture: .................. 1 Mobile phone number: ...... 2 Email address: ............ 4 Fixed home phone number: .. 8 Postal address: ........... 16 Notes: .................... 32 Sources: .................. 64 Biography: ................ 128 (will be used later) Someone who as '5' in the 'disp' field will only have his picture and his email displayed (1+4) even his postal address and his phone number are also stored in the database. The default value for the 'disp' field is 1 b) Notes. Several notes can be stored for someone. If the number stored in the 'disp' field contains 32 (2^5), the notes for this one can be displayed. Each note have a field 'nallow' (Note ALLOWed) with either the value 0 (not allowed) or 1 (allowed). So, if all the notes for someone are set to 0 (nallow=0), no note for this person will be displayed even the field 'disp' contains 32. c) Biography. The next version will allow or not (according to the disp field : 128 in it) to display a biography file (format .txt .doc or .pdf) CLASSES AND FILES ----------------- There are only two classes in this package : - class.gedcom.php : to produce a GEDCOM file from the database - class.personne.php : to get informations about a person from the database the 'init.php' file is important because - all definitions are in it (even the tables names) - it contains functions to establish a connection to the database and various other functions All other files are examples of use, including pictures. PHPCLASSES is used to share classes, not to share applications. So the provided files are only to show three examples : - show the nominative list of the people stored in the database - show the card of a person - show a mini-family tree of a person (himself, parents, grand-parents and children) These scripts are also examples of use of these classes. All other files (such as production of all allowed informations into a PDF file) are avalaible from my website. if you have downloaded these files on a package from PHPCLASSES, extract all files and : 1) be sure to have the below files and the tree directories on your computer. 2) have a look into 'init.php' file to change it with your own values : a) language (en or fr) b) your root genealogy directory (URLSITE) c) your informations for MySQL database connection (NOM, PASS, SERVER, BASE) d) execute the SQL command 'create_tables-and-demo-data.sql' to build your demo database e) upload all files and directory to your server into your root genealogy directory NB: the 'doc directory is not useful on the server 3) go to : http://<your.website.tld>/<your-root-directory>/ ../+ <== genealogy root directory ............ Classes and example scripts | | class.gedcom.php ........................ Class to build a GEDCOM file | class.personne.php ...................... Class to get a person informations from the database | | content-idx_en.txt ...................... Examples files | content-idx_fr.txt | ged.php | genprt.css | genscr.css | index.php | init.php ................................ Setup first. | showged.php | showlist.php | showpers.php | showsheet.php | texts-en.php | texts-fr.php | +----/doc | | create_tables-only.sql ............ SQL command to create tables | create_tables-and-demo-data.sql ... SQL command to create tables and insert demo data | data-dictionnary.txt .............. no comment. | desc-tables.txt ................... Description of tables | drop_tables.sql ................... SQL command to delete all tables | +----/img | | addr.jpg .......................... Postal address symbol | doc.jpg ........................... Document symbol (certificates: birth, marriage, death) | f.jpg ............................. Female symbol | iall.png .......................... Menu icon: display all people | iged.png .......................... Menu icon: send the database in a PDF file | ihelp.png ......................... Menu icon: help | ilist.png ......................... Menu icon: go to the nominative list | imail.png ......................... Menu icon: send a mail about the displayed person | ipdf.png .......................... Menu icon: send all information into a ¨DF file | iphotos.png ....................... Menu icon: display all collected photographies | iprint.png ........................ Menu icon: print the current page | isheet.png ........................ Menu icon: display the family tree (parents, grand-parentd, children) | m.jpg ............................. Male symbol | mail.jpg .......................... Email symbol | mob.jpg ........................... Mobile phone symbol | nopic.jpg ......................... No picture symbol | pic.jpg ........................... Picture symbol | tel.jpg ........................... Fixed phone symbol | u.jpg ............................. Unknown sex symbol | +----/photos | | kermarec_paa.jpg .................. Picture of 'KERMAREC Paul Adrien Alan' | kermarec_rle.jpg | kermarec_yml.jpg | +----/src | | B1.jpg ............................ Birth certificate of the person number 1 (scan) | B6.jpg | U3.jpg ............................ Union certificate of the person number 3 (scan) | U7.jpg | `----/tools ll_conv.php ........................ Longitude/latitude conversions NB: The files into the tools sub-directory isn't used by the scripts or the classes. It's only a tool for you to insert longitudes and latitudes in décimal system into your database. DATABASE -------- The database is described in the 'desc-tables.txt' file. The database can be created by the SQL commands 'create_tables-*.sql' DEPENDANCES ----------- The example which is on my website use a class previously uploaded on PHP classes, easy to use and mamed "class liste" (PHP Classes package n° 2625). Download it to place a combo list allowing to select another person to see. QR_CODE ------- Not used by the scripts uploaded to PHPCLASSES. This 2D barcode on the last PDF page contains the URL of your genealogy website. It's a picture 236 x 236 px (2,00 x 2,00 cm) You can get your own QR code with two ways a) go to the URL http://www.keremerkan.net/qr-code-and-2d-code-generator/ and generate the code you want with your own data (URL and/or phone number) b) download the free and portable application Zint Barcode Studio Portable which can be downloaded from http://portableapps.com/apps/utilities To continue... 06/07/2011.

  Author's demoExternal page  
  Files folder image Files (52)  
File Role Description
Files folder imagedoc (6 files)
Files folder imageimg (20 files)
Files folder imagephotos (3 files)
Files folder imagesrc (4 files)
Files folder imagetools (1 file)
Accessible without login Plain text file README-FIRST.txt Doc. mini-documentation
Plain text file class.personne.php Class Get information about a person
Plain text file class.gedcom.php Class Build a GEDCOM file
Accessible without login Plain text file genscr.css Data Screen stylesheet
Accessible without login Plain text file genprt.css Data Print stylesheet
Accessible without login Plain text file texts-fr.php Conf. Language texts : french
Accessible without login Plain text file texts-en.php Conf. Language texts : english
Accessible without login Plain text file init.php Conf. Init file
Accessible without login Plain text file index.php Appl. Index page
Accessible without login Plain text file content-idx_fr.txt Data Index page : french content
Accessible without login Plain text file content-idx_en.txt Data Index page : english content
Accessible without login Plain text file showlist.php Appl. Show nominative list
Accessible without login Plain text file showpers.php Appl. Show a person
Accessible without login Plain text file showsheet.php Appl. Show a family sheet
Accessible without login Plain text file ged.php Appl. Send a GEDCOM file
Accessible without login Plain text file showged.php Appl. Show a GEDCOM file
Accessible without login Image file card.jpg Output Example of output (card)
Accessible without login Image file sheet.jpg Output Example of output (sheet)

  Files folder image Files (52)  /  doc  
File Role Description
  Accessible without login Plain text file desc-tables.txt Doc. Description of MySQL tables
  Accessible without login Plain text file data-dictionnary.txt Doc. Data dictionnary
  Accessible without login Plain text file create_tables-only.sql Data Create structure
  Accessible without login Plain text file create_tables-and-demo-data.sql Data Build a demo database
  Accessible without login Plain text file drop_tables.sql Data Delete all genealogy tables
  Accessible without login Image file MCD_Gen-1.1.jpg Photo MCD of the genealogy database

  Files folder image Files (52)  /  img  
File Role Description
  Accessible without login Image file addr.jpg Icon Symbol : address
  Accessible without login Image file doc.jpg Icon Symbol : certificate
  Accessible without login Image file f.jpg Icon Symbol : female
  Accessible without login Image file m.jpg Icon Symbol : male
  Accessible without login Image file u.jpg Icon Symbol : unknown sex
  Accessible without login Image file mob.jpg Icon Symbol : mobile phone
  Accessible without login Image file tel.jpg Icon Symbol : fixed phone
  Accessible without login Image file mail.jpg Icon Symbol : mail
  Accessible without login Image file pic.jpg Icon Symbol : picture
  Accessible without login Image file nopic.jpg Icon Symbol : no picture
  Accessible without login Image file iall.png Icon Menu icon : show all
  Accessible without login Image file iged.png Icon Menu icon : get GEDCOM file
  Accessible without login Image file ihelp.png Icon Menu icon : help
  Accessible without login Image file ilist.png Icon Menu icon : nominative list
  Accessible without login Image file imail.png Icon Menu icon : send mail
  Accessible without login Image file ipdf.png Icon Menu icon : get PDF file
  Accessible without login Image file iphotos.png Icon Menu icon : show all photos
  Accessible without login Image file iprint.png Icon Menu icon : print the current page
  Accessible without login Image file isheet.png Icon Menu icon : show a sheet
  Accessible without login Image file qr_url.jpg Icon QR-code of the demo URL

  Files folder image Files (52)  /  photos  
File Role Description
  Accessible without login Image file kermarec_paa.jpg Photo Picture #1
  Accessible without login Image file kermarec_rle.jpg Photo Picture #2
  Accessible without login Image file kermarec_yml.jpg Photo Picture #3

  Files folder image Files (52)  /  src  
File Role Description
  Accessible without login Image file B1.jpg Photo Certificate : birth #1
  Accessible without login Image file B6.jpg Photo Certificate : birth #6
  Accessible without login Image file U3.jpg Photo Certificate : union #3
  Accessible without login Image file U7.jpg Photo Certificate : union #7

  Files folder image Files (52)  /  tools  
File Role Description
  Accessible without login Plain text file ll_conv.php Aux. Tool: longitude/latitude conversions

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,061
This week:0
All time:3,495
This week:54Up
 User Ratings  
 
 All time
Utility:56%StarStarStar
Consistency:68%StarStarStarStar
Documentation:75%StarStarStarStar
Examples:-
Tests:-
Videos:-
Overall:42%StarStarStar
Rank:3648