/includes/functions_print.php

Description

Function for printing

Various printing functions used by all scripts and included by the functions.php file.

phpGedView: Genealogy Viewer Copyright (C) 2002 to 2007 John Finlay and Others

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

  • version: $Id: functions_print.php 1002 2007-03-27 02:27:19Z kosherjava $
Includes
require_once ('includes/functions_charts.php') (line 34)

Function for printing

Various printing functions used by all scripts and included by the functions.php file.

phpGedView: Genealogy Viewer Copyright (C) 2002 to 2007 John Finlay and Others

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

  • version: $Id: functions_print.php 1002 2007-03-27 02:27:19Z kosherjava $
Functions
CheckFactUnique (line 2496)

Check for facts that may exist only once for a certain record type.

If the fact already exists in the second array, delete it from the first one.

void CheckFactUnique ( $uniquefacts,  $recfacts,  $type)
  • $uniquefacts
  • $recfacts
  • $type
DumpString (line 2759)

This function produces a hexadecimal dump of the input string

for debugging purposes

void DumpString ( $input)
  • $input
get_lds_glance (line 2725)

get a quick-glance view of current LDS ordinances

string get_lds_glance (string $indirec)
  • string $indirec
init_calendar_popup (line 2580)

javascript declaration for calendar popup

void init_calendar_popup ([none 0 = ])
  • none 0
PrintReady (line 1972)

Prepare text with parenthesis for printing Convert & to & for xhtml compliance

void PrintReady (string $text, [ $InHeaders = false])
  • string $text: to be printed
  • $InHeaders
print_add_new_fact (line 2517)

Print a new fact box on details pages

void print_add_new_fact (string $id, array $usedfacts, string $type)
  • string $id: the id of the person,family,source etc the fact will be added to
  • array $usedfacts: an array of facts already used in this record
  • string $type: the type of record INDI, FAM, SOUR etc
print_asso_rela_record (line 2155)

print ASSO RELA information

Ex1:

  1. ASSO @I1@
  2.  RELA Twin

Ex2:

  1. CHR
  2.  ASSO @I1@
  3.  RELA Godfather
  4.  ASSO @I2@
  5.  RELA Godmother

void print_asso_rela_record (string $pid, string $factrec, [string $linebr = false])
  • string $pid: person or family ID
  • string $factrec: the raw gedcom record to print
  • string $linebr: optional linebreak
print_autopaste_link (line 2664)
void print_autopaste_link ( $element_id,  $choices, [ $concat = 1], [ $name = 1], [ $submit = 0])
  • $element_id
  • $choices
  • $concat
  • $name
  • $submit
print_contact_links (line 1025)

print links for genealogy and technical contacts

this function will print appropriate links based on the preferred contact methods for the genealogy contact user and the technical support contact user

void print_contact_links ([ $style = 0])
  • $style
print_execution_stats (line 924)

Prints Exection Statistics

prints out the execution time and the databse queries

void print_execution_stats ()
print_fact_date (line 2292)

print fact DATE TIME

void print_fact_date (string $factrec, [boolean $anchor = false], [boolean $time = false], [string $fact = false], [string $pid = false], [string $indirec = false])
  • string $factrec: gedcom fact record
  • boolean $anchor: option to print a link to calendar
  • boolean $time: option to print TIME value
  • string $fact: optional fact name (to print age)
  • string $pid: optional person ID (to print age)
  • string $indirec: optional individual record (to print age)
print_fact_notes (line 1543)

Print all of the notes in this fact record

void print_fact_notes (string $factrec, int $level)
  • string $factrec: the factrecord to print the notes from
  • int $level: The level of the factrecord
print_fact_place (line 2371)

print fact PLACe TEMPle STATus

void print_fact_place (string $factrec, [boolean $anchor = false], [boolean $sub = false], [boolean $lds = false])
  • string $factrec: gedcom fact record
  • boolean $anchor: option to print a link to placelist
  • boolean $sub: option to print place subrecords
  • boolean $lds: option to print LDS TEMPle and STATus
print_favorite_selector (line 1149)
void print_favorite_selector ([ $option = 0])
  • $option
print_findfamily_link (line 2641)
void print_findfamily_link ( $element_id, [ $ged = ''])
  • $element_id
  • $ged
print_findindi_link (line 2615)

prints a link to open the Find Special Character window

void print_findindi_link (string $element_id, string $indiname, [boolean $asString = false], [boolean $multiple = false], [string $ged = ''], [ $filter = ''])
  • string $element_id: the ID of the element the value will be pasted to
  • string $indiname: the id of the element the name should be pasted to
  • boolean $asString: Whether or not the HTML should be returned as a string or printed
  • boolean $multiple: Whether or not the user will be selecting multiple people
  • string $ged: The GEDCOM to search in
  • $filter
print_findmedia_link (line 2705)
void print_findmedia_link ( $element_id, [ $choose = ""], [ $ged = ''], [ $asString = false])
  • $element_id
  • $choose
  • $ged
  • $asString
print_findplace_link (line 2629)
void print_findplace_link ( $element_id, [ $ged = ''])
  • $element_id
  • $ged
print_findrepository_link (line 2693)
void print_findrepository_link ( $element_id, [ $ged = ''])
  • $element_id
  • $ged
print_findsource_link (line 2679)
void print_findsource_link ( $element_id, [ $sourcename = ""], [ $asString = false], [ $ged = ''])
  • $element_id
  • $sourcename
  • $asString
  • $ged
print_first_major_fact (line 2467)

print first major fact for an Individual

void print_first_major_fact (string $key, [ $majorfacts = array("BIRT", "CHR", "BAPM", "DEAT", "BURI", "BAPL", "ADOP")])
  • string $key: indi pid
  • $majorfacts
