TNG Media Access Mod

Post Reply
steven
Posts: 133
Joined: Sun Oct 01, 2017 3:08 pm

TNG Media Access Mod

Post by steven »

The Media Access Mod requires users log in to access media. The mod was written for those that have a public site but want to restrict access to media. This prevent bots and others from scraping media data. After the mod is installed, the TNG privacy settings work the same except users must log in to access media.

The mod does not change the TNG database so it doesn't work the same as the Private Media Mod. It hides all media until a user logs in. If a user logs in and does not have permission to view a media item, it is hidden instead of showing the At least one living or private individual is linked to this item - Details withheld message. This feature can be turned off if you want to display those messages.

If you have a private website requiring users log in, you may not have a use for this mod. However, if you have a public site but want to limit media access to logged in users, you may find this mod useful. After the mod is installed you can use the TNG private flag to permit access to certain media for users with permission. There are features, such as finding media marked private or finding media not marked private and making all new media private. Making new media private, by default, can be turned off on the mod options page.

This mod hides media from the public and has additional features, so please check the operation below. If you want to show select media publicly you can set the permission mode to 1 and use Michael Kirsch's Secret Medias Mod.

NOTE: Templates are not affected by this mod so they will continue to display media on the home page.

After the mod is installed there are four options.

Image



OPTION 1 - Permission Mode for All Media
The default mode requires users login to access media. After a user logs in, the TNG private flag works the same. The main difference is users must log in to access media regardless of the private setting.

Set this option 1 to 1 to allow public access to media without logging in.

Image



OPTION 2 - Living Private Message Mode
Normally TNG displays a living/private message when a media item is not available for viewing. When the mod is installed these messages are not displayed. This feature can be turned off by setting option 2 to 1 to display the living/private message.

Image



OPTION 3 - RSS Feed Mode
The default mode prevents access to media. This is useful if you want to prevent bots from mining media data. Individuals are still shown.
Set option 3 to 1 to allow feeds to access media.

Image



OPTION 4 - Private Media Default Mode
The private media default mode makes ALL new media private. This applies to Add New, Upload or Import, when adding the media. So the media flag will always be set to private. The add new screen has the option to turn this off when adding new media.
Set option 4 to 1 if you do not want to make media private by default.

Image

The private checkbox is not shown on the import or upload page but the media will still be marked private. Keep in mind the Upload and Import methods do not have a way to override the mod setting during imports so you will need to turn this off in the mod options if you do not want to make all media private.

Image

A search feature was added to the Media Administration page. You can perform searches for the private setting for all media. This feature lets you easily locate media improperly flagged on your website. Use either checkbox to search the current collection to find media flagged incorrectly.

Image

To use this feature check the appropriate box and select search. Private only finds media marked private while Not private finds media not marked private. Select a collection when using this feature to narrow your search. The mod does not allow selecting both boxes as that would always give zero results.

The mod should minimize messages with no media for those that do not have private permission however, the living or private message may still appear on some pages.

I would like to thank Michael and Rick for testing and suggesting mod options.
Special thank you to Michael Kirsch for testing compatibility and code suggestions.

The mod has the following languages included: English, French, German and Spanish.
(Google translate was used for French, German and Spanish)

Files modified by this mod:
admin_media.php - admin_newmedia.php - admin_photoimporter.php - admin_mediauploader.php
browsealbums.php - browsemedia.php - customconfig.php - familychart.php - getperson.php
globallib.php - pedbox.php - personlib.php - relationship.php - rpt_utils.php - showalbum.php
showmedia.php - tngrss.php - whatsnew.php

For TNG V13 and V14
TNG WIKI download link

media_access_14.0.3.2b.zip
(4.96 KiB) Downloaded 3 times


For TNG V13
media_access_v13.0.3.2.zip
(4.73 KiB) Downloaded 530 times

Revisions:
Fixed a SQL error when a user was logged in and viewing media and then logged out on the page.
Renumbered Mod per TNG Guidelines[/hide]
Last edited by steven on Sat Apr 02, 2022 9:16 am, edited 1 time in total.
Post Reply