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

Reply
 
Thread Tools
Custom HTTP Error Pages Details »»
Custom HTTP Error Pages
Version: 2.1.3, by JJR512 JJR512 is offline
Developer Last Online: Jun 2006 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 10-11-2005 Last Update: 10-27-2005 Installs: 60
Uses Plugins Template Edits
Additional Files  
No support by the author.

This is a re-write of a hack I made for vBulletin 2.x.

What this hack does is use vBulletin to generate HTTP error pages (such as the 404 - Not Found error). For those of you trying to get an all-vB-based-site, this addition will help complete your quest. Also for anyone who wants a nicer looking HTTP error message than the standard blah.

Note: Your website needs to be on a server that uses a .htaccess file, a file located in your root public directory. This may only be servers using the Apache HTTP server, I'm not sure if any other HTTP server, like Microsoft IIS, uses that or not. Some more notes on this are included in the instructions.txt file.

There are no vB files to modify. There is one file to upload, and one product to install, which will install several new templates and two plugins. The plugins are for Who's Online display. The templates contain the actual messages. No existing templates are modified.

Special thanks to KirbyDE for showing me how to group templates using a plugin rather than a code modification.

This hack has now been re-written to use phrases. If you have a previous version, here's what you can do to upgrade.
1. Upload the new httperror.php file.
2. Add the product-jjr512_httperr.xml, overwriting the existing. (All old non-used templates should be removed automatically. This version uses only two templates: HTTP_ERROR and http_error_bit.)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 10-27-2005, 12:24 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Avalon111
update!

when i remove the changes in the .htaccess the problem is gone!
Quote:
Originally Posted by oglsmm
I also am getting a lot of people reported as "Viewing HTTP Error" on the Who's Online page, when i know they are not seeing an error. I don't have anything in my .httaccess file either.
If you don't have anthing in your .htaccess file, how is the hack working at all? Sure, if you go to www.yourdomain.com/forums/httperror.php?e=404 you'll see the error page, but what if you go to www.yourdomain.com/xkaooe3991.html, a file which probably doesn't exist on your server, do you get the error page from my hack then? Because as far as I'm aware, custom error pages need to be "pointed" to by the .htaccess file, otherwise you get the generic error page. And if I'm wrong about that, then I guess I need to be re-educated.
Reply With Quote
  #43  
Old 10-27-2005, 01:54 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi people,

it looks like this is not working for error code 401 (autorization requirerd) the screen that comes up if you try to login to restricted area with the wrong login information.My apache error_log shows this

Code:
can't use a FULL url in a 401 ErrorDocument ignoring
for this error code it must be a local document so ......

Code:
ErrorDocument 401 /httperror.php?e=401
should do it but nope ...
Reply With Quote
  #44  
Old 10-27-2005, 04:57 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Assuming that your httperror.php is in the web root (meaning not in a forums subfolder), did you try it without the beginning slash? Try it using a path name instead of a URL?
Reply With Quote
  #45  
Old 10-27-2005, 06:52 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi,

Yes the httperror.php is in the "webroot" i didn't tryed that yet (using an aboslute pathname or remoing the slash) will give that a shot and get back to you
Reply With Quote
  #46  
Old 10-27-2005, 06:54 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JJR512
Did you do anything to fix the problem?
Nah actually it was just a silly mistake I've made. I forgot to upload the product XML file via the admincp. The hack's working just fine!
Reply With Quote
  #47  
Old 10-27-2005, 06:58 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Delphiprogrammi
hi,

Yes the httperror.php is in the "webroot" i didn't tryed that yet (using an aboslute pathname or remoing the slash) will give that a shot and get back to you
just tryed this absolute path and no beginning "/" but the problem is elsewhere i think my apache error_log shows this

Quote:
[Thu Oct 27 14:55:20 2005] [error] [client ********] File does not exist: /401.shtml
i'm on a dedicated server (cpanel) maybe that has anything todo with it i didn't configure the "errorpages" in my cpanel through
Reply With Quote
  #48  
Old 10-27-2005, 09:30 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well,

punch me but all of a sudden it started to work.All i did before it started to work is just access the page that would bring up that error page eg http://www.yourserver.com/httperror.php?e=401 and the line in my .htaccess for errorcode 401 is

Code:
ErrorDocument 401 /httperror.php?e=401
also i found while searching on google that the leading "/" means to be a local document not a url
Reply With Quote
  #49  
Old 10-28-2005, 11:38 AM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot, it's great, it saved me lots of time
Reply With Quote
  #50  
Old 10-28-2005, 03:48 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will shortly be changing the instructions to not have the full URL to the file, just the local file name, as in Delphiprogrammi's code example in Post# 47. Maybe it only applies to the one type of error, maybe there are others, so just in case, I'm recommending that for all of them.
Reply With Quote
  #51  
Old 11-03-2005, 04:23 PM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JJR512
I will shortly be changing the instructions to not have the full URL to the file, just the local file name, as in Delphiprogrammi's code example in Post# 47. Maybe it only applies to the one type of error, maybe there are others, so just in case, I'm recommending that for all of them.
After I installed this a lot of my members complain that they keep seing it in pages that exist, especially on the home page of the site!
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 12:47 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.05941 seconds
  • Memory Usage 2,316KB
  • 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
  • (3)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete