Public Access Control

From TNG_Wiki
Jump to navigation Jump to search

Ambox notice.png The latest version of this mod uses the guidelines for TNG v12+ cust_text.php files. If you are using TNGv12+, and any cust_text.php file in this mod is marked with a Bad Target error, you need to update your cust_text.php files before you can install this mod. [Show instructions]

If you upgraded to TNGv12+, and did not update your cust_text.php files as instructed in the upgrade readme script, then you must use the TNG Mod Manager to update them. To do so:

  1. Go to Mod Manager, and select its "Recommended Updates" tab.
    (If the "Recommended Updates" tab is not visible, then go to the Mod Manager Options tab, select "Display Settings", and turn on the "Recommended Updates" tab.)
  2. Click the "Update" button in the "Recommended Updates" tab.
    Installed mods do not interfere with the update, and if you already have (or think you may have) run this update, it will not hurt for you to run it again.

[See details in the TNGv12 Change Impacts Article][Hide the instructions]

TNG 14.0
TNG 13.0
TNG 12.0

Public Access Control
Summary Introduces a panel in General Settings to restrict public access to selected parts of your TNG system.
Validation The mod is XHTML compliant.Valid-xhtml10.png
Mod Updated 22 Oct 2023
Download link For
TNG 14.0.3
TNG 14.0.1
TNG 14.0
TNG 13.1.0
TNG 13.0.4
TNG 13.0
TNG 12.3.0
TNG 12.1.0
TNG 12.0
TNG 11.1.1
TNG 11.0
TNG 10.1.2
Download stats Public Access Control prior to TNG v14
Author(s) Erik Hoppe
Jeff Rueger now updates the CFG file so that it can be installed on new versions of TNG
Homepage Public Access Control (This page)
Mod Support TNG Community Forums: TNG Specific - Code Discussion - Addons
Contact Developer
Latest Mod for TNG 14.0.3 for TNG 14.0 for TNG 13.1.0 for TNG 13.0.4 and PHP 8.0 for TNG 13.0 for TNG 12.3 for TNG 12.1 for TNG v12.0 for TNG v11.1.1 for TNG v11.0.x for TNG v10.0.0 - 10.0.2 for TNG v10.0.3 for TNG v10.1.0 - 10.1.1 for TNG v10.1.2 - 10.1.3
Min TNG V 10.0.0
Max TNG V 14.0.3
Files modified
Related Mods
Author of TNG Colouring Book
Mods by me: At my user page.


These mods were formerly known as Access Panel Beta... and are a compilation of my mods AccessRestriction and AccessRestriction_More, done for TNG v10.

These mods make all the above mods obsolete for use with TNG v10.

Purpose of the mod

Introduces a panel in Administration >> Setup >> General Settings: The Public Access panel, where you can select which parts of your TNG system that you want to hide from the Public Guests (or require a login), while keeping permissions and restrictions for your logged in users intact.
Corresponding Drop-Down menu items will also be protected while static menus will not be visually affected but a selection will re-direct to the Log In page.

This mod enjoys the company of my Collapsible_Standard_Events mod or Jeff Robison's Show/Hide_Standard_Events mod. (See Edit Option below)


This mod was developed by Erik Hoppe.
See Mod Support in the data box top right.
(A list of all my mods is found at my user page)

This mod is being maintained by Jeff Rueger who is updating the CFG file so that it can be installed on new versions of TNG (currently updated for TNG v14.0). No new functionality is being added. Support from Jeff Rueger is limited to the CFG file updates.

TNG v12.1 was updated by Jürgen P. Bourdeaux, Ron Krzmarzick, Brent Hemphill who resolved the issue with Show Photo in single row change in TNG 12.1 and resolved the conflict with Mobile Site Enhancements), and Ken Roy who resolved the conflict with Regroup Person Profile)


My sincere Thank You to Henny Savenije for his wonderful patience, suggestions and testing of this mod.
And likewise to Martin Pannier who has been helping and testing a lot as well as pointing me to important details and giving great suggestions.
Jay Wilpolt also suggested and helped a lot, especially with the tests for v10.0.3.0.
Without you three and your constant encouragement, this mod would not be in its current state!
Thank You!

Un-Protect The "Contact Us" Link

