Difference between revisions of "Media Privacy Mod"

From TNG_Wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
| mod_summary    = Blocks access to media files unless user is logged in
 
| mod_summary    = Blocks access to media files 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 = [[Media:Media_Privacy_V9.0.0.3.zip | Media_Privacy_v9.0.0.3.zip]][[Media:Media_Privacy_V9.0.0.1.zip | Media_Privacy_v9.0.0.1.zip]] for {{Tv90}}<hr /> [[Media:Media_Privacy_V8.1.3.zip|Media_Privacy_v8.1.3.zip]] for  {{Tv813}}<hr />
+
| download_link = [[Media:Media_Privacy_V9.0.0.3.zip | Media_Privacy_v9.0.0.3.zip]] for {{Tv90}}<hr /> [[Media:Media_Privacy_V8.1.3.zip|Media_Privacy_v8.1.3.zip]] for  {{Tv813}}<hr />
 
| mod_author      = Graham Chamberlain<br />Config file by Graham Chamberlain
 
| mod_author      = Graham Chamberlain<br />Config file by Graham Chamberlain
 
| mod_url        = [[Media Privacy Mod]] (This page)
 
| mod_url        = [[Media Privacy Mod]] (This page)
Line 106: Line 106:
 
| [[User:hiraeth|Graham Chamberlain]]
 
| [[User:hiraeth|Graham Chamberlain]]
 
| ...
 
| ...
| 9.0.0.1/9.0.0
+
| 9.0.0.4/9.0.2
 
| English, French, German, Spanish  
 
| English, French, German, Spanish  
 
|-
 
|-

Revision as of 11:55, 12 May 2012

Media Privacy Mod
Summary Blocks access to media files unless user is logged in
Validation The mod is XHTML compliant.Valid-xhtml10.png
Mod Updated {{{mod_last_update}}}
Download link Media_Privacy_v9.0.0.3.zip for
TNG 9.0

Media_Privacy_v8.1.3.zip for
TNG 8.1.3

Download stats {{{download_stats}}}
Author(s) Graham Chamberlain
Config file by Graham Chamberlain
Homepage Media Privacy Mod (This page)
Mod Support My Mod Support
Contact Developer Use Contact form on developer's website
Latest Mod V9.0.0.3 for TNG V9
V8.1.3 for TNG V8
Min TNG V 8.0.0 or 9.0.0 using integrated Mod Manager
TNG 7.1.0 requires manual installation of Mod Manager
Max TNG V 8.1.3 / 9.0.2
Files modified
browsemedia.php, browsealbums.php, showmedia.php, languages/English/cust_text.php, languages/English-UTF8/cust_text.php
Related Mods
Notes


Purpose of Mod

To allow access to media files only for logged-in users. If a non-logged-in user tries to access the relevant file they will see a message that informs them they are not authorised to view that file and a link to the Home page.

The method used in this mod can be applied to any file to which one wishes to restrict access.

Mod Developer

The Mod Developer is Graham Chamberlain.

Mod Manager config file 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. You could also amend one or more directives to limit the media restriction to specific collections. The following example would only block '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; 
     } 


Further Application

The principles used in the directives of this mod to limit access also can be applied to other files; for example: showlog.php; anniversaries.php; showsource.php, browsenotes.php.


Visualisation (php version)

This is how the standard Restriction Warning appears in template8: Restrict access.jpg


Revision History

Version Date Contents
v9.0.0.3 22 April 2012 adds text variable 'goback' missing from v9.0.0.2
v9.0.0.2 5 April 2012 php, Template-related version for TNG v9
v9.0.0.1 10 February 2012 HTML for TNG v9
v8.1.3 10 February 2012 HTML for TNG v8


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 ... 9.0.0.4/9.0.2 English, French, German, Spanish
Our Mayflower Connection Fred Berardi ... 9.0.0.2/9.0.2 English, French, German, Spanish