print_footer (line 875)
void print_footer ()
print_gedcom_title_link (line 1590)

print a gedcom title linked to the gedcom portal

This function will print the HTML to link the current gedcom title back to the gedcom portal welcome page

  • author: John Finlay
void print_gedcom_title_link ([ $InHeader = FALSE])
  • $InHeader
print_header (line 493)

print out standard HTML header

This function will print out the HTML, HEAD, and BODY tags and will load in the CSS javascript and other auxiliary files needed to run PGV. It will also include the theme specific header file. This function should be called by every page, except popups, before anything is output.

Popup pages, because of their different format, should invoke function print_simple_header() instead.

void print_header (string $title, [string $head = ""], [boolean $use_alternate_styles = true])
  • string $title: the title to put in the <TITLE></TITLE> header tags
  • string $head
  • boolean $use_alternate_styles
print_help_index (line 1743)
void print_help_index ( $help)
  • $help
print_help_link (line 1632)
void print_help_link ( $help,  $helpText, [ $show_desc = &quot;&quot;], [ $use_print_text = false], [ $return = false])
  • $help
  • $helpText
  • $show_desc
  • $use_print_text
  • $return
print_lang_form (line 943)
void print_lang_form ([ $option = 0])
  • $option
print_menu (line 1811)

prints a JavaScript popup menu

This function will print the DHTML required to create a JavaScript Popup menu. The $menu parameter is an array that looks like this $menu["label"] = "Charts"; $menu["labelpos"] = "down"; // tells where the text should be positioned relative to the picture options are up down left right $menu["icon"] = "images/pedigree.gif"; $menu["hovericon"] = "images/pedigree2.gif"; $menu["link"] = "pedigree.php"; $menu["accesskey"] = "Z"; // optional accesskey $menu["class"] = "menuitem"; $menu["hoverclass"] = "menuitem_hover"; $menu["flyout"] = "down"; // options are up down left right $menu["items"] = array(); // an array of like menu items $menu["onclick"] = "return javascript"; // java script to run on click

  • author: John Finlay
void print_menu (array $menu, [ $parentmenu = &quot;&quot;])
  • array $menu: the menuitems array to print
  • $parentmenu
print_note_record (line 1511)

print a note record

boolean print_note_record (string $text, int $nlevel, string $nrec)
  • string $text
  • int $nlevel: the level of the note record
  • string $nrec: the note record to print
print_parents_age (line 2258)

Print age of parents

void print_parents_age (string $pid, string $bdate)
  • string $pid: child ID
  • string $bdate: child birthdate
print_pedigree_person (line 45)

print the information for an individual chart box

find and print a given individuals information for a pedigree chart

void print_pedigree_person (string $pid, [int $style = 1], [boolean $show_famlink = true], [int $count = 0], [ $personcount = &quot;1&quot;])
  • string $pid: the Gedcom Xref ID of the to print
  • int $style: the style to print the box in, 1 for smaller boxes, 2 for larger boxes
  • boolean $show_famlink: set to true to show the icons for the popup links and the zoomboxes
  • int $count: on some charts it is important to keep a count of how many boxes were printed
  • $personcount
print_privacy_error (line 1597)
void print_privacy_error ( $username)
  • $username
print_simple_fact (line 1472)

print a simple form of the fact

function to print the details of a fact in a simple format

void print_simple_fact (string $indirec, string $fact, string $pid)
  • string $indirec: the gedcom record to get the fact from
  • string $fact: the fact to print
  • string $pid: the id of the individual to print, required to check privacy
print_simple_footer (line 901)
void print_simple_footer ()
print_simple_header (line 746)

print simple HTML header

This function will print out the HTML, HEAD, and BODY tags and will load in the CSS javascript and other auxiliary files needed to run PGV. It does not include any theme specific header files. This function should be called by every page before anything is output on popup pages.

void print_simple_header (string $title, string $head, boolean $use_alternate_styles)
  • string $title: the title to put in the <TITLE></TITLE> header tags
  • string $head
  • boolean $use_alternate_styles
print_specialchar_link (line 2653)
void print_specialchar_link ( $element_id,  $vert)
  • $element_id
  • $vert
print_text (line 1688)

print a language variable

It accepts any kind of language variable. This can be a single variable but also a variable with included variables that needs to be converted. print_text, which used to be called print_help_text, now takes 3 parameters of which only the 1st is mandatory The first parameter is the variable that needs to be processed. At nesting level zero, this is the name of a $pgv_lang array entry. "whatever" refers to $pgv_lang["whatever"]. At nesting levels greater than zero, this is the name of any global variable, but *without* the $ in front. For example, VERSION or pgv_lang["whatever"] or factarray["rowname"]. The second parameter is $level for the nested vars in a sentence. This indicates that the function has been called recursively. The third parameter $noprint is for returning the text instead of printing it This parameter, when set to 2 means, in addition to NOT printing the result, the input string $help is text that needs to be interpreted instead of being the name of a $pgv_lang array entry. This lets you use this function to work on something other than $pgv_lang array entries, but coded according to the same rules. When we want it to return text we need to code: print_text($mytext, 0, 1);

void print_text (string $help, [int $level = 0], [int $noprint = 0])
  • string $help: The variable that needs to be processed.
  • int $level: The position of the embedded variable
  • int $noprint: The switch if the text needs to be printed or returned
print_theme_dropdown (line 1894)
void print_theme_dropdown ([ $style = 0])
  • $style
print_user_links (line 1001)

print user links

this function will print login/logout links and other links based on user privileges

void print_user_links ()
write_align_with_textdir_check (line 1867)
void write_align_with_textdir_check ( $t_dir)
  • $t_dir

Documentation generated on Wed, 28 Mar 2007 09:54:19 -0600 by phpDocumentor 1.3.1