Difference between revisions of "Source Not Found Mod"

From TNG_Wiki
Jump to navigation Jump to search
(Text replacement - "http://www.tngforum.us/" to "https://tng.community/index.php?/forums/")
(added currentloggeduser to download link URL)
Line 3: Line 3:
 
| mod_summary    = Displays a meaningful 404 error message that allows the visitor to browse the sources for your site.
 
| mod_summary    = Displays a meaningful 404 error message that allows the visitor to browse the sources for your site.
 
| mod_validation  = Not compliant, but then it's an error page.
 
| mod_validation  = Not compliant, but then it's an error page.
| download_link  = For {{Tv110}}{{Tv1010}}[https://www.royandboucher.com/ccount/click.php?id=223 source_not_found_v10.1.0.1.zip]<hr />For <span class="nowrap">{{Tv100}}{{Tv90}}</span>[https://www.royandboucher.com/ccount/click.php?id=70 source_not_found_v9.0.0.0.zip]<br />[https://www.royandboucher.com/ccount/click.php?id=71 French language files]<hr />For {{Tv80}} [https://www.royandboucher.com/ccount/click.php?id=72 source_not_found_v8.1.0.zip]<hr />For {{Tv70}}[https://www.royandboucher.com/ccount/click.php?id=73 source_not_found_v1.1.zip]  
+
| download_link  = For {{Tv110}}{{Tv1010}}[https://www.royandboucher.com/ccount/click.php?id=223&user={{CURRENTLOGGEDUSER}}&page={{PAGENAMEE}} source_not_found_v10.1.0.1.zip]<hr />For <span class="nowrap">{{Tv100}}{{Tv90}}</span>[https://www.royandboucher.com/ccount/click.php?id=70&user={{CURRENTLOGGEDUSER}}&page={{PAGENAMEE}} source_not_found_v9.0.0.0.zip]<br />[https://www.royandboucher.com/ccount/click.php?id=71&user={{CURRENTLOGGEDUSER}}&page={{PAGENAMEE}} French language files]<hr />For {{Tv80}} [https://www.royandboucher.com/ccount/click.php?id=72&user={{CURRENTLOGGEDUSER}}&page={{PAGENAMEE}} source_not_found_v8.1.0.zip]<hr />For {{Tv70}}[https://www.royandboucher.com/ccount/click.php?id=73&user={{CURRENTLOGGEDUSER}}&page={{PAGENAMEE}} source_not_found_v1.1.zip]  
 
| download_stats = [https://www.royandboucher.com/ccount/index.php?action=stats&id=70-71-72-73-223 View download statistics]
 
| download_stats = [https://www.royandboucher.com/ccount/index.php?action=stats&id=70-71-72-73-223 View download statistics]
 
| mod_author      = Ken Roy based on Rush Krieger's [[Message 404 - getperson Mod]]
 
| mod_author      = Ken Roy based on Rush Krieger's [[Message 404 - getperson Mod]]

Revision as of 13:44, 24 February 2017

Source Not Found Mod
Summary Displays a meaningful 404 error message that allows the visitor to browse the sources for your site.
Validation Not compliant, but then it's an error page.
Mod Updated {{{mod_last_update}}}
Download link For
TNG 11.0
TNG 10.1.0
source_not_found_v10.1.0.1.zip
For
TNG 10.0
TNG 9.0
source_not_found_v9.0.0.0.zip
French language files
For
TNG 8.0
source_not_found_v8.1.0.zip
For
TNG 7.0
source_not_found_v1.1.zip
Download stats View download statistics
Author(s) Ken Roy based on Rush Krieger's Message 404 - getperson Mod
Homepage Source Not Found Mod (This page)
Mod Support TNG Community Forums
Contact Developer Ken Roy
Latest Mod 10.1.0.1 for TNG V0.1 and up
9.0.0.0 for TNG V9 and up
8.1.0 for TNG V8
1.0 for TNG V7
Min TNG V 7.0.0
Max TNG V 11+
Files modified
showsource.php
Related Mods
Notes
This mod might be helpful to keep visitors on your site if you use the Resequencing_IDs feature in TNG 7.0.0 and above.
If using multiple languages, please add the custom text for your other languages



Purpose of Mod

This mod changes the thispagedoesnotexist.html for the showsource.php to a more friendly 404 page that might keep the user on your site by allowing the visitor to browse the sources for your site.

You may want to consider using this mod if you use the Resequencing_IDs feature in TNG 7.0 to re-sequence Sources, so that search engine links will not fail entirely.

See the TNG Forum entry for TNG 7.0 mod


Developer

Ken Roy based on Rush Krieger's Message 404 - getperson Mod for the individual page.

Requirements

  • A working TNG installation. The automated installation release was initially tested at TNG Version 7.1.0. Manual installation previously used on TNG 7
  • A backup of your TNG showsource.php file.
  • An installed current version of the Mod Manager.

Revision History

Version Date Contents
v10.1.0.1 12 January 2015 updated for TNG V10.1
v9.0.0.0 2 February 2012 updated config file for TNG V9
v8.1.0 27 May 2010 updated config file for TNG V8
v1.1 18 December 2009 updated config file to eliminate dependency on Message 404 - getperson Mod for some of the $text variables
v1.0 25 May 2009 original Mod Manager config file
19 July 2008 Mod originally provided on TNG Forum for TNG 7.0

Automated Install

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

Custom Text Additions

Note that the 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 your other languages, or you need to manually add the custom text to your other language cust_text.php files.

See the English custom Text additions made to your English/cust_text.php file by this mod.

The language additions for French custom Text is shown below.

Note that the config file only includes the custom text for the English language, so you will need to add the other languages that your site supports. Also if you did not install the Message 404 - getperson Mod you will need to add the $text[sorry] to the config file.

Custom Text

English/cust_text.php

The following is added to the English/cust_text.php in TNG V7 and to the languages/English/cust_text.php and languages/English-UTF8/cust_text.php in TNG V8


// Added for Source Not Found message in showsource.php 404 error message
$text['source_sorry'] = "Sorry!";
$text['sourcepagemoved'] = "The page for the source you were looking for may have moved,";
$text['source_use'] = "Please use the ";
$text['tolocatesource'] = " feature to locate the source page.";

French/cust_text.php

For the French language, you would add the following to the French/cust_text.php in TNG V7 and to the languages/French/cust_text.php or languages/French-UFT8/cust_text.php in TNG V8

// Added for Source Not Found message in showsource.php 404 error message
$text[source_sorry] = "Désolé!";
$text[sourcepagemoved] = "La page pour la source que vous cherchez peut-être déplacée,";
$text[source_use] = "Veuillez employer la forme de ";
$text[tolocatesource] = " pour localiser la source.";
  • Try using the Mod Manager Remove capability
  • Or copy your backup showsource.php files to your TNG directory
  • all should be well now

Visualization of this mod

Without Mod

Without this mod, the normal 404 message displayed by TNG is shown in the image on the right.

This page does not exist.jpg

With Mod Installed

With the Message 404 - source Mod installed, the source not found message is changed to one that allows the user to click the Browse All Sources link to find the source as shown in the image on the right.

Message 404 source.jpg

Related Links

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
Our Acadian, French Canadian, and Maine Ancestors Ken Roy I use this TNG mod to help keep on my site if the source ID from a search engine is no longer found. 10.1.0.1 11.0.0 EN, FR
Kemp(e) Family History Andrew Kemp see User:Kempons see User:Kempons EN
... ... ... ... ... ...