Difference between revisions of "Source Not Found Mod"
m (→Automated Install: changed config file name to all lower case) |
|||
Line 1: | Line 1: | ||
+ | {{TNGmod | ||
+ | | mod_name = Message 404 - showsource Mod | ||
+ | | mod_summary = Displays a meaningful 404 error message that allows the visitor to browse the sources for your site. | ||
+ | | download_link = [[Media:source_not_found_v1.1.zip| source_not_found_v1.1.zip]] | ||
+ | | mod_author = Ken Roy based on Rush Krieger's [[Message 404 - getperson Mod]] | ||
+ | | mod_url = [[Message 404 - showsource Mod]] (This page) | ||
+ | | mod_support = [http://www.tngforum.us/ TNG Forums] | ||
+ | | mod_version = 1.0 | ||
+ | | use_mod_manager = Yes | ||
+ | | manual_install = Yes, but no longer recommended and may not be current | ||
+ | | min_TNG_ver = 7.0.0 | ||
+ | | max_TNG_ver = 7.1.2 | ||
+ | | TNG_file_list = showsource.php | ||
+ | | related_mods = [[Message 404 - getperson Mod]] | ||
+ | | notes = This mod might be helpful to keep visitors on your site if you [[Resequence IDs]]<br />If using multiple languages, please add the [[Message 404 - showsource Mod#Custom Text Additions|custom text]] for your other languages | ||
+ | }} | ||
+ | |||
{|align=right | {|align=right | ||
|__TOC__ | |__TOC__ | ||
|} | |} | ||
+ | |||
== Purpose of Mod == | == Purpose of Mod == | ||
− | This 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 [http://www.tngforum.us/index.php?showtopic=2223&pid=17438&st=0&#entry17438 TNG 7.0 mod] | ||
− | |||
== Developer == | == Developer == | ||
− | Ken Roy based on Rush Krieger's 404 | + | Ken Roy based on Rush Krieger's [[Message 404 - getperson Mod]] for the individual page. |
+ | |||
+ | |||
+ | == Revision History == | ||
+ | |||
+ | {| border="1" cellspacing="5" cellpadding="2" width="100%" class="wikitable" | ||
+ | |- | ||
+ | ! Version | ||
+ | ! Date | ||
+ | ! Contents | ||
+ | |- | ||
+ | | 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 [http://www.tngforum.us/index.php?showtopic=2223&pid=17438&st=0&#entry17438 TNG 7.0] | ||
+ | |} | ||
==Requirements== | ==Requirements== | ||
Line 17: | Line 60: | ||
* 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 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. | * A backup of your TNG showsource.php file. | ||
+ | * An installed current version of the [[Mod Manager]]. | ||
+ | |||
+ | == Automated Install == | ||
+ | # Download the [[Media:source_not_found_v1.1.zip | source_not_found_v1.1.zip]] | ||
+ | # Unzip the downloaded config file into your admin/mod_folder | ||
+ | # Follow the normal automated installation for Mod Manager, as shown in the example [[Mod Manager - Installing Config Files]] to install the '''source_not_found_v1.1.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 [[Message 404 - source Mod#English/cust_text.php|English custom Text]] additions made to your English/cust_text.php file by this mod. | ||
− | + | The language additions for [[Message 404 - source Mod#French/cust_text.php|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. | '''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. | ||
== Manual Install == | == Manual Install == | ||
+ | <span style="color: red">No longer recommended and may not be current.</span> | ||
This mod applies to showsource.php. Replace line 30 (in TNG 7.0, line number might be different in TNG 6.2) | This mod applies to showsource.php. Replace line 30 (in TNG 7.0, line number might be different in TNG 6.2) | ||
Line 59: | Line 111: | ||
<pre> | <pre> | ||
− | |||
− | |||
// Added for Source Not Found message in showsource.php 404 error message | // 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[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."; | $text[tolocatesource] = " feature to locate the source page."; | ||
</pre> | </pre> | ||
Line 70: | Line 122: | ||
additions | additions | ||
<font color=green> | <font color=green> | ||
− | <pre> | + | <pre> |
− | |||
// Added for Source Not Found message in showsource.php 404 error message | // 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[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."; | $text[tolocatesource] = " pour localiser la source."; | ||
</pre> | </pre> | ||
</font> | </font> | ||
− | + | * Try using the [[Mod_Manager_-_Installing_Config_Files#Remove_Mod_Steps|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. | ||
+ | |[[Image:This_page_does_not_exist.jpg|500px|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. | ||
+ | |[[Image:Message_404_source.jpg|500px|right]] | ||
+ | |} | ||
== Related Links == | == Related Links == |
Revision as of 16:35, 18 December 2009
Message 404 - showsource Mod | |
---|---|
Summary | Displays a meaningful 404 error message that allows the visitor to browse the sources for your site. |
Validation | {{{mod_validation}}} |
Mod Updated | {{{mod_last_update}}} |
Download link | source_not_found_v1.1.zip |
Download stats | {{{download_stats}}} |
Author(s) | Ken Roy based on Rush Krieger's Message 404 - getperson Mod |
Homepage | Message 404 - showsource Mod (This page) |
Mod Support | TNG Forums |
Contact Developer | {{{mod_contact}}} |
Latest Mod | 1.0 |
Min TNG V | 7.0.0 |
Max TNG V | 7.1.2 |
Files modified | showsource.php |
Related Mods | |
Notes | This mod might be helpful to keep visitors on your site if you Resequence IDs 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.
Revision History
Version | Date | Contents |
---|---|---|
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
- Download the source_not_found_v1.1.zip
- Unzip the downloaded config file into your admin/mod_folder
- Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the source_not_found_v1.1.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.
Manual Install
No longer recommended and may not be current.
This mod applies to showsource.php. Replace line 30 (in TNG 7.0, line number might be different in TNG 6.2)
header( "Location: thispagedoesnotexist.html" );
with
// header( "Location: thispagedoesnotexist.html" ); replaced with custom 404 page 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[sourcepagemoved]<br />"; echo "<br />$text[pleaseuse] <a href=$tngdomain/browsesources.php>$text[browseallsources]</a> $text[tolocatesource]"; 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
English/cust_text.php
additions
// 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
additions
// 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
- 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.
- Message 404 - getperson Mod
TNG User sites using this mod
- Please add TNG site that you have found that utilize this modification
Site List
- Our Acadian, French Canadian, and Maine Ancestors I use this TNG mod to help keep on my site if the source ID from a search engine is no longer found. (Ken Roy)