Message 404 - getperson Mod

From TNG Wiki

Jump to: navigation, search
Message 404 - getperson Mod
Summary Displays a meaningful 404 error message that allows the visitor to search for the person not found.
Download link person_not_found_v8.1.0.zip for TNG V8
person_not_found_v1.0.zip
Author(s) Rush Krieger
Config file by Ken Roy
Homepage Message 404 - getperson 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 getperson.php
Related Mods Message 404 - showsource 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 getperson.php to a more friendly 404 page that might keep the user on your site by providing a link to the person search page.

You may want to consider using this mod if you use the Resequencing_IDs feature in TNG 7.0 to re-sequence People.

See the TNG Forum for the [TNG Forum http://www.tngforum.us/index.php?showtopic=2186 TNG 6.2 mod] version.

Developer

Rush Krieger

Config file by Ken Roy

Revision History

Version Date Contents
v8.1.0 27 May 2010 updated config file for TNG V8
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 6 and 7
  • A backup of your TNG getperson.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 for TNG V7 and mods folder for TNG V8
  3. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the person_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 and Nederlands custom Text are shown below.

Manual Install

No longer recommended and may not be current.

This mod applies to getperson.php. Replace line 46 (in TNG 7.0, line number is different in TNG 6.2)

   header( "Location: thispagedoesnotexist.html" );

with

//	header( "Location: thispagedoesnotexist.html" ); replaced with custom 404 page Rush/Ken Roy
    header("HTTP/1.0 404 Not Found");
    echo "<center>";
    echo "<font size=\"5\" face=\"Verdana\"> <b>$text[sorry]</b>";
    echo "<font size=\"3\" face=\"Verdana\">";
    echo "<br /><br />$text[personpagemoved]<br />";
    echo "<br />$text[pleaseuse] <a href=$tngdomain/searchform.php>$text[search]</a> 
$text[tolocateperson]";
    echo "</font>";
    echo "</center>"; // see TNG Forum Entry 
http://www.tngforum.us/index.php?s=&showtopic=2186&view=findpost&p=9701 Rush/Ken Roy

cust_text.php

Note $text variables for TNG 7.0 are slightly different to all support the mod for showsource.php

English/cust_text.php

additions


// Added for Person Not Found message in getperson.php 404 error message
$text[sorry] = "Sorry!";
$text[personpagemoved] = "The page for the person you were looking for may have moved,";
$text[pleaseuse] = "Please use the ";
$text[tolocateperson] = " feature to locate the person.";

French/cust_text.php

additions

// Added for Person Not Found message in getperson.php 404 error message
$text[sorry] = "Désolé!";
$text[personpagemoved] = "La page pour la personne que vous cherchez peut-être déplacée,";
$text[pleaseuse] = "Veuillez employer la forme de ";
$text[tolocateperson] = " pour localiser la personne.";

Nederlands/cust_text.php

toevoegingen


// Toegevoegd voor een gebruikers vriendelijkere getperson.php 404 error message
$text[sorry] = "Sorry!";
$text[personpagemoved] = "De pagina voor de gezochte persoon lijkt verplaatst te zijn,";
$text[pleaseuse] = "U kunt de ";
$text[tolocateperson] = " mogelijkheid gebruiken om te persoon te lokaliseren.";

In the event of a problem

  • Try using the Mod Manager Remove capability
  • Or copy your backed up getperson.php file 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 - getperson Mod installed, the person not found message is changed to one that allows the user to click the Search link to find the person using the Advanced Search page as shown in the image on the right.

Related Links

This mod is used in conjunction with the Resequencing IDs to help keep the user on your site, if you resequenced or deleted some IDs.


TNG User sites using this mod

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

Site List

Personal tools
Translators