If you protect the Suggest tab and have a link "Contact us" at your index.php page with this text:
If you have any questions or comments about the information on this site, please contact us. We look forward to hearing from you.
it's useless as clicking the link opens the Log-in page.
It's however possible to open the Suggest page from the Mostwanted page because of a parameter in the URL.
You can use the same parameter for the "Contact us" link:

Look in languages/ your language /text.php for the variable


and copy all of it to your languages/ your language /cust_text.php
In the copy, find this part:

<a href=\"suggest.php\">

and between the php and the \ you add:


so it looks like this:

<a href=\"suggest.php&amp;xpTpart=mostwanted\">

The whole thing should look like this - in your language of course:

$text['contactus_long'] = "If you have any questions or comments about the information on this site, please <span class=\"emphasis\"><a href=\"suggest.php&amp;xpTpart=mostwanted\">contact us</a></span>. We look forward to hearing from you.";

Do the same for each language you support at your site.

Mod Conflicts

NOTE that this table only shows reports for mods installed with some remark, under P.A.C. mod versions and
Other mod versions may show similar or different results.
Many more mods have been tested without remarks.
Please add to this list, thank you.

Mod By Version Test in
TNG v10.1.1 +
PAC v10.1.0.2
Test in
TNG v10.1.2 +
PAC v10.1.2.2
Installed Before
Public Access
control mod
Installed After
Public Access
control mod
res f.
TNG v11.0.0
+ PAC v11.0.0.0
Drop_Down_Menu_Tooltip Jeff Robison v10.0.3.1 Y Y (Failure?) EH Success EH Yes (Depends on made Edits?)
Media_Preview_Fixed Jeff Robison v9.2.2.2 Y No Failure EH Success EH n/a Conflicts with Mobile_Media
Not used in TNG v > 10.1.1
v10.1.2.0 No Y Success EH Success EH Yes Not used in TNG v < 10.1.2
Mobile_Media Ken Roy v10.1.1.4 Y No Failure EH Success EH n/a Obsolete for TNG v10.1.2
Mobile_Site_Enhancements Ken Roy v10.1.0.3 Y No Failure EH Success EH n/a Not used in TNG v > 10.1.1
v10.1.2.4 No Yes Failure EH Success EH n/a Not used in TNG v < 10.1.2
v11.0.0.1 No No Failure EH Success EH Yes (Only tested in TNG v11-environm.)
v12.1.0.4a No No Failure JPB Success JPB TNG V12.1 alpha versions of mod
v12.1.0.5a No No Success Ken Roy Success Ken Roy TNG V12.1 latest versions of both mods
Restrict_Image_Preview Graham Chamberlain v10.1.2.4 TNG 10.1.3 + PAC Failure CL Success CL Yes Thanks to Chris Lloyd for reporting
NEW: Forum for TNG Erik Hoppe All versions All versions Failure MC Success MC Yes Thanks to Marc Chubbuck for reporting
NEW: NearD Support Bill Herndon v12.0.0.3 Not applicable Failure BH Failure BH Yes Reported by Bill Herndon
NEW: Cemetery_Burials_Table Robin Richmond v13.0.0.16 Not applicable Failure TB Failure TB N/A Reported by TBirdUK
 If a mod is "Installed Before" with Failure and "Installed After" with Success,
 the mod should be UNinstalled while the Public Access Control mod is installed or uninstalled.
 The mod can be re-installed after the Public Access Control mod has been installed or uninstalled.

Placesearch-More Info mod v5e and earlier by Robin Richmond can NOT be used with PAC! (v5f can be used)
The below is added to all involved mods:
Of my mods, some demand a special order to Install and Uninstall. This is one of them.
Installing / Uninstalling in the wrong order may create chaos at a later stage.
The mods may signal Okay to Install but nevertheless may not be.

Order to INSTALL:

All mods below the one you want to Install, must first be Uninstalled (if you use them).
See the Uninstall order below. You can Install them after.

  1. Maternal And Paternal Lines
  2. Scrollbox
  3. Public Access Control
  4. Forum for TNG
  5. Fixed Family Tab

All mods above the one you want to Uninstall, must first be Uninstalled (if you use them).
You can Install them after. See the Install order above.

  1. Fixed Family Tab
  2. Forum for TNG
  3. Public Access Control
  4. Scrollbox
  5. Maternal And Paternal Lines

