AccessRestriction

Obsolete This mod is obsolete and can not be downloaded. See Public Access Control mod. Obsolete


AccessRestriction
Summary Restrict access to Media and Notes. Optionally also Repos and Sources
Validation
Mod Updated 19 May 2015
Download link NO DOWNLOAD
Download stats
Author(s) Erik Hoppe
Homepage AccessRestriction (this page)
Mod Support No Support
Contact Developer
Latest Mod 9.1.1.2 for TNG v9.1.1 and above
Min TNG V 9.1.1
Max TNG V 9.2.2
Files modified
Related Mods
Public Access Control for TNG v10
Restrict_Access_mod by Graham Chamberlain
Notes
Author of TNG Colouring Book
Mods by me: At my user page.


Preface

I want to upgrade my site (TNG v9.1.1) sometime after the summer and have set up a local test-v10.1.1 site. But as I want to keep all the functionality from all my hard-coded modifications, I have to write mods for v10.1.1.

Some of my mods may very well do the same things, or nearly, as other mods already posted.
I'm not posting these mods to compete or compare or claim anything but as I'm writing them and they are tested, why not post them here?

My mods work exactly as I want them to and I know that they don't have conflicts with eachother, and that's why I prefer them before other mods, even if they do exactly the same thing.

If you like a mod that's great, if not; that's fine too.
As I said: I'm not competing - just writing what I need and posting for anyone to use, modify or discard.

As i only have a local TNG v10 site, I can't show a live example of some of the mods. If you install one: Please add the URL to the Sites using this mod list at that page. Thank you.
(I link to my v9.1.1 site where the hard-coded versions can be seen)

/Erik


There is another mod taking care of "the rest": The AccessRestriction_More mod.


Two versions of each mod

There are two versions of each mod .cfg-file in the .zip-archives:

  • AccessRestriction_mod_vx.x.x.x.cfg (will protect all Media, Notes, Repositories and Sources)
  • AccessRestriction_mod_vx.x.x.xMAN.cfg (will only protect Media And Notes)


Purpose of the mod

To show not logged-in visitors enough data to help them find out if they are related to us, and at the same time show that there is a lot more (and more interesting things) to find if they become registered users.
We also regard our Media and Notes as private property that should not be viewed by the public.

  • If a visitor is not logged in, the mod will not display Media, Notes, Repositories * or Sources *.
  • Instead there will be an icon and a log-in link, if there should be something to display.
  • In the case of more than one photo (f.ex.), only one icon/link is displayed.
  • The mod will not show the PDF printing option in the Tabs bar for tabs Individual and Family if the visitor is not logged in (Notes are printed).
  • The v10 mod will not show the More details / Less details switch in ahnentafel.php and register.php if the visitor is not logged in (Notes can be displayed).
  • The mod will also require log-in to access the following pages:
  1. browsealbums.php
  2. browsedocs.php **
  3. browseheadstones.php **
  4. browsemedia.php
  5. browsenotes.php
  6. browsephotos.php **
  7. browserepos.php *
  8. browsesources.php *
  9. showalbum.php
  10. showmedia.php
  11. showrepo.php *
  12. showsource.php *
  13. whatsnew.php
    * = Not the MAN-versions
    ** = via browsemedia.php


What the mod doesn't do

The mod may not be able to protect items displayed by other mods, depending on how they do it.
The mod may not be able to protect items displayed on the index page, f. ex. a "Featured" or a "Random" photo.
The mod doesn't give "tooltips" for the camera icons in pedigree.php and descend.php
(v10) The mod doesn't know which media-icon to display (not logged-in) for media inside standard events (Birth, Death...). Will use the deafult custom-media icon (padlock).


Developer

This mod was developed by Erik Hoppe

A sincere Thank You to Ken Roy and Rick Bisbee for the solution of a tricky bug and to Ken also for testing the mod v0 in TNG v10.1.0.
And also Many Thanks to Jay1 for testing, patience, support and suggestions.


Requirements

TNG version: 9.1.0
  • An understanding that the mod was built on TNG v9.1.1 files but tested and installed in TNG v9.2.2
  • 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 v9.x)


Installation

  1. Download the zip file for your TNG version, shown in the summary in the upper right corner of the page.
  2. Extract it and you will get a folder. Open it.
  3. It will contain TWO .cfg files:
    AccessRestriction_mod_vx.x.x.x.cfg and
    AccessRestriction_mod_vx.x.x.xMAN.cfg
    and the accompanying folder AccessRestrictionXXX (dep. on version).
  4. The MAN version will protect Media And Notes while the other will also protect Repositories and Sources.
    Decide which one to use and discard the other one.
  5. Move/copy the folder AccessRestrictionXXX and only the .cfg file of your choice into the mods folder or FTP the extracted file and folder with its contents to your mods folder.
    Do not store both .cfg-files in the mods folder as that will confuse the ModManager (and eventually yourself).
  6. 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


Custom Text Additions

Note: The config file includes the English language custom text. The v10 mod also includes German and Swedish texts if they are present in your 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['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 three last are used for reversed word-order and MUST be present)


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.


Revision History

Version Date Description
V10.1.0.0 10 May 2015 Introduction.
V10.1.0.1 11 May 2015 Custom event's image was displayed.
Icons were displayed in Ahnentafel and Register.
V9.1.1.1
V9.1.1.1man
V10.1.0.1man
11 May 2015 Introduction.
V9.1.1.2
V9.1.1.2man
V10.1.0.2
V10.1.0.2man
14 May 2015 Closed six "backdoors" - two thanks to Jay1
Re-worded the tooltips and added to the icons that didn't have (thanks Jay1)
V10.0.3.1
V10.0.3.1man
16 May 2015 Confirmed working in TNG 10.0.3 and still in TNG 10.1.1 so this version makes the prev v10 mods obsolete
Also re-made the custom texts
V10.0.3.2
V10.0.3.2MAN
19 May 2015 The media-icon, when not logged-in, wasn't displayed for media inside standard events (Birth, Death...)
Also a code-change to avoid conflict with Private_Media_Mod by Chris Moss
V10.1.0.3
V10.1.0.3MAN
19 May 2015 Because of the code-change (above) there is now a separate version for TNG v10.1
(I continued the sequence numbers from the obsolete v10.1 mod)
V10.1.0.3
V10.1.0.3MAN
7 July 2015 These versions are obsolete! See Public Access Control mod


Visualization of this mod (v10.0.3.1)

There are many more screenshots in full size - Click here

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. Please read Preface Pre-mod 9.1.1 Swedish, German, English
Jansson och Ellburg (Not Wiki user) Installed by author 9.1.1.2 9.2.2 Swedish, English
Allen Prunty Alprunty Installed by Allen 10.0.3.1 10.1.1 English

TNG Modules Impacted

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

  • ahnentafel.php *
  • familygroup.php
  • getperson.php
  • globallib.php
  • pedbox.php
  • personlib.php
  • placesearch.php
  • register.php *
  • languages/English/cust_text.php
  • languages/English-UTF8/cust_text.php
  • languages/German/cust_text.php *
  • languages/German-UTF8/cust_text.php *
  • languages/Swedish/cust_text.php *
  • languages/Swedish-UTF8/cust_text.php *
    * = Not the TNG v9-versions

The following modules will get redirection code to login.php at the beginning (nothing more)
and should also be backed up:

  • browsealbums.php
  • browsemedia.php
  • browsenotes.php
  • browserepos.php *
  • browsesources.php *
  • showalbum.php
  • showmedia.php
  • showrepo.php *
  • showsource.php *
  • whatsnew.php
    * = Not the MAN-versions

The following icons are added 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