Difference between revisions of "Admin Media Thumbnails"

From TNG_Wiki
Jump to navigation Jump to search
(update 10.1.0.3a)
(regressed to 12.0.0.4a, commenting out some notes about 12.0.0.5)
(16 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
{{TNGmod
 
{{TNGmod
| mod_name        = Admin Thumbnails
+
| mod_name        = Admin Media Thumbnails
|  mod_summary    = Reworks the generation of thumbnails to offer more options, raise the size limit, and display more information.
+
|  mod_summary    = Allows users to control which mediatypes and tree to process, and can create thumbnails for larger image files.
 
| mod_validation  =  
 
| mod_validation  =  
| mod_last_update = 14 May 2016
+
| mod_last_update = 16 Oct 2018
| download_link  =  For {{Tv110}}{{Tv1011}}<br/>[[Media:admin_thumbnails_v10.1.0.3a.zip|admin_thumbnails_v10.1.0.3a.zip]]
+
| download_link  =  [[Media:admin_thumbnails_v12.0.0.4a.zip|12.0.0.4a]] {{Tv120}}
 
| download_stats  =
 
| download_stats  =
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
| mod_url        = [http://robinrichmond.com/family/ Robin Richmond's Genealogy Database]
+
| mod_url        = ''this page
 
| mod_contact    = [http://robinrichmond.com/family/mod_support.php My Mod Support form]
 
| mod_contact    = [http://robinrichmond.com/family/mod_support.php My Mod Support form]
 
| mod_support    = [http://robinrichmond.com/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
 
| mod_support    = [http://robinrichmond.com/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
| mod_version    = 10.1.0.3
+
| mod_version    = v12.0.0.4a
 
| min_TNG_ver    = 10.1
 
| min_TNG_ver    = 10.1
| max_TNG_ver    = 11.0
+
| max_TNG_ver    = 12.2
|  TNG_file_list  = admin_generatethumbs.php, admin_thumbnails.pohp, English, cust_text.php
+
|  TNG_file_list  = admin_generatethumbs.php, admin_thumbnails.php, English cust_text.php
 +
<!-- <br>Installs shared files: rrshared_innermodmenu2.php, img/rrshared_wikilogo.gif -->
 +
|notes=
 
| related_mods  =  
 
| related_mods  =  
 
| notes    =   
 
| notes    =   
 
}}
 
}}
 
{| style="margin-right:0.5 em;" align="right"
 
| __TOC__
 
 
|}
 
 
 
== Purpose of the Mod ==
 
== Purpose of the Mod ==
 
To make the the generation of thumbnails quicker and more flexible.  Changes include:
 
To make the the generation of thumbnails quicker and more flexible.  Changes include:
Line 29: Line 25:
 
* Generate a list of new thumbnail paths and offer to display it.
 
* Generate a list of new thumbnail paths and offer to display it.
 
* Displays files that couldn't be processed (and offers to hide that list).
 
* Displays files that couldn't be processed (and offers to hide that list).
* (VERY SIGNIFICANTLY) turn admin_generatethumbs into an include file that is included directly in admin_thumbnails.php, which used to invoke it through AJAX.  Unfortunately, using AJAX causes some errors to be hidden and makes it impractical to interrupt a long-running operation.
+
On a technical note: This mod turn admin_generatethumbs.php into an Include file that is included directly in admin_thumbnails.php, which, in the native code, runs admin_generatethumbs.php through AJAX.  Unfortunately, using AJAX causes some errors to be hidden and makes it impractical to interrupt a long-running operation.
 
+
{| style="margin-right:0.5 em;" align="right"
==Parameters==
+
| __TOC__
 +
|}
 +
==Mod Options==
 +
<!-- All options are custom TNG settings, which are defined and edited in the form at Admin>>Setup>>General&nbsp;Settings, in the new subform '''Robin's&nbsp;Mods''', where the options for various mods are organized into '''[https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod&nbsp;Settings&nbsp;Blocks]'''.
 +
-->
 
'''Skip files larger than this size, in KB''' (defaults to 2000)<br>
 
'''Skip files larger than this size, in KB''' (defaults to 2000)<br>
 
PHP crashes badly if it runs out of memory when trying to create a thumbnail, and the pristine code sets 1000Kb; that is, 1MB, as a reasonably conservative limit.  I have found that I can get by with 2.5MB (2500KB) on my servers.
 
PHP crashes badly if it runs out of memory when trying to create a thumbnail, and the pristine code sets 1000Kb; that is, 1MB, as a reasonably conservative limit.  I have found that I can get by with 2.5MB (2500KB) on my servers.
  
==Compatibility With Other Mods==
+
==Mod Conflicts==
This mod is compatible with [[Unused Media]], the only other published mod that affects either program.
+
This mod is compatible with [[Unused Media]], the only other published mod that affects the programs that are edited by this mod.
  
 
==Dependencies==
 
==Dependencies==
This mod depends on [[Show Mod Names|Show Mod Names,v2+]], as do virtually all of my mods
+
Like virtually all of my mods, this mod ''uses'', but does not in any way depend on, [[Show Mod Names]].  
 
 
==Requirements==
 
* A working TNG installation; TNG v10.1 or higher.
 
* An installed current version of the [[Mod Manager]].
 
* You should backup the files listed in the panel on the right.
 
  
==Automated Installation==
+
==Installation==
# Remove and delete previous version of this mod.
+
<!-- This mod uses the standard installation procedure, though it should be noted that this mod contains a mod subfolder that is shared with other mods that implement '''[https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner_Mod_Menus]'''. Because of the shared subfolder, as you unzip or copy the mod, you might get a warning noting that a file or folder already exists.  You can just ignore that warning.<br>-->{{RobinInstallationBoilerplate}}
# Backup the files updated by this mod. They are listed in the panel at the upper right.
 
# Download the .zip file, Extract its .cfg file to the mods folder.
 
# Follow the normal automated installation for Mod Manager, as shown in the example [[Mod Manager - Installing Config Files]].
 
  
== In the event of a problem ==
 
# Try using the [[Mod_Manager_-_Installing_Config_Files#Remove_Mod_Steps|Mod Manager Remove]] capability
 
# Contact me through [http://robinrichmond.com/family/mod_support.php My Mod Support form].
 
  
== Visualization of this Mod ==
+
== Visualizations ==
  
 
{| border="2" cellspacing="0" cellpadding="2" class="wikitable"
 
{| border="2" cellspacing="0" cellpadding="2" class="wikitable"
|-
+
| style="vertical-align:top;" | <span style="color: red">''' BEFORE:'''</span><br>
| style="vertical-align:top;" | <span style="color: red">''' BEFORE:'''</span>
+
| You cannot select a tree or a Mediatype; the native program always creates thumbnails for all media jpg files in the Media table.<br>
| [[Image:admin_thumbnails-before1.png]]
+
[[Image:admin_thumbnails-before1.png]]
 +
|-  
 +
| style="vertical-align:top;" | <span style="color: red">'''AFTER'''</span><br/>Additional options on the form
 +
| [[Image:admin_thumbnails-after1.png]]
 
|-  
 
|-  
 
| style="vertical-align:top;" | <span style="color: red">'''AFTER'''</span><br/>Additional options on the form
 
| style="vertical-align:top;" | <span style="color: red">'''AFTER'''</span><br/>Additional options on the form
Line 72: Line 64:
 
== Revision History ==
 
== Revision History ==
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
|-
+
! Mod Version !! TNG Versions !! Date !! Note
! Mod Version
+
<!--
! TNG Versions
+
|- style="vertical-align:top;"  <!-- ############################################################## | [[Media:admin_thumbnails_v12.0.0.5.zip|12.0.0.5]]
! Date
+
| 12.0 - 12.2+
! Note
+
| 30 Sep 2019
|-  
+
|
| 10.1.0.3a
+
*Added debugging features, to be used when the program dies without displaying results.
 +
*Implemented the Inner Mod Menu.
 +
*Moved the mod parameter to the "Robin's Mods" subform at Admin>>Setup>>General Settings
 +
-->
 +
|- style="vertical-align:top;"  <!-- ############################################################## -->
 +
| [[Media:admin_thumbnails_v12.0.0.4a.zip|12.0.0.4a]]
 +
| 12.0+
 +
| 16 Oct 2018
 +
| No functional changes; fixed a couple of bugs.
 +
changed the .cfg file to be compatible with PHP code that was changed in TNGv12.
 +
|- style="vertical-align:top;"  <!-- ############################################################## -->
 +
| [[Media:admin_thumbnails_v10.1.0.3p.zip|10.1.0.3p]]
 
| 10.1.0 - 11.0
 
| 10.1.0 - 11.0
 
| 14 May 2016
 
| 14 May 2016
| Added Show Mod Names and the parameter that allows larger files to be processed.
+
| Updated cust_text.php target location search strings to look for the one-line comment that says "Put your own custom messages here, like this: "Cleaned up the code and added some information to the display such as the file size of files that couldn't be processed
Cleaned up the code and added some information to the display such as the file size of files that couldn't be processed
+
|- style="vertical-align:top;"  <!-- ############################################################## -->
|-  
 
 
| 10.1.0.3
 
| 10.1.0.3
 
| 10.1.0 - 11.0
 
| 10.1.0 - 11.0
 
| 14 May 2016
 
| 14 May 2016
| to be added
+
| Added Show Mod Names and the parameter that allows larger files to be processed.
|-  
+
Cleaned up the code and added some information to the display such as the file size of files that couldn't be processed
 +
|- style="vertical-align:top;"  <!-- ############################################################## -->
 
| 10.1.0.2
 
| 10.1.0.2
 
| 10.1.0 - 10.1.1
 
| 10.1.0 - 10.1.1
Line 108: Line 111:
 
| [[User:Robinrichm|Robin Richmond]]
 
| [[User:Robinrichm|Robin Richmond]]
 
| Admin page; not accessible
 
| Admin page; not accessible
| 10.1.0.3/11.0
+
| 12.0.0.4/12.0
| EN
 
|-
 
| Hooley Family Links
 
| [[User:lastejas|Rick Hooley]]
 
| Admin page; not accessible
 
| 10.1.0.2/10.1.1
 
 
| EN
 
| EN
 
|-
 
|-
Line 122: Line 119:
 
| 10.1.0.3/11.0.1
 
| 10.1.0.3/11.0.1
 
| NL,EN
 
| NL,EN
 +
|-
 +
|-
 +
| [https://www.eskeland.net/tng Eskeland and Haugland Family]
 +
| [[User:helland71]]
 +
| Admin page; not accessible
 +
| 12.0.0.4/12.0.2
 +
| NO, EN
 +
|-
 +
| [http://genealogy.oceanwharf.com Hooley Family Links]
 +
| [[User: lastejas|Rick Hooley]]
 +
| Public/Private
 +
| [[User: lastejas|See Here]]
 +
| EN
 +
|-
 +
| [https://www.malvache.net Généalogie Malvache]
 +
| [[User: Cmalvache|Cédric Malvache]]
 +
| Public/Private
 +
| 12.0.0.4a/12.0.3
 +
| FR
 
|-
 
|-
 
|}
 
|}
  
 
[[Category:Mods for TNG v10]]
 
[[Category:Mods for TNG v10]]
 +
[[Category:Mods for TNG v11]]
 +
[[Category:Mods for TNG v12]]
 
[[Category:admin_thumbnails.php mods]]
 
[[Category:admin_thumbnails.php mods]]
 
[[Category:admin_generatethumbs.php mods]]
 
[[Category:admin_generatethumbs.php mods]]
[[Category:cust_text.php mods]]
+
[[Category:cust_text.php English mods]]

Revision as of 12:38, 27 November 2019

Admin Media Thumbnails
Summary Allows users to control which mediatypes and tree to process, and can create thumbnails for larger image files.
Validation
Mod Updated 16 Oct 2018
Download link 12.0.0.4a
TNG 12.0
Download stats
Author(s) Robin Richmond
Homepage this page
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod v12.0.0.4a
Min TNG V 10.1
Max TNG V 12.2
Files modified
admin_generatethumbs.php, admin_thumbnails.php, English cust_text.php
Related Mods
Notes


Purpose of the Mod

To make the the generation of thumbnails quicker and more flexible. Changes include:

  • A mod parameter lets you increase the file size limit (which is normally 1MB), since most servers seem able to process files of 2MB or more.
  • Process only the Mediatypes and tree that have been selected (I generally don't bother with censuses and documents)
  • Generate a list of new thumbnail paths and offer to display it.
  • Displays files that couldn't be processed (and offers to hide that list).

On a technical note: This mod turn admin_generatethumbs.php into an Include file that is included directly in admin_thumbnails.php, which, in the native code, runs admin_generatethumbs.php through AJAX. Unfortunately, using AJAX causes some errors to be hidden and makes it impractical to interrupt a long-running operation.

Mod Options

Skip files larger than this size, in KB (defaults to 2000)
PHP crashes badly if it runs out of memory when trying to create a thumbnail, and the pristine code sets 1000Kb; that is, 1MB, as a reasonably conservative limit. I have found that I can get by with 2.5MB (2500KB) on my servers.

Mod Conflicts

This mod is compatible with Unused Media, the only other published mod that affects the programs that are edited by this mod.

Dependencies

Like virtually all of my mods, this mod uses, but does not in any way depend on, Show Mod Names.

Installation

[Show Installation Details]

Requirements

  • A working TNG installation.
  • An installed current version of the Mod Manager.
  • You should backup files listed in the panel on the right.

Procedure

  1. Remove and delete previous version of this mod.
  2. Backup the files updated by this mod. They are listed in the panel at the upper right.
  3. Download the .zip file, Extract its .cfg file to the mods folder.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files.

Problems?

  1. Try using the Mod Manager Remove capability
  2. Contact me through My Mod Support form.
[Hide Details]


Visualizations

BEFORE:
You cannot select a tree or a Mediatype; the native program always creates thumbnails for all media jpg files in the Media table.

Admin thumbnails-before1.png

AFTER
Additional options on the form
Admin thumbnails-after1.png
AFTER
Additional options on the form
Admin thumbnails-after1.png
AFTER
Additional information about what was processed
Admin thumbnails2-after.png

Revision History

Mod Version TNG Versions Date Note
12.0.0.4a 12.0+ 16 Oct 2018 No functional changes; fixed a couple of bugs.

changed the .cfg file to be compatible with PHP code that was changed in TNGv12.

10.1.0.3p 10.1.0 - 11.0 14 May 2016 Updated cust_text.php target location search strings to look for the one-line comment that says "Put your own custom messages here, like this: "Cleaned up the code and added some information to the display such as the file size of files that couldn't be processed
10.1.0.3 10.1.0 - 11.0 14 May 2016 Added Show Mod Names and the parameter that allows larger files to be processed.

Cleaned up the code and added some information to the display such as the file size of files that couldn't be processed

10.1.0.2 10.1.0 - 10.1.1 19 Apr 2015 Initial release

Sites using this mod

If you download and install this mod, please add your site to the table below.

URL User Note Mod-Version/TNG-Version User-language
Robin Richmond's Genealogy Database Robin Richmond Admin page; not accessible 12.0.0.4/12.0 EN
Wortelboer Genealogy Bernard Wortelboer Admin page; not accessible 10.1.0.3/11.0.1 NL,EN
Eskeland and Haugland Family User:helland71 Admin page; not accessible 12.0.0.4/12.0.2 NO, EN
Hooley Family Links Rick Hooley Public/Private See Here EN
Généalogie Malvache Cédric Malvache Public/Private 12.0.0.4a/12.0.3 FR