Suppose you use the Scrollbox and Fixed Family Tab mods.
Now you want to install Maternal And Paternal Lines.
As you can see in the Install Order both the used mods are below the Maternal And Paternal Lines mod and therefore you must first Uninstall the mods in the Uninstall order:
First Uninstall the Fixed Family Tab mod and then the Scrollbox mod.
Now you can install all three mods in the Install order:
First you Install Maternal And Paternal Lines, second the Scrollbox mod and finally Fixed Family Tab.

Mod Makers: Innermenu for Your mods

If you add a selection to the innermenu of any of the scripts descend.php, familygroup.php, getperson.php or pedigree.php and it opens a custom page, you can use the code-snippets below in your script to make your innermenu look the same as in the calling script, whether this mod is installed or not.

If an item is hidden from public view in the innermenu of, f.ex, descend.php it will be displayed at your innermenu and the user will arrive at the Log in page if it is clicked.
Using the code below will prevent the item to be displayed if the
Public Access control' mod is/will be installed and the item is/will be hidden.

If the Public Access control mod is not installed, there is no difference.

Only the relevant part of the innermenu is shown and only lines containing $xerxxProtect[ ] are added to the original script.
All four innermenus in a zipped .txt file

What is Not protected

  • Media displayed by other mods may not be protected, depending on how the mod displays the media.
  • Media displayed at index.php (f.ex. a Random or Featured Photo) may not be protected
  • The Most Wanted page will show media and suggest.php will open if the link on the Most Wanted page is clicked.

The TNG "event" named Associations is not protected by this mod.


TNG version: 10.1.0
  • A working TNG installation.
  • A backup of all affected files (see the list below)
  • An installed current version of the Mod Manager (is already included in TNG v10.x)

Before installation

  • If you have installed AccessRestriction, AccessRestriction More and/or Access Panel mods, you must first
  1. Uninstall the one(s) you have
  2. Remove the .cfg file(s) and the folder AccessRestrictionX from your mods folder


  1. Click on the download link for your TNG version, shown in the summary in the upper right corner of the page.
  2. Un-zip the downloaded file and you will find a folder: Open it.
  3. Move/copy/FTP the .cfg file and the folder named PublicAccessControl_10 to the mods folder of your TNG system.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the mod.
  5. Re-install any mods that you had to uninstall in order to be able to install the Public Access Control mod

In the event of a problem

Uninstalling the mod

If you want to completely Remove (uninstall) this mod and all its tables, you should

  1. Click the Uninstall button to uninstall the mod and then
  2. Click the Delete button to delete the config file from the mods folder.

In all cases: Go to Setup >> General Settings and click the Save button to clear the config.php file from the protection flags.


  • Uninstall and eventually Delete the current Mod.
  • Proceed as for an installation with the new Mod.

Edit option: Collapsible Standard Events

When the Public Access Control mod is used together with my Collapsible Standard Events mod or Jeff Robisons Show/Hide Standard Events mod, collapsible events can optionally be set to NOT collapsible if only icons and "Log in" are to be displayed.
Suppose that Notes and Media are protected by this mod, and...
Born is non-collapsible while Christened is set to collapsible:
Logged in view Not logged in view Default: "Christened" = initially collapsed.
Access collaps.png Pacmodimg1.png
Not logged in view Default: "Christened" = user expanded.
Not logged in view: Optional behaviour
Access collaps NLI.png
As the Christened event is set to Collapsible but was only going to display the icons and "Log in" text, only the data is displayed and the event is not collapsible.
(My No_Notesring mod is active; it removes the small ring and increases the space between Notes)

After Installation

Go to Administration >> Setup >> General Settings to find the Public Access panel.
Set the public view to your liking and click the Save button.

Complete Description of Settings

A complete description of all settings, including how they interact with your settings in Trees (Gedcom and PDF permissions) and Site Design and Definition (displaying the Share, Print and Bookmark icons), is found here: Public Access Control settings

Custom Text Additions

The config file includes the English language custom text.
There are Dutch, French, German and Swedish translations if they are present in your TNG system.
For other languages you can modify the config file to add the custom text or manually add to whatever language you like.

English custom text For Reference Only!

