Difference between revisions of "Public Access Control"
(→Sites using this mod)
|Line 605:||Line 605:|
Revision as of 13:50, 12 March 2019
|Downloads of Public Access Control are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account|
|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.|
|Mod Updated||07 Jul 2018|
|Download stats||Public Access Control|
|Homepage||Public Access Control (this page)|
|Mod Support||TNG Community Forums: TNG Specific - Code Discussion - Addons|
|Latest Mod||10.0.0.3 for TNG v10.0.0 - 10.0.2|
10.0.3.3 for TNG v10.0.3
10.1.0.3 for TNG v10.1.0 - 10.1.1
10.1.2.3 for TNG v10.1.2 - 10.1.3
220.127.116.11b for TNG v11.0.x
18.104.22.168b for TNG v11.1.1
22.214.171.124 for TNG v12.x
|Min TNG V||10.0.0|
|Max TNG V||12.x|
These mods make all the above mods obsolete for use with TNG v10.
PLEASE NOTE that mod v10.0.0.2 is not tested live. Report wanted!
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 was developed by Erik Hoppe.
A list of all my mods is found at my user page
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!
Un-Protect The "Contact Us" Link On Index.php
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:
and between the php and the \ you add:
so it looks like this:
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&xpTpart=mostwanted\">contact us</a></span>. We look forward to hearing from you.";
Do the same for each language you support at your site.
NOTE that this table only shows reports for mods installed with some remark, under P.A.C. mod versions 10.1.0.2 and 10.1.2.2.
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 +
| Test in
TNG v10.1.2 +
| Installed Before
| Installed After
+ PAC v126.96.36.199
|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||v188.8.131.52||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|
|v184.108.40.206||No||No||Failure EH||Success EH||Yes (Only tested in TNG v11-environm.)|
|Restrict_Image_Preview||Graham Chamberlain||v10.1.2.4||TNG 10.1.3 + PAC 10.1.2.2b||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||v220.127.116.11||Not applicable||Failure BH||Failure BH||Yes||Reported by Bill Herndon|
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 by Robin Richmond can NOT be used with the current versions of PAC!
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.
Order to UNINSTALL:
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.
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.
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, wether 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)
- If you have installed AccessRestriction, AccessRestriction More and/or Access Panel mods, you must first
- Uninstall the one(s) you have
- Remove the .cfg file(s) and the folder AccessRestrictionX from your mods folder
- Check the table above to see if you have to uninstall any of your mods while installing this one.
For example, the following mods must be uninstalled so the Public Access Control mod can be installed.
They can be re-installed after installing the Public Access Control mod.
- Click on the download link for your TNG version, shown in the summary in the upper right corner of the page.
- Un-zip the downloaded file and you will find a folder: Open it.
- Move/copy/FTP the .cfg file and the folder named PublicAccessControl_10 to the mods folder of your TNG system.
- Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the mod.
- 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
- Try using the Mod Manager Remove capability
- Replace all affected files with the copies you made before the installation.
- TNG Community Forums: TNG Specific - Code Discussion - Addons
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.|
|Not logged in view Default: "Christened" = user expanded.|
|Not logged in view: Optional behaviour|
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)|
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='http://tng.lythgoes.net/wiki/index.php/Public_Access_Control' target='_blank'>Public Access Control</a> (sep. wind.)";
Uninstalling the mod
- Check the table above to see if you have to uninstall any of your mods while uninstalling this one.
For example, the following mods must be uninstalled so the Public Access Control mod can be uninstalled.
They can be re-installed after uninstalling the Public Access Control mod.
If you want to completely Remove (uninstall) this mod and all its tables, you should
- Click the Uninstall button to uninstall the mod and then
- 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.
|V18.104.22.168||7 July 2018||Corrected error in register.php. Thanks to Hans W for the alert.|
|V22.214.171.124||14 May 2018||New version for TNG v12|
|10 Jun 2017||French translation was missing a quote. Thanks to Randal Suire for the alert.|
|V126.96.36.199||29 May 2017|| v188.8.131.52 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.
|V184.108.40.206||18 Jan 2017|| Did not protect PDF in familychart.php|
Thanks to Glenn for the alert.
|V220.127.116.11||18 April 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 March 2016|| A conflict with No_Headstone_Photo_Report has been solved.|
Thanks to Eilif N. for the alert.
|V18.104.22.168||18 March 2016||Update by Ken Roy for TNG v11.0.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.
|9 Aug 2015||The behaviour of collapsible standard events is now optional (see Edit Option above)|
|24 July 2015|| Introduction.|
After extensive testing by Jay Wilpolt of the 10.0.3.0 version, it is released.
V10.0.0.0 is looking for testers...
|7 July 2015|| Introduction.|
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
|V10.1.1.Beta11||9 June 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.
|V10.1.1.Beta9||2 June 2015||Did not install after Relationship Display mod, but before. Fixed. Thanks to Martin Pannier for the alert.|
|V10.1.1.Beta8||1 June 2015||A small change to fit better with mobile_site_enhancements mod. Other lines make it not possible to install it before Access panel.|
|V10.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.
|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:
|Andersson, Hoppe, Sahlin, Thorell||Erik Hoppe||Mod author||22.214.171.124b||11.1.2||SE, GB, DE (flags top left)|
|Jegersberg.com||C Jegersberg||Public/Private||126.96.36.199||12.0.2||NO, EN|
|Chubbuck & Ware Genealogy||Marc Chubbuck||User & Hosting Provider||V10.1.2.2||11.0.1||EN|
|Our Acadian Family||Randal Suire||Great hide media mod.||V188.8.131.52b||11.1.2||EN, FR|
|Ingemand||Great mod||184.108.40.206||11.0.2||SE, GB, DE , DK, NO, ES, FR,NL|
|Crawford County Genealogy Gateway||Frank Bernosky||Public site||220.127.116.11||11.1.1||English|
|Your Roots are Showing||Harold Craswell||Public site||18.104.22.168||11.1.1||English|
|Familiestamboom.frl||Renze Petersohn||Public site||22.214.171.124B||11.1.2||Eng, Deu, Ned, Fra|
|Geneagraphie.com||Hans Weebers||Public site||12.0.0||12.0.1beta||NL, EN, DE, FR|
|Cole / Tanner Family Tree||David Cole||Public/Private||see here||see here||English|
|Lloyd & Lucas - A Merging of Interests||Chris Lloyd||Public site||126.96.36.199||12.0.1||English|
|Current info on my user page||JPB||Public site||see here||see here||DE, FR, EN|
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:
- whatsnew.php (from v188.8.131.52)
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:
The custom texts will be added to these files, which should also be backed up prior to installing this mod:
- 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: