Public Access Control

Revision as of 09:05, 1 June 2015 by XerxX (talk | contribs)
Access panel
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 {{{mod_last_update}}}
Download link for
TNG 10.1.1
Access_panel_mod_v10.1.1.Beta8.zip
Download stats Access panel v10.1.1.Beta8
Author(s) Erik Hoppe
Homepage Access panel (this page)
Mod Support My Mod Support
Contact Developer My Mod Support
Latest Mod 10.1.1.Beta8
Min TNG V 10.1.1
Max TNG V 10.1.1
Files modified
Related Mods
Notes
Author of TNG Colouring Book
Mods by me: At my user page.


Preface

This is a compilation of my mods AccessRestriction and AccessRestriction_More, made for TNG v10.1.1.

This mod makes both the mods obsolete for use with TNG v10.1.1

As this mod doesn't make any database calls it may be possible to use it in earlier TNG versions.
Please report if you try it.


Purpose of the mod

Introduces a panel in Set Up >> General Settings: The 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.


Why "Beta"?

The main purpose of posting this version of the mod is that I hope to have reports of failure and successes when it is used with other mods.

This mod makes lots of changes throughout your TNG system and there will, inevitably I think, be conflicts with other mods.
If I'm alerted of those mods I will try to modify the code to suit them too (and/or talk to the mod maker).

I would also like to know if you have success or failure installing the mod in a TNG v10.0.x environment.


Developer

This mod was developed by Erik Hoppe


Credits

My sincere Thank You to Henny Savenije for his wonderful patience and thorough testing of this mod.


Reported Successes / Failures with other mods

Please add to this list and/or report by this Mod Support link, thank you.

Mod By Version Installed Before
Access p. mod
Installed After
Access p. mod
Note
Ancestor_map Réal Charlebois et al v10.1.0.1 Success E Hoppe* Success E Hoppe*
Ancestor_map Add 4 placelevels Réal Charlebois et al v10.1.0.0 Success E Hoppe* Success E Hoppe*
Census_Plus_International Janice Nation et al v10.1.0.3d Success E Hoppe* Success E Hoppe* Only Installed mod
Count_Descendants Robin Richmond v10.1.0.6 Success E Hoppe* Success E Hoppe*
Family_Chart_Mod Chris Moss v10.1.0.3a Success E Hoppe* Success E Hoppe*
Google_Maps_-_More_Place_Levels_Mod Roger Moffat v10.1.0.1 Success E Hoppe* Success E Hoppe* (Add 4 placelevels)
Family_Preview_Mod Jeff Robison v10.1.0.2c Success E Hoppe* Success E Hoppe*
Life_Dates_Mod Roger Mitchell v10.0.3.0 Success E Hoppe* Success E Hoppe*
Person_Map Bart 'Roebie' Degryse v10.1.0.2a Success E Hoppe* Success E Hoppe* (Mobile Ind...)
TextPlus_Charts Robin Richmond v10.1.0.10a Success E Hoppe* Success E Hoppe*
My own mods (f v10.1.1) listed at my User page Erik Hoppe Misc. Success E Hoppe* Success E Hoppe*
  • ) All mods I report are installed together.


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, 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 Access panel is/will be installed and/or the item is/will be hidden.
If the Access panel 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


"Associations" are Not protected

The TNG "event" named Associations is not protected by this mod.
I have yet to find out what it really is and where, when and why it is displayed.
Quite frankly: I have read some of the Help but I have never used it, not even tried it, yet.

Do you think this is a vital part that should be included in the panel?


Requirements

TNG version: 10.1.1
  • 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.1.1)


Before installation

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


Installation

  1. Click on the download link, 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 AccessPanel_1011 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.


In the event of a problem


After Installation

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

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: Access panel settings


Custom Text Additions

Note: The config file includes only the English language custom text.
For other languages you can modify the config file to add the custom text or manually add to whatever language you like.
(A small preparation for, f.ex, the German language is done: See the last entries)

English custom text For Reference Only!


// text.php is not yet read when these are used, so they have to be set
$text['hide'] = "Hide";
$text['media'] = "Media";
$text['notes'] = "Notes";
$text['repositories'] = "Repositories";
$text['sources'] = "Sources";
$text['reports'] = "Reports";
$text['relationship'] = "Relationship";
$text['extractgedcom'] = "GEDCOM";
$text['suggest'] = "Suggest";
$text['ancestors'] = "Ancestors";
$text['descendants'] = "Descendants";
$text['timeline'] = "Timeline";
$text['share'] = "Share";
$text['print'] = "Print";
$text['bookmark'] = "Bookmark";
$text['login'] = "Log in";

$text['xerxxProtectPanel'] = "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['xerxxProtectTSelectionsEnd'] = "<br />when the resp. Tab is <i>shown</i>";
$text['xerxxProtectAhnentafel'] = "Ahnentafel";
$text['xerxxProtectPDF'] = "PDF";
$text['xerxxProtectRegister'] = "Register";

$text['xerxxProtectHideSet'] = "<u>When "" . $text['hide'] . "" is set:</u> ";
$text['xerxxProtectLogInSet'] = "<u>When "" . $text['login'] . "" 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['xerxxNoaccountDEView'] = "";
$text['xerxxNoaccountDEListen'] = "";
$text['xerxxNoaccountDERead'] = "";

The last three can be used for the German language, f.ex, and MUST be present in all languages.


Uninstalling the mod

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

  1. click the Remove button to uninstall the mod and then
  2. click the Delete button to delete the config file from the mods folder.
  3. Go to Setup >> General Settings and click the Save button to clear the config.php file from the protection flags.


Revision History

Version Date Description
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.

The 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%)
   


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
Andersson, Hoppe, Sahlin, Thorell Erik Hoppe Mod author. Pre-mod! 9.1.1! Swedish, German, English


TNG Modules Impacted

NOTE: The file config.php is not midified 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
  • descend.php
  • descendtext.php
  • extrastree.php
  • familygroup.php
  • genlib.php
  • getperson.php
  • globallib.php
  • pedbox.php
  • pedigree.php
  • pedigreetext.php
  • personlib.php
  • placesearch.php
  • register.php
  • verticalchart.php


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
  • whatsnew.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


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