$text['textHide'] = "Hide";
$text['textMedia'] = "Media";
$text['textNotes'] = "Notes";
$text['textRepositories'] = "Repositories";
$text['textSources'] = "Sources";
$text['textReports'] = "Reports";
$text['textRelationship'] = "Relationship";
$text['textExtractgedcom'] = "GEDCOM";
$text['textSuggest'] = "Suggest";
$text['textAncestors'] = "Ancestors";
$text['textDescendants'] = "Descendants";
$text['textTimeline'] = "Timeline";
$text['textShare'] = "Share";
$text['textPrint'] = "Print";
$text['textBookmark'] = "Bookmark";
$text['textLogin'] = "Log in";
$text['textCemeteryMap'] = "Cemetery map";

$text['xerxxProtectPanel'] = "Public Access";
$text['xerxxProtectShow'] = "Show";
$text['xerxxProtectTab'] = "Tab ";
$text['xerxxProtectTextStart'] = "Select ";
$text['xerxxProtectTextEnd'] = " to hide from public view";
$text['xerxxProtectTextFull'] = " and require ";
$text['xerxxProtectData'] = "Data";
$text['xerxxProtectIcons'] = "Icons";
$text['xerxxProtectTabs'] = "Tabs";
$text['xerxxProtectTSelections'] = "Tab <i>Selections</i>";
$text['xerxxProtectAhnentafel'] = "Ahnentafel";
$text['xerxxProtectPDF'] = "PDF";
$text['xerxxProtectRegister'] = "Register";

$text['xerxxProtectHideSet'] = "<u>When "" . $text['textHide'] . "" is set:</u> ";
$text['xerxxProtectLogInSet'] = "<u>When "" . $text['textLogin'] . "" is set:</u> ";
$text['xerxxProtectShowSet'] = "<u>When "" . $text['xerxxProtectShow'] . "" is set:</u><br />";
$text['xerxxProtectExpl1'] = "Will show icon, text and and Log in link.";
$text['xerxxProtectExpl2'] = "PDF printing opt for Tabs <i>Individuial</i><br />and <i>Family</i> are hidden from public view.<br />";
$text['xerxxProtectExpl3'] = "Will only affect Not logged in users.<br />";
$text['xerxxProtectExpl4'] = " permissions for all are set in";
$text['xerxxProtectExpl5'] = "For Logged in users permissions are set in";
$text['xerxxProtectExpl6'] = " Admin >> Trees.<br />";
$text['xerxxProtectExpl7'] = "All";
$text['xerxxProtectExpl8'] = "<br />Admin >> Setup >> General Settings >> Site Design and Definition.<br />";

$text['xerxxLogin'] = " (Log in)";
$text['xerxxNoaccount'] = "You need a user account to ";
$text['xerxxNoaccountView'] = "view ";
$text['xerxxNoaccountListen'] = "listen to ";
$text['xerxxNoaccountRead'] = "read ";

$text['xerxxAPanelAlsoHides'] = "Also hides";
$text['xerxxAPanelAll'] = "All:";
$text['xerxxAPanelHideAll'] = "Hide all";
$text['xerxxAPanelProtectAll'] = "Protect all";
$text['xerxxAPanelWLink'] = "For detailed information, see the Wiki page <a href='' target='_blank'>Public Access Control</a> (sep. wind.)";

Revision History

