Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

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
  #2  
Old 10-10-2009, 09:46 AM
Michael1337 Michael1337 is offline
 
Join Date: Oct 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks nice, gratz on first Mod (:
Reply With Quote
  #3  
Old 10-10-2009, 04:23 PM
Medtech's Avatar
Medtech Medtech is offline
 
Join Date: Oct 2007
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!!
Reply With Quote
  #4  
Old 10-10-2009, 04:40 PM
PixelFx PixelFx is offline
 
Join Date: Dec 2002
Posts: 1,117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Very nice!
Reply With Quote
  #6  
Old 10-12-2009, 03:13 PM
Black Tiger's Avatar
Black Tiger Black Tiger is offline
 
Join Date: Apr 2004
Location: Netherlands
Posts: 957
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great, I'm going to install this one, thank you! *Marked installed *
Reply With Quote
  #7  
Old 10-14-2009, 11:34 PM
Mike08 Mike08 is offline
 
Join Date: Sep 2006
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved to install "Hamijo"

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

looks good, I needed this!
Reply With Quote
  #9  
Old 10-15-2009, 01:19 AM
segwayon segwayon is offline
 
Join Date: Mar 2008
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way of getting a report on what URL might have been requested in order to be redirected to this 404 page? After installing the mod I notice that the WhosOnline page will show this 404.php on occasion, and the page being viewed mentions 'Unknown Location.'

UPDATE: I notice that the online.php page gets listed as this 'Unknown Location -- forum/404.php' within the Who'sOnline. It will list myself as viewing the 404.php page, while I'm actually viewing the online.php page. Any idea on how to fix this bug?

Update2: Could the reason that the online.php page is being erroneously marked as 'Unknown Location - 404.php' is because my online.php page contains some modifications to its template?

Update3: Uninstalled. Hope everyone else's 404 mod is working okay. It looked very nice and did its job, but would cause erroneous 404 markers in the Who's Online page. If it gets a fix I'll be happy to revisit it.
Reply With Quote
  #10  
Old 11-01-2009, 11:30 AM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;



Then find:
Code:
case 'modcplogin':
            $userinfo['action'] = $vbphrase['moderator_control_panel_login'];
            break;

Below add:
Code:
case 'custom_404':
            $userinfo['action'] = 'Viewing Error Page';
            break;
Reply With Quote
Reply

Thread Tools

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 03:43 PM.


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.08718 seconds
  • Memory Usage 2,336KB
  • Queries Executed 24 (?)
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
  • (4)bbcode_code
  • (3)bbcode_php
  • (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
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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