Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Perfect 404 Error Page Details »»
Perfect 404 Error Page
Version: 1.00, by Arcade Fire Arcade Fire is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.8.x Rating:
Released: 10-09-2009 Last Update: Never Installs: 24
Supported Template Edits
Re-useable Code Additional Files 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: Sorry, Remove.

INFO: http://www.google.com/support/webmas...41&ctx=sibling



Greetings!

Sorry about my English and if this mod is too simple

History:

Update 1: #16

XHTML Valid [Whithout tables]

Download Now

File Type: zip .htaccess.zip (163 Bytes, 153 views)
File Type: php 404.php (1.3 KB, 227 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
SWSUSA

Comments
  #12  
Old 11-01-2009, 02:19 PM
Delifed Delifed is offline
 
Join Date: Feb 2009
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool looks nice i may have to use. Thanks,
Reply With Quote
  #13  
Old 11-01-2009, 02:25 PM
MagicThemeParks's Avatar
MagicThemeParks MagicThemeParks is offline
 
Join Date: Sep 2009
Posts: 850
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does the page validate without errors? I haven't added it yet, but I'm planning to do so.

The DEMO is showing 57 errors: http://validator.w3.org/check?uri=ht...Inline&group=0
Reply With Quote
  #14  
Old 11-03-2009, 04:15 PM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MagicThemeParks View Post
Does the page validate without errors? I haven't added it yet, but I'm planning to do so.

The DEMO is showing 57 errors: http://validator.w3.org/check?uri=ht...Inline&group=0
I try to fix this... :erm:
Reply With Quote
  #15  
Old 11-03-2009, 11:29 PM
MagicThemeParks's Avatar
MagicThemeParks MagicThemeParks is offline
 
Join Date: Sep 2009
Posts: 850
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Arcade Fire

Please let us know when it's fixed because this is a great mod and helps those folks just starting out. :up:
Reply With Quote
  #16  
Old 11-06-2009, 08:47 AM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ 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:

Reply With Quote
  #17  
Old 11-06-2009, 11:40 AM
segwayon segwayon is offline
 
Join Date: Mar 2008
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Arcade Fire View Post
Who's Online Modification

If you want to show who is browsing this new page of yours, just open up includes/functions_online.php and find:
Code:
case 'bugs.php':
        $userinfo['activity'] = 'bugs';
        break;

Below, add:
Code:
case '404.php':
        $userinfo['activity'] = '404 page';
        break;

. . .
My file doesn't contain a case listing for 'bugs.php'. Is there an alternate location where the new code can be placed?
Reply With Quote
  #18  
Old 11-06-2009, 12:53 PM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by segwayon View Post
My file doesn't contain a case listing for 'bugs.php'. Is there an alternate location where the new code can be placed?

After or below of:

Code:
	case 'forumdisplay.php':
		$userinfo['activity'] = 'forumdisplay';
		break;
Reply With Quote
  #19  
Old 11-06-2009, 09:58 PM
segwayon segwayon is offline
 
Join Date: Mar 2008
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Arcade Fire View Post
After or below of:

Code:
	case 'forumdisplay.php':
		$userinfo['activity'] = 'forumdisplay';
		break;
Thanks. I altered that function file. The online.php page still shows me as visiting "Unknown Location . . . /forum/404.php" Is there something I missed?
Reply With Quote
  #20  
Old 11-07-2009, 07:24 AM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Recharge once the browser and you should show the current location. I noticed that not always shown in real time, whether you have installed this mod or not.


Greetings.-
Reply With Quote
  #21  
Old 11-10-2009, 12:41 AM
CSS59 CSS59 is offline
 
Join Date: Oct 2004
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i get nothing when i go to : http://www.rotolandia.com/404.php
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:20 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04616 seconds
  • Memory Usage 2,369KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete