A TNG (The Next Generation of Genealogy Sitebuilding by Darrin Lythgoe) mod that adds a Kimon display mode to the pedigree chart.
Author: Kimon Andreou Mod Version: 1.3.0 Requires: TNG 15.x
Note: The display name "Kimon" is a placeholder. To change it, update all occurrences of pedkimon and kimonpedlnk in mods/tng_kimon_pedigree.cfg.
Adds a "Kimon" tab to the pedigree chart display mode selector (alongside Standard, Compact, Box, etc.). The Kimon mode renders a clean, read-only ancestor chart:
- No gender images, popups, or down-arrows
- No hyperlinks on names (plain text only)
- Dynamic box heights — each box sized to its content
- Connector lines redrawn to match each box's actual midpoint
- Empty subtrees collapse — missing ancestor branches consume no vertical space
- Save as PNG (transparent background) or JPG (white background) — no external dependencies required
mods/
tng_kimon_pedigree.cfg # Mod manifest (patches + embedded JS)
- Copy
mods/tng_kimon_pedigree.cfginto your TNGmods/directory. - Log in to TNG as admin.
- Go to Admin > Mod Manager.
- Find Kimon's Pedigree Chart in the mod list.
- Click Install.
The mod installer will:
- Create the
mods/tng_kimon_pedigree/directory - Create
mods/tng_kimon_pedigree/kimon_pedigree.js - Patch
pedigree.php(6 patches: input sanitization, link highlighting, config overrides, JS include, CSS injection, display selector link) - Patch
ajx_pedjson.php(1 patch: surname field for name splitting) - Patch
ahnentafel.php,fan.php,verticalchart.php,pedigreetext.php(1 patch each: Kimon display mode link) - Patch
languages/English/text.php(1 patch: UI labels)
- Go to Admin > Mod Manager.
- Find Kimon's Pedigree Chart.
- Click Remove to uninstall the old version.
- Copy the new
mods/tng_kimon_pedigree.cfginto your TNGmods/directory, overwriting the old file. - Return to Mod Manager and click Install.
- Go to Admin > Mod Manager.
- Find Kimon's Pedigree Chart.
- Click Remove.
The mod installer will reverse all patches and delete the created files and directory.
After installation, navigate to any person's pedigree chart. A Kimon link appears in the display mode selector bar (after Fan Chart). Click it, or navigate directly:
pedigree.php?personID=I1&tree=tree1&display=kimon&generations=4
- Requires TNG v15.0.x
- If another display-mode mod patches the same
elseif(box)/elseblock inpedigree.php, install this mod first
This mod includes fixes for pre-existing TNG vulnerabilities:
$displayXSS sanitization — Whitelists$displayto lowercase alpha characters only, preventing reflected and stored XSS via JS string injection, HTML attribute injection, and JS-in-HTML handler injection- Client-side HTML escaping — Escapes
&,<,>in ancestor names before innerHTML insertion, compensating for TNG'sxmlcharacters()not escaping angle brackets
- PNG/JPG export now uses native Canvas API — no external dependencies or internet connection required
- Collapse empty subtrees — hidden/missing ancestor branches no longer consume vertical space
- Recursive subtree-span layout algorithm replaces linear stacking for dramatically shorter charts with sparse data
- Off-page arrows hidden for collapsed slots (display:none, not just repositioned)
- Container dimensions now exclude hidden slots from sizing calculations
- Fix PNG/JPG export clipping the right edge of the chart (container width now recalculated to encompass all boxes and off-page arrows)
- Save pedigree chart as PNG (transparent background, boxes keep fill) or JPG (white background)
- html2canvas 1.4.1 loaded from CDN with SRI hash for integrity verification
- Dynamic scale capping for iOS Safari compatibility (16M pixel limit)
- Re-entrancy guard and loading state indicator during export
- "Kimon" link now appears on all pedigree display modes (Ahnentafel, Fan Chart, Vertical, Text Only)
- Smart name wrapping — line breaks fall between given names and surname, not mid-word
- Privacy-gated surname field for name splitting (only emitted when user has data access)
- Dynamic box heights — boxes sized to actual content instead of a fixed 34px
- JS reflow engine measures each box, stacks the last generation, and centers earlier generations between their children
- Connector lines redrawn after reflow to connect at each box's true vertical midpoint
- Handles hidden ancestors (hideempty mode): connectors only drawn to visible children
- Handles tall wrapping names: chart automatically shifts to prevent top clipping
- Initial release
This project is provided as-is for use with TNG.