Difference between revisions of "Public Access Control"

From TNG_Wiki
Jump to navigation Jump to search
Line 593: Line 593:
 
| [[User:XerxX|Erik Hoppe]]
 
| [[User:XerxX|Erik Hoppe]]
 
| Mod author.
 
| Mod author.
| Pre-mod!
+
| 10.1.2.1
| 9.1.1!
+
| 10.1.2
 
| Swedish, German, English
 
| Swedish, German, English
 
|-
 
|-

Revision as of 17:38, 16 October 2015

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 {{{mod_last_update}}}
Download link for
TNG 10.1.2
Public_access_control_mod_v10.1.2.1.zip
for
TNG 10.1.1
TNG 10.1.0
Public_access_control_mod_v10.1.0.1.zip
for
TNG 10.0.3
Public_access_control_mod_v10.0.3.1.zip
for
TNG 10.0.2
TNG 10.0.1
TNG 10.0
Public_access_control_mod_v10.0.0.1.zip
Download stats Public Access Control v10.x
Author(s) Erik Hoppe
Homepage Public Access Control (this page)
Mod Support My Mod Support
Contact Developer My Mod Support
Latest Mod 10.0.0.1 for TNG v10.0.0 - 10.0.2
10.0.3.1 for TNG v10.0.3
10.1.0.1 for TNG v10.1.0 - 10.1.1
10.1.2.1 for TNG v10.1.2
Min TNG V 10.0.0
Max TNG V 10.1.2
Files modified
Related Mods
Notes
Author of TNG Colouring Book
Mods by me: At my user page.


Preface

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.

PLEASE NOTE that mod v10.0.0.1 is not tested live. Testers 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 enjoys the company of my Collapsible_Standard_Events mod or Jeff Robison's Show/Hide_Standard_Events mod. (See Edit Option below)


Developer

This mod was developed by Erik Hoppe.
A list of all my mods is found at my user page


Credits

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!


Reported Successes / Failures with other mods

NOTE that this table only shows reports for mod versions 10.1.0.1 and 10.1.2.1.
Other mod versions may show similar results.
Please add to this list and/or report by this Mod Support link, thank you.

Mod By Version Test in
TNG v10.1.1 +
PAC v10.1.0.1
Test in
TNG v10.1.2 +
PAC v10.1.2.1
Installed Before
Public Access
control mod
Installed After
Public Access
control mod
Note
Ancestor_map Réal Charlebois et al v10.1.0.1 Y * Y * Success EH Success EH
Ancestor_map Add 4 placelevels Réal Charlebois et al v10.1.0.0 Y * Y * Success EH Success EH
Burials-More_Details Robin Richmond v10.1.0.11a Y * Y * Success EH Success EH
Census_Plus_International Janice Nation et al v10.1.0.3d Y * Y * Success EH Success EH Only Installed mod (not tables)
Collapse_Family_Children Jeff Robison v10.0.0.1 Y * Y * Success EH Success EH
Count_Descendants Robin Richmond v10.1.0.6 Y * Y * Success EH Success EH
Drop_Down_Menu_Tooltip Jeff Robison v10.0.3.1 Y * Y * (Failure?) EH Success EH (Depends on made Edits?)
Family_Chart_Mod Chris Moss v10.1.0.3b Y * Y * Success EH Success EH
Family_Preview_Mod Jeff Robison v10.1.0.2c Y * Y * Success EH Success EH
Google_Maps_-_More_Place_Levels_Mod Add 4 placelevels Roger Moffat v10.1.0.1 Y * Y * Success EH Success EH
Life_Dates_Mod Roger Mitchell v10.0.3.0 Y * Y * Success EH Success EH
Media_Preview_Fixed Jeff Robison v9.2.2.2 Y No Failure EH Success EH Conflicts with Mobile_Media
Not used in TNG v > 10.1.1
v10.1.2.0 No Y * Success EH Success EH Not used in TNG v < 10.1.2
Mobile_Media Ken Roy v10.1.1.4 Y * No Failure EH Success EH Obsolete for TNG v10.1.2
Mobile_Site_Enhancements Ken Roy v10.1.0.3 Y * No Failure EH Success EH Not used in TNG v > 10.1.1
v10.1.2.4 No Y * Failure EH Success EH Not used in TNG v < 10.1.2
Mobile_Site_No_Previews Ken Roy v10.1.0.3 Y * No Success EH Success EH Obsolete for TNG v10.1.2
Mobile_Site_No_Slideshow Ken Roy v10.1.0.1 Y * No Success EH Success EH Obsolete for TNG v10.1.2
Person_Map mobile_ind_page_person_map Bart 'Roebie' Degryse v10.1.0.2a Y * Y * Success EH Success EH
Private_Media_Mod Chris Moss v10.0.3.2 Y * Y * Success EH Success EH
Relationship_Display_Mod Jeff Robison v10.0.0.1 Y * Y * Success EH Success EH
Responsive_Tables Ken Roy v10.1.0.2a Y * Y * Success EH Success EH
Responsive_Tables Browsesource Ken Roy v10.1.0.2a Y * Y * Success EH Success EH
Responsive_Tables Showmap Ken Roy v10.1.0.1 Y * Y * Success EH Success EH
Show/Hide_Standard_Events Jeff Robison v10.0.0.0 Y Y Success EH Success EH Inst. f. single test only.
Show_Siblings Erik Hoppe et al v10.1.0.2 Y * Y * Success EH Success EH
TextPlus_Charts Robin Richmond v10.1.0.10a Y * Y * Success EH Success EH
World_map_mod F. M. da Silviera et al v10.1.0.1 Y * Y * Success EH Success EH
My own mods (f v10.1.1) listed at my User page Erik Hoppe Misc. Y * Y * Success EH Success EH
 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.

 *) These mods are installed and run 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
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.
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.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


Installation

  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


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.
Pacmodimg2.png
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='http://tng.lythgoes.net/wiki/index.php/Public_Access_Control' target='_blank'>Public Access Control</a> (sep. wind.)";


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.


Revision History

Version Date Description
V10.0.0.1
V10.0.3.1
V10.1.0.1
V10.1.2.1
9 Aug 2015 The behaviour of collapsible standard events is now optional (see Edit Option above)
V10.0.0.0
V10.0.3.0
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...
V10.1.0.0
V10.1.2.0
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

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

The Public Access panel after mod installation: No restrictions are set
AccessPanel.png
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):
AccessFindMenu.png AccessMediaMenu.png AccessInfoMenu.png


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. 10.1.2.1 10.1.2 Swedish, German, English


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


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