Mod Version TNG Version Date Contents 14.03 22 Oct 2023 Updated for TNG v14.0.3 - only cfg file updated - no other changes - Jeff Rueger (jrueger) 14.0.1 11 Feb 2023 Updated for TNG v14.0.1 - only cfg file updated - no other changes - Ron Krzmarzick (Tngrlkz) 14.0 09 Jan 2023 Updated for TNG v14.0 - only cfg file updated - no other changes - Jeff Rueger (jrueger) 13.1 06 Nov 2021 Updated for TNG v13.1 - only cfg file updated - no other changes - Jeff Rueger (jrueger) 13.04 22 Jun 2021 Updated for TNG v13.0.4 and PHP v8.0 by forum user jrueger (some more PHP v8.0 by E Hoppe) 13.0 29 Nov 2020 Resolves conflicts with Robin Richmond's mods 13.0 22 Sep 2020 Updated for TNG v13.0 12.3 06 May 2020 Fix a mistake by Brent Hemphill. 12.3 06 May 2020 Updated for TNG 12.3 conflict with Person Media Title by Brent Hemphill 12.3 20 Mar 2020 Updated for TNG 12.3 by Ken Roy and Ron Krzmarzick 12.1 16 May 2019 Updated to 12.1 15 Apr 2019 Updated for suggest/edit tabs fix by Ron Krzmarzick , code changes only for those tabs, so it still does not support Show photos on one row. 12.1 24 Mar 2019 Updated for TNG 12.1 by Ken Roy to clearly show the conflict with the Mobile Site Enhancements mod. No code changes from V12.1.0.2-alpha, so it still does not support Show photos on one row. 12.1 18 Mar 2019 Updated for TNG 12.1 by JPB Currently does not support Show photos on one row. 12.0 07 July 2018 Corrected error in register.php. Thanks to Hans W for the alert. 12.0 14 May 2018 New version for TNG 12 11.1 10 Jun 2017 French translation was missing a quote. Thanks to Randal Suire for the alert. 11.0 10 Jun 2017 French translation was missing a quote. Thanks to Randal Suire for the alert. 11.1 v11.0.0.3 doesn't install under TNG v11.1.1 - thanks to Jan Holmberg and Harold Craswell for telling me.
(Kept index 3 from all other versions)
Also added section "Un-protect the 'Contact us' link" to the Wiki - thanks to Ingemand for the inspiration. 11.0 18 Jan 2017 Did not protect PDF in familychart.php. Thanks to Glenn for the alert.
11.0.02 11.0 18 Apr 2016 Due to a change in whatsnew.php (TNG v11) all media was protected also when logged in.
Thanks to Rob S for the alert.
29 Mar 2016 A conflict with No_Headstone_Photo_Report has been solved.
Thanks to Eilif N. for the alert. 11.0 18 Mar 2016 Update by Ken Roy for TNG 11.0 - tested by author.
30 Oct 2015 The MM-parameters had %end:% tags. Removed.
The WhatsNew page was only protected in the DD menu. NOT protected at all now.
Both noted by M. Pannier. Thanks.
19 Oct 2015 Protected DD-menu items are now removed from the menus.
If Media is protected, there is no Media DD-menu. See Visualization of this mod.
An error involving multiple Albums when Media is protected, is corrected.
09 Aug 2015 The behaviour of collapsible standard events is now optional (see Edit Option above) 10.0.3 24 Jul 2015 New release. After extensive testing by Jay Wilpolt. 10.0 24 Jul 2015 New release. After extensive testing by Jay Wilpolt. 10.1.2 07 Jul 2015 New.
After a lot of help and suggestions from Martin Pannier it looks like this could be worth Production status.
At the same time the name is changed from Access Panel to Public Access Control.
Dutch and French translations provided by Henny Savenije.
Dropdown menu selections are now protected. 10.1 07 Jul 2015 New
After a lot of help and suggestions from Martin Pannier it looks like this could be worth Production status.
At the same time the name is changed from Access Panel to Public Access Control.
Dutch and French translations provided by Henny Savenije.
Dropdown menu selections are now protected.

Access Panel revision history

Version Date Description
10.1.1.Beta11 9 Jun 2015 Added German (thanks Martin Pannier) and Swedish texts.
whatsnew.php does not require log in any more.
headstones.php and showmap.php are now protected (shows icons and Log in link). cemeteries.php will not show the "All Headstones" link. (Martin!)
Panel name is "Public Access" to emphasize that no user rights/restrictions are set there.
10.1.1.Beta9 2 Jun 2015 Did not install after Relationship Display mod, but before. Fixed. Thanks to Martin Pannier for the alert.
10.1.1.Beta8 1 Jun 2015 A small change to fit better with mobile_site_enhancements mod. Other lines make it not possible to install it before Access panel.
10.1.1.Beta7 31 May 2015 Introduction.

Visualization of this mod

Click here for screen-shots from a fully protected site and of graphic trees if they should be accessible.

The Public Access panel after mod installation: No restrictions are set
The below images show results when Media, Notes and Sources are set to Log in.
Individ's Media section (part), Logged-in view (67%) The same individ's Media section (full), Not logged-in view (67%)
IndMedia1LI67.png IndividualBottomNLI67.png
Protected items will also protect the corresponding Drop-Down menu items
Everything is protected in this example (Public Guest view):

