Difference between revisions of "Admin Languages"

From TNG_Wiki
Jump to navigation Jump to search
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{construction
 
|notes=Under Construction<br>(The text of this article describes Version 18, but the visualizations are from Version 15.)<br>Robin Richmond 30 Sep 2019}}
 
 
{{V12_cust_text}}
 
 
{{TNGmod
 
{{TNGmod
 
| mod_name        = Admin Languages
 
| mod_name        = Admin Languages
|  mod_summary    = Simplifies the entry of languages by combining the Search and Add New forms into one screen
+
|  mod_summary    = Simplifies the entry of languages by combining the Search, Edit, and Add New forms into one screen, and provides more meaningful prompts for languages and character sets.
 
| mod_validation  =  
 
| mod_validation  =  
| mod_last_update = 30 Sep 2019
+
| mod_last_update = 22 Sep 2023
| download_link  =  <div>[[Media:admin_languages_v12.0.0.4a.zip|12.0.0.4a.zip]]{{Tv120}}</div>
+
| download_link  =  [[Media:Admin_languages_v14.0.0.6b.zip|v14.0.0.6b]]{{Tv140}}
 +
<div style='font-size:90%;clear:both;'>(Older downloads are in the [[#Revision_History|Revision History]])</div>
 
| download_stats  =
 
| download_stats  =
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
 
| mod_url        = [http://www.robinrichmond.com/family/ Robin Richmond's Genealogy Database]
 
| mod_url        = [http://www.robinrichmond.com/family/ Robin Richmond's Genealogy Database]
| mod_contact    = [http://www.robinrichmond.com/mod_support.php My Mod Support form]
+
| mod_contact    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form]
 
| mod_support    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
 
| mod_support    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
| mod_version    = 12.0.0.8
+
| mod_version    = 14.0.0.6b
 
| min_TNG_ver    = 10.1
 
| min_TNG_ver    = 10.1
| max_TNG_ver    = 12.2
+
| max_TNG_ver    = v14.0.3
 
|  TNG_file_list  = admin_languages.php, English cust_text.php
 
|  TNG_file_list  = admin_languages.php, English cust_text.php
 
| related_mods  =  
 
| related_mods  =  
| notes    =  This mod makes admin_addlanguage.php and admin_editlanguage.php obsolete
+
| notes    =  * Removed showmodnames Include statement but not the whole location.
 +
* Removed conditional MM Logic in 3 locations that distinguished between TNGv13 subversions
 +
* Changed the search text in one location to match a change in TNGv14
 
}}
 
}}
== Purpose of the Mod ==
 
This mod improves workflow by combining the Search, Add New, and Edit forms into one screen. The mod also enhances the Add New Language form to come up with more meaningful values for the Display Language and Character Set fields.
 
 
{| style="margin-right:0.5 em;" align="right"  
 
{| style="margin-right:0.5 em;" align="right"  
 
| __TOC__
 
| __TOC__
 
|}
 
|}
 +
== Purpose of the Mod ==
 +
This mod improves workflow by combining the Search, Add New, and Edit forms into one screen. The mod also enhances the Add New Language form to come up with more meaningful values for the Display Language and Character Set fields.
 
That is, depending on which language folder is selected by the user,
 
That is, depending on which language folder is selected by the user,
 
# The input box for the language display value (e.g. German vs Dutch vs German-UTF8, etc.) may be converted into checkboxes that populate an input box into which the user can ultimately enter an arbitrary value.
 
# The input box for the language display value (e.g. German vs Dutch vs German-UTF8, etc.) may be converted into checkboxes that populate an input box into which the user can ultimately enter an arbitrary value.
 
# The input box for the character set is initialized to "UTF-8" for all UTF8 language folders, to "ISO-8559-2" for Czech and Polish, and to "ISO-8559-1" for all other language folders.
 
# The input box for the character set is initialized to "UTF-8" for all UTF8 language folders, to "ISO-8559-2" for Czech and Polish, and to "ISO-8559-1" for all other language folders.
  
== Mod Version 2 Uninstallation ==
+
== Mod Options ==
Admin Languages v10.1.0.2 (i.e. v2) contains some ambiguous code fragments in two target locations, and thus does not uninstall correctly. It  uninstalls without error, but it leaves an incorrect string in the PHP program admin_languages.php so that admin_languages.php neither works correctly, nor allows the Admin Languages mod to be re-installed.
+
none
 
+
== No Conflicts ==
After uninstalling Admin Languages v2, you can repair admin_languages.php either by
 
# Restoring it from the original admin_languages.php in your TNG download, or
 
# Installing <b>Admin Languages Repair</b>, from the zip file listed on the right.
 
Once you have Installed Admin Languages Repair, you should just delete it; '''Do NOT Uninstall Admin Languages Repair'''.
 
And by all means, delete Admin Languages v2 once you have uninstalled it.
 
 
 
== Mod Conflicts ==
 
 
No other mods affect admin_languages.php.
 
No other mods affect admin_languages.php.
  
 
== Installation ==
 
== Installation ==
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}}
+
{{RobinBoilerplate | text=language}}
 +
{{RobinInstallationBoilerplate| install}}
 +
 
 
== Visualizations ==
 
== Visualizations ==
  
 
{| border="1" cellspacing="1" cellpadding="2" class="wikitable"
 
{| border="1" cellspacing="1" cellpadding="2" class="wikitable"
|-
+
|- style="vertical-align:top;"
| style="vertical-align:top;" | <span style="color: red">''' BEFORE'''</span><br/>Search
+
! <span style="color: brown;text-align:left;">''' BEFORE INSTALLATION'''<br>Admin>>Languages Search Page, with the typical TNG Admin search page layout</span>
 
| [[Image:admin_languages-before1.png]]
 
| [[Image:admin_languages-before1.png]]
|-  
+
 
| style="vertical-align:top;" | <span style="color: red">''' BEFORE'''</span><br/>Add New
+
|- style="vertical-align:top;"
 +
! <span style="color: brown;text-align:left;">''' BEFORE INSTALLATION'''<br>Admin Languages "Add New" page</span>
 
| [[Image:admin_languages-before2.png]]
 
| [[Image:admin_languages-before2.png]]
|-
+
|}
| style="vertical-align:top;" | <span style="color: red">'''AFTER:'''</span><br/>Combined Form
+
 
| [[Image:admin_languages-after1.png]]
+
{| border="1" cellspacing="1" cellpadding="2" class="wikitable"
|-  
+
|-style="vertical-align:top;"
| style="vertical-align:top;" | <span style="color: red">'''AFTER:'''</span><br/>Combined Form - Edit
+
! colspan=2  | <span style="color: brown">'''AFTER INSTALLATION: The fundamental feature of this mod is that all functions (search, add new, and edit) are combined into one page</span>
| [[Image:admin_languages-after-edit.png]]
+
 
|-  
+
|-style="vertical-align:top;"
! colspan="2" style="text-align:left;" | <span style="font-weight:normal"><span style="color: red">'''AFTER:'''</span> Add New form after a language folder has been selected</span>
+
! <span style='color:brown;text-align:left'>'''AFTER:<br> Admin >> Search results with Add New form'''</span>
|-  
+
| This is the new Admin>>Search page showing two of the three components of the new page. The Add New form is always visible in this page.<br> [[Image:admin_languages-after1.png]]
| colspan="2" | [[Image:admin_languages-after2.png]]
+
 
|-  
+
|-style="vertical-align:top;"
! colspan="2" style="text-align:left;" | <span style="font-weight:normal"><span style="color: red">'''AFTER:'''</span> There are fewer choices when the language name in English and in the selected language are the same (or when no translated language name is available).</span>
+
! <span style='color:brown;text-align:left'>'''AFTER:<br> Search page with all three components '''</span>
|-  
+
| The edit form for Danish-UTF8 pops up ''inside'' the search results table, immediately below the Danish-UTF8 search result row.
| colspan="2" | [[Image:admin_languages-after3.png]]
+
[[Image:languages-after-edit.png]]
|-
+
 
! colspan="2" style="text-align:left;" | <span style="font-weight:normal"><span style="color: red">'''AFTER:'''</span> There is only one choice when a non-UTF language is chosen and the translated language name is the same as the English (or is unavailable)</span>
+
|-style="vertical-align:top;"
|-  
+
! <span style="color: brown; text-align:left">'''AFTER:<br>Add New UTF-8 Language'''</span>
| colspan="2" | [[Image:admin_languages-after4.png]]
+
| As soon as a UTF-8 Language Folder is selected:
 +
# A default value for the ''displayed language name'' is filled in
 +
# ''In some languages'', radio buttons pop up to facilitate the selected of other likely language names.
 +
#* There are generally 4 choices - The English word for the language and the native word for the language, plus both words appended with UTF8.
 +
#** (I suspect that TNG sites are unlikely to offer both character sets for the same language, but I found the UTF8 suffix handy on test sites.)
 +
#* If I couldn't figure out the native language's word for the language or if the native word is the same as the English word, there are just two choices.
 +
# A default character set is placed in the Character Set Field (It is always UTF-8 for UTF-8 languages.)
 +
[[Image:admin_languages-addUTF8.png]]
 +
<div style=font-size:90%;'>Sometimes, The language name field displays HTML entities in place of accented characters. But
 +
* The true character will appear if you select that name with the radio button, and
 +
* It does save the value correctly even when you see the HTML entity.
 +
</div>
 +
 
 +
|-style="vertical-align:top;"
 +
! <span style="color: brown; text-align:left">'''AFTER''':<br>Add New non-UTF8 language
 +
| Behaves just like UTF8, except
 +
* Language name radio buttons: There are never more than two choices because there is no need for the UTF-8 suffix.
 +
* Character set:
 +
** ISO-8559-2 for Czech and Danish (This doesn't seem quite right. I'll check it out, but [[http://www.robinrichmond.com/mod_support if you can let me know], that would be great.)
 +
** ISO-8559-1 for all other languages
 +
[[Image:admin_languages-addISO.png]]
 +
 
 
|}
 
|}
  
 
== Revision History ==
 
== Revision History ==
<span color='red'>'''*** The newest version is at the top of this table ***'''
+
 
 
{| 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 !! Date !! Note
 +
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
| [[Media:admin_languages_v12.0.0.4a.zip|12.0.0.4a]]
+
| [[Media:Admin languages v14.0.0.6b.zip|14.0.0.6b]]
| 12.0 - 12.2+
+
| 14+
| 30 Sep 2019
+
| 23 Sep 2023
| No functional changes.
+
|  
*Internal and Administrative changes
+
* Updated one target location to match a change in TNGv14.
**Updated the top-of-file comments and moved notes to the cfg file.
+
* Improved logic that displays the "Needs Mod Settings Blocks" message in the Mod Manager.  
**Moved a text string to cust_text.php,
+
 
**Placed my "Inner Mod Menu" drop-down at the right end of the standard TNG Inner Menu.
 
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
| [[Media:admin_languages_v12.0.0.4.zip|12.0.0.4]]
+
 
 +
| [[Media:Admin languages v13.0.0.6a.zip|13.0.0.6a]]
 +
| 13-13.0.1
 +
| 17 Nov 2020
 +
| In both admin_addlanguage.php and admin_updatelanguage.php, split one location into two conditional locations
 +
  to handle a syntax error correction in TNGv13.0.1.
 +
 
 +
|- style="vertical-align:top;"<!-- ############################################################## -->
 +
| [[Media:Admin languages v13.0.0.6.zip|13.0.0.6]]
 +
| 13
 +
| 20 Sep 2020
 +
|
 +
* Had to undo the effects of the new TNGv13 "Save+Stay" buttons on admin_newlanguage.php and admin_updatelanguage.php
 +
* Upgraded the success message to include the language folder and encoding.
 +
* Upgraded to the TNGv13 version of the Inner Mod Menu Mod.
 +
 
 +
|- style="vertical-align:top;"<!-- ############################################################## -->
 +
| [[Media:Admin languages v12.0.0.4b.zip|12.0.0.4b]]
 +
| 12.0 - 12.3
 +
| 28 Mar 2019
 +
| No functional changes.
 +
* Adds my Inner Mod Menu, and cleans up some language strings.
 +
 
 +
|- style="vertical-align:top;"<!-- ############################################################## -->
 +
| [[Media:Admin languages v12.0.0.4.zip|12.0.0.4]]
 
| 12.0+
 
| 12.0+
 
| 4 May 2018
 
| 4 May 2018
 
| No functional changes; made compatible with TNGv12.
 
| No functional changes; made compatible with TNGv12.
|- style="vertical-align:top;" <!-- ############################################################## -->
+
 
| [[Media:admin_languages_v11.0.0.4.zip|11.0.0.4]]
+
|- style="vertical-align:top;"<!-- ############################################################## -->
 +
|[[Media:Admin languages v11.0.0.4.zip|11.0.0.4]]
 
| 11.0 - 11.1.2+
 
| 11.0 - 11.1.2+
 
| 1 Dec 2017
 
| 1 Dec 2017
| - Removed a comment line from the cust_text.php target locations search strings<br>
+
| - Updated the mod for TNGv11, which added a field to the Languages table.<br>
- Updated the mod for TNGv11, which added a field to the Languages table.<br>
+
- Inside the .cfg file, added comments to remaining code fragment locations<br>
- Inside the .cfg file, added comments to remaining some code fragment locations<br>
 
 
- DisplayModNames is now optional
 
- DisplayModNames is now optional
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
Line 122: Line 161:
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
 
|-
 
|-
! URL
+
! URL !! User !! Note !! Mod-Version !! TNG-Version !! Language
! User
 
! Note
 
! Mod-Version
 
! TNG-Version
 
! User-language
 
 
|-
 
|-
 
| [http://www.robinrichmond.com/ Robin Richmond's Genealogy Database]
 
| [http://www.robinrichmond.com/ Robin Richmond's Genealogy Database]
 
| [[User:Robinrichm|Robin Richmond]]
 
| [[User:Robinrichm|Robin Richmond]]
 
| Mod developer
 
| Mod developer
| 11.0.0.4
+
| v14.0.0.6b
| 11.1.2
+
| 13
| English
+
| EN
 
|-
 
|-
| [https://genealogywings.com/ MOTYER Family Genealogy]
 
| [[User:JMM|John Mark Motyer]]
 
| Public site
 
| [[User:JMM|see here]]
 
| [[User:JMM|see here]]
 
| EN, DE, RU
 
 
|}
 
|}
[[Category:Mods for TNG v11]] [[Category:Mods for TNG v12]]
+
[[Category:Mods for TNG v10]] [[Category:Mods for TNG v11]] [[Category:Mods for TNG v12]]
[[Category:Mods for TNG v10]]
+
[[Category:Mods for TNG v13]] [[Category:Mods for TNG v14]]
 +
 
 
[[Category:admin_languages.php mods]]
 
[[Category:admin_languages.php mods]]
 
[[Category:cust_text.php English mods]]
 
[[Category:cust_text.php English mods]]

Latest revision as of 16:14, 27 September 2023

Admin Languages
Summary Simplifies the entry of languages by combining the Search, Edit, and Add New forms into one screen, and provides more meaningful prompts for languages and character sets.
Validation
Mod Updated 22 Sep 2023
Download link v14.0.0.6b
TNG 14.0
(Older downloads are in the Revision History)
Download stats
Author(s) Robin Richmond
Homepage Robin Richmond's Genealogy Database
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod 14.0.0.6b
Min TNG V 10.1
Max TNG V v14.0.3
Files modified
admin_languages.php, English cust_text.php
Related Mods
Notes
* Removed showmodnames Include statement but not the whole location.
  • Removed conditional MM Logic in 3 locations that distinguished between TNGv13 subversions
  • Changed the search text in one location to match a change in TNGv14


Purpose of the Mod

This mod improves workflow by combining the Search, Add New, and Edit forms into one screen. The mod also enhances the Add New Language form to come up with more meaningful values for the Display Language and Character Set fields. That is, depending on which language folder is selected by the user,

  1. The input box for the language display value (e.g. German vs Dutch vs German-UTF8, etc.) may be converted into checkboxes that populate an input box into which the user can ultimately enter an arbitrary value.
  2. The input box for the character set is initialized to "UTF-8" for all UTF8 language folders, to "ISO-8559-2" for Czech and Polish, and to "ISO-8559-1" for all other language folders.

Mod Options

none

No Conflicts

No other mods affect admin_languages.php.

Installation

This mod includes a typical mod subfolder, with the same base name as the mod's .cfg file. The subfolder is atypical in that no files in it are installed to working TNG folders. However, it does contain critical files that contain the mod's language strings, which the mod does not add to standard cust_text.php files. Instead, the PHP code modified by this mod loads the language strings from files in the mod's languages/ subfolder. Read more about this technique.

[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 INSTALLATION
Admin>>Languages Search Page, with the typical TNG Admin search page layout
Admin languages-before1.png
BEFORE INSTALLATION
Admin Languages "Add New" page
Admin languages-before2.png
AFTER INSTALLATION: The fundamental feature of this mod is that all functions (search, add new, and edit) are combined into one page
AFTER:
Admin >> Search results with Add New form
This is the new Admin>>Search page showing two of the three components of the new page. The Add New form is always visible in this page.
Admin languages-after1.png
AFTER:
Search page with all three components
The edit form for Danish-UTF8 pops up inside the search results table, immediately below the Danish-UTF8 search result row.
Languages-after-edit.png
AFTER:
Add New UTF-8 Language
As soon as a UTF-8 Language Folder is selected:
  1. A default value for the displayed language name is filled in
  2. In some languages, radio buttons pop up to facilitate the selected of other likely language names.
    • There are generally 4 choices - The English word for the language and the native word for the language, plus both words appended with UTF8.
      • (I suspect that TNG sites are unlikely to offer both character sets for the same language, but I found the UTF8 suffix handy on test sites.)
    • If I couldn't figure out the native language's word for the language or if the native word is the same as the English word, there are just two choices.
  3. A default character set is placed in the Character Set Field (It is always UTF-8 for UTF-8 languages.)

Admin languages-addUTF8.png

Sometimes, The language name field displays HTML entities in place of accented characters. But
  • The true character will appear if you select that name with the radio button, and
  • It does save the value correctly even when you see the HTML entity.
AFTER:
Add New non-UTF8 language
Behaves just like UTF8, except
  • Language name radio buttons: There are never more than two choices because there is no need for the UTF-8 suffix.
  • Character set:
    • ISO-8559-2 for Czech and Danish (This doesn't seem quite right. I'll check it out, but [if you can let me know, that would be great.)
    • ISO-8559-1 for all other languages

Admin languages-addISO.png

Revision History

Mod Version TNG Versions Date Note
14.0.0.6b 14+ 23 Sep 2023
  • Updated one target location to match a change in TNGv14.
  • Improved logic that displays the "Needs Mod Settings Blocks" message in the Mod Manager.
13.0.0.6a 13-13.0.1 17 Nov 2020 In both admin_addlanguage.php and admin_updatelanguage.php, split one location into two conditional locations
 to handle a syntax error correction in TNGv13.0.1.
13.0.0.6 13 20 Sep 2020
  • Had to undo the effects of the new TNGv13 "Save+Stay" buttons on admin_newlanguage.php and admin_updatelanguage.php
  • Upgraded the success message to include the language folder and encoding.
  • Upgraded to the TNGv13 version of the Inner Mod Menu Mod.
12.0.0.4b 12.0 - 12.3 28 Mar 2019 No functional changes.
  • Adds my Inner Mod Menu, and cleans up some language strings.
12.0.0.4 12.0+ 4 May 2018 No functional changes; made compatible with TNGv12.
11.0.0.4 11.0 - 11.1.2+ 1 Dec 2017 - Updated the mod for TNGv11, which added a field to the Languages table.

- Inside the .cfg file, added comments to remaining code fragment locations
- DisplayModNames is now optional

10.1.0.3 10.1.0 - 10.1.2 18 Sep 2015 Fixed the problem that causes version 2 to uninstall badly. Also defaults to ISO-8559-2 for Czech and Polish non-UTF language folders.
10.1.0.2 10.1.0 - 10.1.2 12 Sep 2015 Added the edit form to the Search & Add New page. Added logic to provide choices to populate the Display and Character Set fields.
10.1.0.1 10.1.0 - 10.1.1 30 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 Language
Robin Richmond's Genealogy Database Robin Richmond Mod developer v14.0.0.6b 13 EN