Changes

Jump to navigation Jump to search
4,853 bytes added ,  16:51, 23 December 2019
no edit summary
Line 1: Line 1: −
<font color=gray><div align="center" style="text-align: center;font-size: 300%; font-weight: bold; margin: 10px auto;"> '' Wikipedia Link Mod '' </div></font>
+
{{restricted}}{{Languages}}
 +
{{TNGmod
 +
| mod_name        = Wikipedia Link Mod
 +
| mod_summary    = Adds links to Wikipedia for place name in the Place Search page
 +
| mod_validation  = Latest mod is XHTML compliant.[[Image:Valid-xhtml10.png|44px]]
 +
| mod_last_update = 13 Jan 2015‎
 +
| download_link  = for {{Tv120}}{{Tv1102}}[https://www.royandboucher.com/ccount/click.php?id=390&user={{#replace:{{CURRENTLOGGEDUSER}}}}&page={{PAGENAMEE}} wikipedia_link_v11.0.2.3.zip] <br />supports renaming extensions folder<hr />for <span class="nowrap">{{Tv110}}{{Tv100}}{{Tv90}}</span>[https://www.royandboucher.com/ccount/click.php?id=381&user={{#replace:{{CURRENTLOGGEDUSER}}}}&page={{PAGENAMEE}} wikipedia_link_v9.0.0.2.zip]<br />[https://www.royandboucher.com/ccount/click.php?id=253&user={{#replace:{{CURRENTLOGGEDUSER}}}}&page={{PAGENAMEE}} French language files]<hr />for {{Tv80}}[[Media: wikipedia_link_v8.1.0.zip| wikipedia_link_v8.1.0.zip]] <hr />for {{Tv70}}[[Media: wikipedia_link_v1.1.zip| wikipedia_link_v1.1.zip]]
 +
| download_stats = [https://www.royandboucher.com/ccount/index.php?action=stats&id=144-145-231-253-381-390 View download stats]
 +
| mod_author      = Luke Weerts<br />Ken Roy enhanced and created config file
 +
| mod_url        = [[Wikipedia Link Mod]] (This page)
 +
| mod_support    = [http://tng.community/ TNG Community Forums]
 +
| mod_contact    = [http://tng.community/ TNG Community Forums]
 +
| mod_version    = 11.0.2.3 for TNG V11.0.2 and up<br />9.0.0.2 for TNG V9 and up<br />8.1.0 for TNG V8<br />1.1 for TNG V7
 +
| min_TNG_ver    = 7.0.0
 +
| max_TNG_ver    = 12+
 +
| TNG_file_list  = placesearch.php
 +
| related_mods    = None
 +
| notes          = Please update your additional language cust_text.php files with translations based upon the [[Wikipedia_Link _Mod#Custom_Text_Additions|Custom Text Additions]] for this mod.
 +
}}
 +
<!-- French language file wikipedia_link_v9.0.0.0_fr.zip -->
 +
<!-- French language file http://tng.lythgoes.net/wiki/images/e/ec/Wikipedia_link_v9.0.0.1_french.zip  -->
 +
{| style="margin-right:0.5 em;" align="right"
 +
| __TOC__
   −
{|align=right
  −
|__TOC__
   
|}
 
|}
 +
    
== Purpose of the mod ==
 
== Purpose of the mod ==
   −
This mod provides links to Wikipedia for the TNG Place name and for each of the individual segments of the place name.
+
This mod provides links to Wikipedia for the TNG Place name and for each of the individual segments of the place name in the Place Search page.
 +
 
 +
'''Note''' that the Wikipedia links are added to the page you get when you click the Find (spy glass) icon after a place name on the Individual page or on the Place search results page.
 +
 
 +
See the [[Wikipedia_Link_Mod#With_Mod_InstalledVisualization|Mod Visualization]] below.
    
== Advantages ==
 
== Advantages ==
Line 20: Line 45:  
== Developer ==
 
== Developer ==
   −
The mod was initially provided on the [http://www.tngforum.us/index.php?s=&showtopic=3921&view=findpost&p=18911 TNG Forum] by Luke Weerts.  
+
The mod was initially provided (for TNG V6) in the [http://tng.community/index.php?s=&showtopic=3921&#comment-18911 Adding Wikipedia links to 'Places'] post on the TNG Community Forum by Luke Weerts.  
    
Note that Luke initially replaced the Place Name header with a link to Wikipedia.  Ken Roy modified Luke's code to add the Wikipedia link information below the Place Name Header and use cust_text.php to provide the indication of a Wikipedia link.
 
Note that Luke initially replaced the Place Name header with a link to Wikipedia.  Ken Roy modified Luke's code to add the Wikipedia link information below the Place Name Header and use cust_text.php to provide the indication of a Wikipedia link.
 
   
 
   
  −
== TNG module - placesearch.php ==
     −
This mod pertains to the placesearch.php script
+
==Requirements==
 +
 
 +
* A working TNG installation. The automated installation release was initially tested at TNG Version 7.1.0. Manual installation previously used on TNG 6 and 7.
 +
* A backup of your TNG placesearch.php file.
 +
* An installed current version of the [[Mod Manager]].
 +
 
   −
The following are the instructions on how to install the Wikipedia Link mod.
+
== Automated Install ==
   −
=== Where ===
+
# Download the appropriate zip file from the summary in the upper right hand corner
 +
# Extract the zip file in your TNG '''admin/mod_folder''' in TNG V8 and '''mods''' folder in TNG V8 and V9
 +
# Follow the normal automated installation for Mod Manager, as shown in the example [[Mod Manager - Installing Config Files]] to install the ''' wikipedia_link.cfg'''.
   −
Add the following after line 236 - applies to TNG 7.0 (this mod is also working in TNG 6.1.3 but the line number is likely are different).
+
'''Note''' that config file only includes the English language changes, so if you support multiple languages you will need to modify the config file to add the custom text for those other languages. The config file is also slightly different in that the Wikipedia links now all open in a separate window.
<pre>
  −
echo tng_DrawHeading( $photostr, $psearchns, "" );
  −
</pre>
     −
=== What to add ===
  −
After the TNG generated Place Name header line, add a conditional include.
  −
<font color=green>
  −
<pre>
  −
@include($cms[tngpath] . "extensions/wikipedia_link.php");  // Luke Weert's Wikipedia Link mod
  −
http://www.tngforum.us/index.php?s=&showtopic=3921&view=findpost&p=18911
  −
</pre>
  −
</font>
     −
=== Content of wikipedia_link.php ===
+
== Custom Text Additions ==  
   −
You can create the wikipedia_link.php file from the following content and place the file in the extensions subdirectory of your TNG install directory.  Note that you may have to create the subdirectory as a New Folder.
+
'''Note''' that config file only includes the English language changes, so if you support multiple languages you will need to modify the config file to add the custom text for those other languages.
  −
<font color=green>
  −
<pre>
  −
<?php
  −
// Luke Weert's Wikipedia link mod -
  −
http://www.tngforum.us/index.php?s=&showtopic=3921&view=findpost&p=18911
  −
$citst = explode(",", $psearchns);
  −
$ct = count($citst);
  −
end($citst);
  −
$ct = $ct > 1 ? "," . ($ct > 2 ? prev($citst): current($citst)) : "";
  −
echo "$text[wikilinks]" ."<br />" ;
  −
echo "<a href=\"http://en.wikipedia.org/wiki/".
  −
    str_replace( " ", "_",$citst[0] . $ct) . "\" target=\"_blank\">";
  −
echo "$psearchns ";
  −
echo "</a><br />";
  −
function wikis($nam,$nu)
  −
{
  −
$nam = trim($nam);
  −
echo " [<a href=\"http://en.wikipedia.org/wiki/".
  −
    str_replace( " ", "_",$nam) . "\">". $nam . "</a>] ";
  −
};
  −
array_walk($citst, 'wikis');
  −
?>
  −
</pre>
  −
</font>
     −
=== Co-requesite custom text ===
     −
In your English/cust_text.php, add
+
=== English/cust_text.php ===
 +
This mod adds the following text to your English/cust_text.php in TNG V7, or languages/English/cust_text.php or languages/English-UTF8/cust_text.php in TNG V8 and V9
    
<pre>
 
<pre>
Line 85: Line 79:  
</pre>
 
</pre>
   −
In your French/cust_text.php, add
+
 
 +
=== Other languages ===
 +
 
 +
If you are using other languages, you must add these lines to each of your language cust_text.php files with appropriate translations of course, for example
 +
 
 +
 
 +
In your French/cust_text.php in TNG V7, or languages/French/cust_text.php or languages/French-UTF8/cust_text.php in TNG V8, you would add
 
<pre>
 
<pre>
 
// Added for Wikipedia Searchplace mod by Luke Weerts  
 
// Added for Wikipedia Searchplace mod by Luke Weerts  
Line 93: Line 93:  
You will need to add similar text for your other languages.
 
You will need to add similar text for your other languages.
   −
== Visual of mod ==
     −
See sites using the mod below for visual.
+
== Visualization of this mod ==
 +
 
 +
=== Without Mod ===
 +
{|
 +
|
 +
Without this mod, the Place Search page does not include any links to Wikipedia as shown in the image on the right.
 +
|[[Image:Wikipedia_link_not_installed.jpg|500px|right]]
 +
|}
 +
 
 +
=== With Mod Installed ===
 +
 
 +
{|
 +
|
 +
With the ShowTable Mod, the Place Search page does includes two different sets links to Wikipedia as shown in the image on the right:
 +
* a link that uses all parts of the place location name
 +
* separate links to each distinct component of the place location name, such as Joigny (city), Yonne (department), Bourgogne (Region), France (country) shown in the image
 +
|[[Image:Wikipedia_link_installed.jpg.jpg|500px|right]]
 +
|}
 +
 
   −
== TNG User sites using this mod ==
+
== Sites using this mod ==
*Please add TNG site that you have found that utilize this modification
+
If you download and install this mod, please add your TNG site to the table below
=== Site List ===
     −
*[http://www.cousinfolk.net/placesearch.php?psearch=Goodhue%2C+Goodhue+County%2C+Minnesota%2C+USA Luke Weert's Cousin Folk] web siteLuke is the developer of the Wikipedia Link mod
+
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
*[http://www.royandboucher.com/genealogy/placesearch.php?tree=&psearch=Joigny%2C+Yonne%2C+Bourgogne%2C+France Our Acadian, French Canadian, and Maine Ancestors] Mod updated to add Wikipedia links for text by Ken Roy.
+
|-
 +
! URL
 +
! User
 +
! Note
 +
! Mod-Version
 +
! TNG-Version
 +
! User-language
 +
|-
 +
| [http://www.cousinfolk.net/placesearch.php?psearch=Goodhue%2C+Goodhue+County%2C+Minnesota%2C+USA Luke Weert's Cousin Folk] web site
 +
| Luke Weerts
 +
| Mod developer
 +
| 8.1.6
 +
| 8.1.1
 +
| DA, DE, EN, NL
 +
|-
 +
| [https://www.royandboucher.com/genealogy/placesearch.php?tree=&psearch=Joigny%2C+Yonne%2C+Bourgogne%2C+France Our Acadian, French Canadian, and Maine Ancestors]
 +
| [[User:Ken Roy|Ken Roy]]
 +
| updated to add Wikipedia links below header. Updated to support extensions folder rename
 +
| 11.0.2.3
 +
| 12.0.0
 +
| EN, FR
 +
|-
 +
| [http://www.appelthaus.com/ AppeltHaus Genealogy]
 +
| [[User:InvernessHighlander|Lawrence Appelt]]
 +
| Not a Public Site.
 +
| 9.0.0.0
 +
| 10.0.0
 +
| EN
 +
|-
 +
| [http://www.arsenaultfamily.com/ Arsenault and Simpson Family Genealogy]
 +
| [[User:BobA|Bob Arsenault]]
 +
| not a public site
 +
| V9.0.0.0
 +
| V9.0.3
 +
| EN
 +
|-
 +
| [http://www.maarelweb.nl/stamboom/surnames100.php Van der Maarel Genealogy]
 +
| [[User:Edward|Edward van der Maarel]]
 +
| Public Site.
 +
| V9.0.0.0
 +
| 10.0.0
 +
| EN, NL
 +
|-
 +
| [http://genealogy.oceanwharf.com Hooley Family Links]
 +
| [[User:lastejas|Rick Hooley]]
 +
| Public/Private
 +
| [[User: lastejas|See Here]]
 +
| [[User: lastejas|See Here]]
 +
| EN
 +
|-
 +
| [https://www.bradyfamilytree.org/ Brady Family Tree in Western Australia]
 +
| [[User:bradyfamilytree|Darryl Brady]]
 +
| Public site
 +
| 9.0.0.1
 +
| 10.1.1
 +
| EN, DE
 +
|-
 +
| [https://www.brabantse-genealogie.nl Brabantse Genealogie]
 +
| [[User:Rob van Rij|Rob van Rij]]
 +
| Public Site
 +
| 11.0.2.3
 +
| 12.2
 +
| EN,NL
 +
|-
 +
| [http://pagesfromourpast.com Pages From Our Past]
 +
| [[User:alprunty|Allen Prunty]]
 +
| Not a public site
 +
| 11.0.2.3
 +
| 11.1.0
 +
| English
 +
|-
 +
| [https://www.ourlife.us OurLife Family History - McMullen Clan]
 +
| [[User:Seanst|Sean Thompson]]
 +
| Not a public site.
 +
| 11.0.2.3
 +
| 11.1.0
 +
| English
 +
|-
 +
| [http://www.potie.eu/genealogy Famille Potié et ses alliés]
 +
| [[User:Stillman|Christophe Potié]]
 +
| Not a public site.
 +
| 11.0.2.3
 +
| 11.1.0
 +
| English, French
 +
|-
 +
| [https://www.rgstrong-genes.com R G Strong Family Genealogy]
 +
| [[User:Rgstrong|Russ Strong]]
 +
| Public Site
 +
| 11.0.2.3
 +
| 12.0.2
 +
| EN, FR, DE, NL
 +
|}
      −
[[Category:TNGmods]]
+
[[Category:Mods for TNG v12]]
 +
[[Category:Mods for TNG v11]]
 +
[[Category:Mods for TNG v10]]
 +
[[Category:Mods for TNG v9]]
 +
[[Category:Mods for TNG v8]]
 +
[[Category:Mods for TNG v7]]
 +
[[Category:Mods for TNG v6]]
 +
[[Category:placesearch.php mods]]
'''Experienced'''
200

edits

Navigation menu