Sites using this mod

If you download and install this mod, please add your TNG site to the table below:

URL User Note Mod-Version TNG-Version User-language Andreas Treichel Public & Private 14​.0​.3​.3 14.0.3 DE,EN,FR,ES,PL C Jegersberg Public/Private 12.0.2 NO,EN
Chubbuck & Ware Genealogy Marc Chubbuck User & Hosting Provider 11.0.1 EN
Our Acadian Family Randal Suire Hide media mod fantastic. 11.1.2 EN,FR User:Ingemand Great mod 11.0.2 SE,EN,DE,DK,NO,ES,FR,NL
Crawford County Genealogy Gateway Frank Bernosky Public site 11.1.1 EN
Your Roots are Showing Harold Craswell Public site 11.1.1 EN Renze Petersohn Public site 11.1.2 EN,DE,NL,FR Hans Weebers Public site 12.0.0 12.0.1beta NL,EN,DE,FR
The Cole / Tanner Family Tree David Cole Public/Private see here see here EN,DE,FR,ES,NL
Lloyd & Lucas - A Merging of Interests Chris Lloyd Public site 12.0.1 EN
Genealogische Datenbank JPB Public site see here see here DE,EN,FR
Baza danych Rodziny Jarocińskich Michał Jarociński non-public site 12.3, T7
Auf den Spuren meiner Ahnen Michael Klein Public/Private
TNG 14.0.3
Familienforschung Scabell Helga Scabell Public / Private 13.0.1 DE,EN,PT
Familenforschung Kattau Uwe Kattau Public/Private 13.0.2 DE
Hangaard Genealogy David Hangard Public/Private 13.0.4 EN,NO
Dabbling in Genealogy Jeff Rueger Public 14.0.3 EN
Your Roots are Showing Harold Craswell Public/Private See Here See Here EN
Solem Genealogy Jan-Thore Solem Private 14.0.2 EN,NO
stone/mott genealogy Albert Stone Private
TNG 14.0.4

TNG Modules Impacted

NOTE: The file config.php is not modified by the mod but will be affected by the actions of the modified file admin_updateconfig.php,
and should be backed up prior to installing this mod.

The following TNG Modules are modified, and should be backed up prior to installing this mod:

  • admin_genconfig.php
  • admin_updateconfig.php
  • ahnentafel.php
  • cemeteries.php
  • descend.php
  • descendtext.php
  • extrastree.php
  • familychart.php
  • familygroup.php
  • functions.php
  • genlib.php
  • getperson.php
  • globallib.php
  • headstones.php
  • mostwanted.php
  • pedbox.php
  • pedigree.php
  • pedigreetext.php
  • personlib.php
  • placesearch.php
  • register.php
  • showmap.php
  • verticalchart.php
  • whatsnew.php (from v11.0.0.2)

The following TNG Modules vill only have re-direction code added to the beginning,
and should also be backed up prior to installing this mod:

  • bookmarks.php
  • browsealbums.php
  • browsemedia.php
  • browsenotes.php
  • browserepos.php
  • browsesources.php
  • gedform.php
  • relateform.php
  • relationship.php
  • reports.php
  • showalbum.php
  • showmedia.php
  • showrepo.php
  • showreport.php
  • showsource.php
  • suggest.php
  • timeline.php

The custom texts will be added to these files, which should also be backed up prior to installing this mod:

  • languages/English/cust_text.php
  • languages/English-UTF8/cust_text.php
  • languages/Dutch/cust_text.php - if present
  • languages/Dutch-UTF8/cust_text.php - if present
  • languages/French/cust_text.php - if present
  • languages/French-UTF8/cust_text.php - if present
  • languages/German/cust_text.php - if present
  • languages/German-UTF8/cust_text.php - if present
  • languages/Swedish/cust_text.php - if present
  • languages/Swedish-UTF8/cust_text.php - if present

These images will be copied to your (root) img folder:

  • xerxxNonotes.png
  • xerxxNoalbums.png
  • xerxxNophotos.png
  • xerxxNodocuments.png
  • xerxxNoheadstones.png
  • xerxxNohistories.png
  • xerxxNorecordings.png
  • xerxxNovideos.png
  • xerxxNocitations.png
  • xerxxNomedia.png