Difference between revisions of "Restrict Access mod"

From TNG_Wiki
Jump to navigation Jump to search
(52 intermediate revisions by 15 users not shown)
Line 3: Line 3:
 
| mod_summary    = Blocks access to files ('''except PDFs''') unless user is logged in
 
| mod_summary    = Blocks access to files ('''except PDFs''') unless user is logged in
 
| mod_validation  = The mod is XHTML compliant.[[Image:Valid-xhtml10.png|44px]]
 
| mod_validation  = The mod is XHTML compliant.[[Image:Valid-xhtml10.png|44px]]
| download_link = [http://www.katiandgraham.com/genealogy/ccount/click.php?id=9 restrict_access_V9.0.0.5.zip]<br/> {{Tv90}}{{Tv100}}{{Tv110}}
+
| mod_last_update = 17 June 2018
 +
| download_link = [https://www.katiandgraham.com/genealogy/ccount/click.php?id=71&user={{#replace:{{CURRENTLOGGEDUSER}}}}&page={{PAGENAMEE}} restrict_access_V12.0.1.6.zip]{{Tv1201}}<br/>[https://www.katiandgraham.com/genealogy/ccount/click.php?id=9&user={{#replace:{{CURRENTLOGGEDUSER}}}}&page={{PAGENAMEE}} restrict_access_V9.0.0.5.zip]<br/> {{Tv90}}{{Tv100}}{{Tv110}}{{Tv120}}
 
| download_stats = [http://www.katiandgraham.com/genealogy/ccount/index.php?action=stats&groupid=5 See download statistics]
 
| download_stats = [http://www.katiandgraham.com/genealogy/ccount/index.php?action=stats&groupid=5 See download statistics]
 
| mod_author      = Graham Chamberlain<br />Config file by Graham Chamberlain
 
| mod_author      = Graham Chamberlain<br />Config file by Graham Chamberlain
Line 9: Line 10:
 
| mod_support    = [http://www.katiandgraham.com/genealogy/mod_support.php My Mod Support]
 
| mod_support    = [http://www.katiandgraham.com/genealogy/mod_support.php My Mod Support]
 
| mod_contact    = [http://www.katiandgraham.com/genealogy/mod_support.php Contact Developer]
 
| mod_contact    = [http://www.katiandgraham.com/genealogy/mod_support.php Contact Developer]
| mod_version    = V9.0.0.3 for TNG V10+
+
| mod_version    = V12.0.1.6 for TNG V12.0.1+
 
| min_TNG_ver    = 9.0.0 using integrated Mod Manager
 
| min_TNG_ver    = 9.0.0 using integrated Mod Manager
| max_TNG_ver    = 11+
+
| max_TNG_ver    = 12+
 
|  TNG_file_list  = showlog.php, ajx_logxml.php, anniversaries.php,  showsource.php, browsenotes.php, browsemedia.php, browsealbums.php, showmedia.php,  languages/English/cust_text.php, languages/English-UTF8/cust_text.php
 
|  TNG_file_list  = showlog.php, ajx_logxml.php, anniversaries.php,  showsource.php, browsenotes.php, browsemedia.php, browsealbums.php, showmedia.php,  languages/English/cust_text.php, languages/English-UTF8/cust_text.php
| related_mods    = [[Media Privacy Mod]]<br/>[[Restrict Image Preview]]
+
| related_mods    = [[Media Privacy Mod]]<br/>[[Restrict Image Preview]]<br/>[[Public Access Control]]
 
| notes          =  
 
| notes          =  
 
}}
 
}}
Line 40: Line 41:
 
# Extract the downloaded zip file to your ''''mods''' folder.  
 
# Extract the downloaded zip file to your ''''mods''' folder.  
 
#  Follow the normal automated installation for Mod Manager, as shown in  the example [[Mod Manager - Installing Config Files]] to install the  appropriate '''source_title_display.cfg''' file.
 
#  Follow the normal automated installation for Mod Manager, as shown in  the example [[Mod Manager - Installing Config Files]] to install the  appropriate '''source_title_display.cfg''' file.
 +
 +
== Manual Customisation ==
 +
 +
If you wish to allow browsing of media but still disallow viewing the individual media items, you should remove the directive for browsemedia.php. Alternatively, you could limit the media restriction to browsing specific collections. The following example would only block the browsing of 'histories' for non-logged-in users:
 +
 +
  if(( ! $currentuser )&&($mediatypeID=="histories")) {
 +
      $showguest=1;
 +
      include("extensions/noaccess.php");
 +
      exit;
 +
      }
 +
 +
and to limit the restriction to 'histories' and 'photos':
 +
 +
  if(( ! $currentuser )&&($mediatypeID=="histories" || $mediatypeID=="photos")) {
 +
      $showguest=1;
 +
      include("extensions/noaccess.php");
 +
      exit;
 +
      }
 +
'''NOTE''': It is not possible to use the above method to limit the viewing of individual images (showmedia.php) to a specific collection
  
  
Line 66: Line 86:
 
! Date
 
! Date
 
! Contents
 
! Contents
 +
|-
 +
| v12.0.1.6
 +
| 22 May 2018
 +
| made change to comply with showsource.php in TNG v12.0.1
 
|-
 
|-
 
| v9.0.0.5
 
| v9.0.0.5
Line 98: Line 122:
 
| [[User:hiraeth|Graham Chamberlain]]
 
| [[User:hiraeth|Graham Chamberlain]]
 
| ...
 
| ...
| 9.0.0.4/10.1.3
+
| 12.0.1.6/12.0.1
 
| English, French, German, Spanish, Dutch  
 
| English, French, German, Spanish, Dutch  
 
|-
 
|-
Line 107: Line 131:
 
| EN
 
| EN
 
|-
 
|-
| [http://www.duttongenealogy.com The Dutton's of Vermont]
+
| [http://www.duttongenealogy.com The Dutton's of Vermont Genealogy & History]
| [[User:Darrin65|Darrin Dutton]]
+
| [[User:darrin65|Darrin Dutton]]
|
+
| Public Site
| 9.0.0.3/10.1.0
+
| 9.0.0.5/11.1.1
 
| EN
 
| EN
 
|-
 
|-
Line 116: Line 140:
 
| [[User:laxref93|John Kleinmann]]
 
| [[User:laxref93|John Kleinmann]]
 
|
 
|
| 9.0.0.5 / 11.0.2
+
| 12.0.1.6 / 12.0.2
 
| EN
 
| EN
 
|-
 
|-
Line 131: Line 155:
 
| EN
 
| EN
 
|-
 
|-
| [http://www.kmtrees.com Roots & Relatives Remembered]
+
| [https://www.kmtrees.com Roots & Relatives Remembered]
 
| [[User:tngrlkrz| Ron Krzmarzick]]
 
| [[User:tngrlkrz| Ron Krzmarzick]]
| Partially-Public
+
| Public & Private
| 9.0.0.5/11.0.2
+
| [https://www.kmtrees.com/rrmodcompare_report.php?power=basic&cachemethod=3&sb=filename&aformat=full&statushilite=1&b1=0 See Here]
 +
| EN,DE,CS,ES
 +
|-
 +
| [https://www.craxford-family.co.uk/ The Extended Craxford Family Magazine]
 +
| [[User:Newfloridan| Alan Craxford]]
 +
|
 +
| 9.0.0.5/10.1.3
 
| EN
 
| EN
 
|-
 
|-
 +
| [https://www.ccggpa.org/cemeteries/index.php/ Crawford County Genealogy Gateway]
 +
| [[User:Fraber| Frank Bernosky]]
 +
|
 +
| 9.0.0.5/11.1
 +
| EN
 +
|-
 +
| [https://www.rintoulbowman.com/ Rintoul/Bowman Family]
 +
| [[User:Adrintoul|Andrew Rintoul]]
 +
| Public/Private
 +
| 9.0.0.5 / 12.0
 +
| EN, DE, ES, FR
 +
|-
 +
| [http://racine-ad.fr/TNG/index.php Racine d'Alsace]
 +
| J-Louis Valory
 +
| Public-Private - Template 17
 +
| 12.0.1.6/12.0.1
 +
| French
 +
|-
 +
| [https://www.gambrillfamilytree.com Gambrill Family Tree]
 +
| [[User:bobbyfamilytree| Bobby Gambrill]]
 +
| Public
 +
| 9.0.0.5/11.1.2
 +
| EN
 +
|-
 +
| [https://acadianfamily.com Our Acadian Family]
 +
| [[User:Randal Suire| Randal Suire]]
 +
| Public/Private Media
 +
| 9.0.0.5/11.1.2
 +
| EN, FR
 +
|-
 +
| [https://www.martius-familie.de/ Martius family]
 +
| [[User:Hemar|Hendrik Martius]]
 +
| Half public
 +
| 12.0.0.6 / 12.0.1
 +
| DE, EN, FR, NL
 +
|-
 +
| [https://lloyd-lucas.kiwi.nz Lloyd & Lucas - A Merging of Interests]
 +
| [[User:ChrisLnz|Chris Lloyd]]
 +
| Public site
 +
| 12.0.1.6/12.0.1
 +
| English
 
|}
 
|}
  
Line 142: Line 213:
 
[[Category: Mods for TNG v10]]
 
[[Category: Mods for TNG v10]]
 
[[Category: Mods for TNG v11]]
 
[[Category: Mods for TNG v11]]
 +
[[Category: Mods for TNG v12]]
 
[[Category:showlog.php mods]]
 
[[Category:showlog.php mods]]
 
[[Category:ajx_logxml.php mods]]
 
[[Category:ajx_logxml.php mods]]

Revision as of 13:50, 19 November 2019

Restrict Access Mod
Summary Blocks access to files (except PDFs) unless user is logged in
Validation The mod is XHTML compliant.Valid-xhtml10.png
Mod Updated 17 June 2018
Download link restrict_access_V12.0.1.6.zip
TNG 12.0.1


restrict_access_V9.0.0.5.zip

TNG 9.0
TNG 10.0
TNG 11.0
TNG 12.0
Download stats See download statistics
Author(s) Graham Chamberlain
Config file by Graham Chamberlain
Homepage Restrict Access mod (This page)
Mod Support My Mod Support
Contact Developer Contact Developer
Latest Mod V12.0.1.6 for TNG V12.0.1+
Min TNG V 9.0.0 using integrated Mod Manager
Max TNG V 12+
Files modified
showlog.php, ajx_logxml.php, anniversaries.php, showsource.php, browsenotes.php, browsemedia.php, browsealbums.php, showmedia.php, languages/English/cust_text.php, languages/English-UTF8/cust_text.php
Related Mods
Notes


Purpose of Mod

This mod is intended for those with open access to their TNG site but who wish to disable access to media and other selected files for non-registered users. It allows access to the selected files only for logged-in users. If a non-logged-in user tries to access the relevant file they will see a template-formatted page that informs them they are not authorised to view that file and a links to the Home page and Previous page.

NOTE:

  • The mod does not currently inhibit access to PDF media
  • This mod is not required if your site is 'closed' and requires log-in


Mod Developer

The Mod Developer is Graham Chamberlain.

Mod Manager config files provided by Graham Chamberlain.


Automated Installation

  1. Download the appropriate file for your TNG version from the download links in the mod summary area in the upper right.
  2. Extract the downloaded zip file to your 'mods folder.
  3. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the appropriate source_title_display.cfg file.

Manual Customisation

If you wish to allow browsing of media but still disallow viewing the individual media items, you should remove the directive for browsemedia.php. Alternatively, you could limit the media restriction to browsing specific collections. The following example would only block the browsing of 'histories' for non-logged-in users:

 if(( ! $currentuser )&&($mediatypeID=="histories")) { 
     $showguest=1; 
     include("extensions/noaccess.php"); 
     exit; 
     } 

and to limit the restriction to 'histories' and 'photos':

 if(( ! $currentuser )&&($mediatypeID=="histories" || $mediatypeID=="photos")) { 
     $showguest=1; 
     include("extensions/noaccess.php"); 
     exit; 
     }

NOTE: It is not possible to use the above method to limit the viewing of individual images (showmedia.php) to a specific collection


Further Application / Customisation

The principles used in the directives of this mod to limit access also can be applied to other files.

Additional links can be provided for the Restriction Warning page by appropriately editing mods/restrict_access/noaccess.php and then reinstalling the mod.

The cfg file can be edited to suit the user's requirements:

  1. add or remove directives for affected files: Access Log, All Media, Anniversaries & Dates, Calendar, Notes and Sources
  2. change the text variables
    $text['authorise'] = "You are not authorised to view this page";
    and/or
    $text['regfam'] = "To view this resource you must be a family member and register for a user-account";
    to suit your preferred description
  3. add appropriate language directives for your site (do not change the default English language directives other than to give a different text definition as described in the previous point.

Visualisation

This is how the standard Restriction Warning appears in template8: Noaccess.png

Revision History

Version Date Contents
v12.0.1.6 22 May 2018 made change to comply with showsource.php in TNG v12.0.1
v9.0.0.5 25 May 2016 correct wikipage link and adds text (UTF-8) variable for Danish
v9.0.0.4 4 February 2016 adds text variable 'regfam' missing from v9.0.0.3 and text (UTF-8) variables for Dutch, French, German and Spanish
v9.0.0.3 22 April 2012 adds text variable 'goback' missing from v9.0.0.2
v9.0.0.2 5 April 2012

TNG User 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
Chamberlain & Eidenbenz Genealogy Graham Chamberlain ... 12.0.1.6/12.0.1 English, French, German, Spanish, Dutch
Kemp(e) Family History Andrew Kemp see User:Kempons EN
The Dutton's of Vermont Genealogy & History Darrin Dutton Public Site 9.0.0.5/11.1.1 EN
Kleinmann Genealogy John Kleinmann 12.0.1.6 / 12.0.2 EN
Turner Mob Genealogy Margaret Grogan Turner 9.0.0.3/10.1.1 EN
Grogan Mob Genealogy Margaret Grogan Turner 9.0.0.3/10.1.1 EN
Roots & Relatives Remembered Ron Krzmarzick Public & Private See Here EN,DE,CS,ES
The Extended Craxford Family Magazine Alan Craxford 9.0.0.5/10.1.3 EN
Crawford County Genealogy Gateway Frank Bernosky 9.0.0.5/11.1 EN
Rintoul/Bowman Family Andrew Rintoul Public/Private 9.0.0.5 / 12.0 EN, DE, ES, FR
Racine d'Alsace J-Louis Valory Public-Private - Template 17 12.0.1.6/12.0.1 French
Gambrill Family Tree Bobby Gambrill Public 9.0.0.5/11.1.2 EN
Our Acadian Family Randal Suire Public/Private Media 9.0.0.5/11.1.2 EN, FR
Martius family Hendrik Martius Half public 12.0.0.6 / 12.0.1 DE, EN, FR, NL
Lloyd & Lucas - A Merging of Interests Chris Lloyd Public site 12.0.1.6/12.0.1 English