List Media

From TNG_Wiki
Jump to: navigation, search
Restricted Downloads of List Media are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account Restricted


In TNGv12 and beyond, this mod uses the new guidelines for TNG v12+ cust_text.php files
If you are using TNGv12+, and any cust_text.php file in this mod is marked with a Bad Target error, you need to update your cust_text.php files before you can install this mod. [Show instructions]

If you upgraded to TNGv12+, and did not update your cust_text.php files as instructed in the upgrade readme script, then you must use the TNG Mod Manager to update them. To do so:

  1. Go to Mod Manager, and select its "Recommended Updates" tab.
    (If the "Recommended Updates" tab is not visible, then go to the Mod Manager Options tab, select "Display Settings", and turn on the "Recommended Updates" tab.)
  2. Click the "Update" button in the "Recommended Updates" tab.
    Installed mods do not interfere with the update, and if you already have (or think you may have) run this update, it will not hurt for you to run it again.

[See details in the TNGv12 Change Impacts Article][Hide the instructions]


List Media
Summary When media is added to TNG you have the option to add an owner or source of the media. This mod lists the owners/source and displays the media for that owner/source
Validation The mod is XHTML compliant.Valid-xhtml10.png
Mod Updated 23 Sep 2018
Download link List Media v12.0.0.0
TNG 12.0

List Media v11.0.0.0

TNG 11.0


From Developers Website:
For

TNG 10.0
TNG 9.0


TNG Forum

TNG 8.0
Download stats See download statistics
Author(s) Steven Willingale
Homepage List Media (This page)
Mod Support TNG Forum
Contact Developer
Latest Mod 12.0.0.0 for TNG v12 and up.
Min TNG V 8.0.1
Max TNG V 12.0.2
Files modified
listowner.php (new file)
browseowner.php (new file)
listyear.php (new file)
browseyear.php (new file)
cust_text.php(Edit)
Related Mods
None
Notes
If using multiple languages, please add the details for your other languages. Dutch, French and German included in v11 and up.


Purpose of the Mod

When media is added to TNG you have the option to add an owner or source of the media and the year/date of the media. This info is displayed when you view the media, but is not searchable within TNG.

This adds a page called listowner.php that displays each owner or source with a count for how many items are attributed to that owner. Clicking the link will take you to browseowner.php which displays each media item for that owner or source. Likewise listyear.php displays the dates of each media item, clicking the link takes you to browseyear.php.

Developer

This mod was developed by Steven Willingale. Updated by Russ Strong to work with current versions TNG v11 through TNG v12.0.2

Known Issues

No, includes code to add new pages to the drop down menu. To manually link files, see below

Installation

  1. Download the appropriate zip file as shown in the summary in the upper right corner of the page.
  2. Extract the config file from the downloaded zip file into the mods folder.
  3. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the mod.
  4. Create links to the new files as described below

Custom Text Additions

Note that config file only includes the English language changes, so if you support multiple languages you will need to add these lines to each of your language cust_text.php files with appropriate translations of course. The version 11.0.0.0 includes optional Dutch, French, and German translations that will install if needed.


Revision History

Version Date Contents
V.12.0.0.0 23 September 2018 Updated files for TNG v12.0.0 using the new Modmanager optional file tag @ symbol for the optional language files and their correct target location. Reworked the browseowner.php and browseyear.php with the version 12 changes that were made in the browsemedia.php file on which those files were based on.
V.11.0.0.0 22 September 2018 Updated to work in version 11 with the optimization for mobile devices and correct the drop down menu icons. Included optional Dutch, French, and German text files. Tested in version 12.0.1.
V.10.0.0.1 14 December 2014 Amended to add new pages to dropdown menus automatically, proved to work with TNG 10.0.3 (but without the optimization for mobile devices)
V.9.1.0.0 10 February 2013 Few minor updates, proved to work with TNG 9.1.1
V8.1.1 23 August 2010 UTF-8 English custom text added, sort order changed to number of items, then alphabetically
V8.1.0 19 August 2010 Changes to write to tng logfile correctly, coded added to handle items that have no attributed source or owner
V8.0.1 14 August 2010 Initial Release

Side effects

  1. As with most source code modifications, these changes will likely be overwritten during your next TNG revision upgrade and will need to be re-implemented. (Using the Mod Manager greatly simplifies this process.


In the event of a problem


Linking this mod to your site

The cfg file contains the new and amended pages needed, but does not create any links to these new pages. You will need to add a link manually in your topmenu.php file. A quick summary of the steps to do this as follows:

1 Create a copy of topmenu.php and keep it safe in case things go wrong.

2 Open topmenu.php in notepad or your web page editing software.

3 Add the following line of code of topmenu.php (there will be a number of similar lines of code already in topmenu.php, so you should be able to work out where to add this new line)

echo "<li><a href=\"{$cms['tngpath']}listowner.php\" class=\"lightlink\">{$text['mediasource']}</a></li>\n";

4 Save the changes to topmenu.php

5 FTP the amended topmenu.php to your webserver, overwriting the exisiting file.

6 If things go wrong, replace with the backup you kept in step 1

7 Repeat steps to add a link to the listyear.php file by changing 'mediasource' to 'mediayear'.

Or you can try creating a new menu and adding this link to it, such as described in the Site Menu Mod article

Coding_Links_in_Pages also gives some tips for adding links to pages

Visualization of this mod

See one of the sites listed below.

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
Steven's Genealogy Steven Willingale Mod Developer V10.0.3 10.1.2 EN
R G Strong Family Genealogy Russell Strong Config file co-developer using modified template 4 V12.0.0.0 12.0.2 EN, DE, FR, NL