Message 404 - showsource Mod

From TNG Wiki

Jump to: navigation, search
Message 404 - showsource Mod
Summary Displays a meaningful 404 error message that allows the visitor to browse the sources for your site.
Download link source_not_found_v8.1.0.zip for TNG V8
source_not_found_v1.1.zip for TNG V7
Author(s) Ken Roy based on Rush Krieger's Message 404 - getperson Mod
Homepage Message 404 - showsource Mod (This page)
Mod Support TNG Forums
Latest Mod 8.1.0 for TNG V8
1.0 for TNG V7
Min TNG V 7.0.0
Max TNG V 8.0.0
Files modified showsource.php
Related Mods Message 404 - getperson Mod
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

Contents


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.


Revision History

Version Date Contents
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

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.

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
  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-UFT8/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.

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.

Related Links

TNG User sites using this mod

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

Site List

Personal tools
Translators