Wikipedia Link Mod

From TNG_Wiki
Revision as of 10:52, 27 July 2010 by Baum (talk | contribs) (add language)
Jump to navigation Jump to search
Wikipedia Link Mod
Summary Adds links to Wikipedia for place name in the Place Search page
Validation {{{mod_validation}}}
Mod Updated {{{mod_last_update}}}
Download link wikipedia_link_v8.1.0.zip for TNG V8
wikipedia_link_v1.1.zip
Download stats {{{download_stats}}}
Author(s) Luke Weerts
Ken Roy enhanced and created config file
Homepage Wikipedia Link Mod (This page)
Mod Support TNG Forums
Contact Developer {{{mod_contact}}}
Latest Mod 8.1.0 for TNG V8
1.1 for TNG V7
Min TNG V 7.0.0
Max TNG V 8.0.0
Files modified
placesearch.php
Related Mods
None
Notes
Please update your additional language cust_text.php files with translations based upon the Custom Text Additions for this 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 in the Place Search page.

Advantages

The Wikipedia link mod allows your users to link to Wikipedia:

  • where they may find additional information on the place.
  • where they may find the additional information on the segments of the place name.


Developer

The mod was initially provided on the TNG 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.

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.

Automated Install

  1. Download the appropriate zip file from the summary in the upper right hand corner
  2. Extract the zip file in your TNG admin/mod_folder in TNG V8 and mods folder in TNG V8
  3. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the wikipedia_link.cfg.

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.

Custom Text Additions

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.

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

// Added for Wikipedia Searchplace mod by Luke Weerts 
$text[wikilinks] = "Wikipedia links for";

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

// Added for Wikipedia Searchplace mod by Luke Weerts 
$text[wikilinks] = "Wikipedia liens pour";

You will need to add similar text for your other languages.

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.

Wikipedia link not installed.jpg

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
Wikipedia link installed.jpg.jpg

TNG User sites using this mod

  • Please add TNG site that you have found that utilize this modification

Site List