Back to vBulletin 3.8 Add-ons

Perfect 404 Error Page
Mod Version: 1.00, by Arcade Fire

vB Version: 3.8.x Rating: (2 votes - 4.50 average) Installs: 24
Released: 10 Oct 2009 Last Update: Never Downloads: 284
Not Supported Template Edits Additional Files Re-usable Code Translations  

Hi!

This is my first mod.

The common 404 error page, makes visitors close our website since it has no navigation. In this way we lose many users as our url has been changed wen remove vBseo, tFseo or other causes.

The modification is simple, create an error page with the internal browser and offer a google search box.

Step 1 - Add New Template
Title: custom_404

Template:

PHP Code:
$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
<
title>$vboptions[bbtitle]</title>
$headinclude
</head>
<
body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="tcat">The requested URL was not found on this server.</td>
</
tr>
<
tr>
    <
td class="alt1">
<
script type="text/javascript">
  var 
GOOG_FIXURL_LANG 'en';
  var 
GOOG_FIXURL_SITE 'http://YourSite.com';
</
script>
<
script type="text/javascript" 
    
src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>

<
dd><LI>Back to <A HREF="http://YourSite.com"><b>home page</b></A></dd>

<
br><br>   
  

<
dd><LI><script type="text/javascript"><!--
google_ad_client "pub-***********YOUR ID***********";
/* 728x15, creado 13/02/09 */
google_ad_slot "9714452317";
google_ad_width 728;
google_ad_height 15;
//-->
</script>
<
script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</
script></dd>

</
td>
</
tr>
</
table>

$footer
</body>
</
html
Edit:
  • http://YourSite.com - change for the url of your website two times
  • google_ad_client = "pub-***********YOUR ID***********"; Enter your PUB number or delete the following if you want to display advertising
PHP Code:
<br><br>   
  

<
dd><LI><script type="text/javascript"><!--
google_ad_client "pub-***********YOUR ID***********";
/* 728x15, creado 13/02/09 */
google_ad_slot "9714452317";
google_ad_width 728;
google_ad_height 15;
//-->
</script>
<
script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</
script></dd
Step 2 - Upload 404.php file

Up the attachment to the root of your forum.

Step 3 - Add or change your .htaccess

If you have the file, add the following:

PHP Code:
ErrorDocument 404 http://YourSite.com/404.php 
if you do not, you can upload the attachment or create it with this content.

...........................................................................

Try to work accessing a non existing url
Example: http://www.YourSite.com/tsdsd

DEMO: http://rotolandia.com/inddfdfdf

INFO: https://www.google.com/support/webmasters/bin/answer.py?answer=93641&ctx=sibling

Greetings!

Sorry about my English and if this mod is too simple

History:

Update 1: #16

Spoiler (click to open)


@ MagicThemeParks, try with this code:

Update:


XHTML Valid [Whithout tables]



Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>
     $vboptions[bbtitle]
    </title>
  </head>
  <body>
$header
$navbar 
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
      <tr>
        <td class="tcat">
          The requested URL was not found on this server.
        </td>
      </tr>
      <tr>
        <td class="alt1"><script type="text/javascript"
          xml:space="preserve">//<![CDATA[
  var GOOG_FIXURL_LANG = 'en';
  var GOOG_FIXURL_SITE = 'http://YourSite.com';
//]]></script> <script type="text/javascript"
          src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"
          xml:space="preserve"></script> Back to <a
          href="http://YourSite.com"><b>home page</b></a> <br /><br /><script
          type="text/javascript" xml:space="preserve">//<![CDATA[
google_ad_client = "pub-***********YOUR ID***********";
/* 728x15, creado 13/02/09 */
google_ad_slot = "9714452317";
google_ad_width = 728;
google_ad_height = 15;
//
//]]></script> <script type="text/javascript"
          src="http://pagead2.googlesyndication.com/pagead/show_ads.js"
          xml:space="preserve">//<![CDATA[
//]]></script>
        </td>
      </tr>
    </table>
   $footer
  </body>
</html>
Screenshot:


Close


XHTML Valid [Whithout tables]

Download

File Type: %1$s .htaccess.zip (163 Bytes, 155 downloads)
File Type: %1$s 404.php (1.3 KB, 229 downloads)


vblts.ru supports vBulletin®, 2022-2025