Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

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
  #92  
Old 12-30-2008, 11:02 AM
Saviour's Avatar
Saviour Saviour is offline
 
Join Date: Apr 2007
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well...

I, too, have this mod installed on my board. I'm running vbulletin 3.7.4 PL1, along with vbadvanced 3.1.0.

The mod is working fine, but the issues I have are as follows:

1. No navbar.
2. Links in header and footer do not point to the forum pages.
3. Contact Us link in error page does not point to forums/sendmessage.php.

Anyone care to give their "two cents"? Much appreciated...

(Edit: Also, The mod works if you go to the following page: http://www.glitchpc.com/store.html. However, if you go to http://www.glitchpc.com/store.php, it displays the host's default page. Could sure use a lot of help on all of the above.)
Reply With Quote
  #93  
Old 12-31-2008, 12:09 AM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Saviour View Post
Well...

I, too, have this mod installed on my board. I'm running vbulletin 3.7.4 PL1, along with vbadvanced 3.1.0.

The mod is working fine, but the issues I have are as follows:

1. No navbar.
2. Links in header and footer do not point to the forum pages.
3. Contact Us link in error page does not point to forums/sendmessage.php.

Anyone care to give their "two cents"? Much appreciated...

(Edit: Also, The mod works if you go to the following page: http://www.glitchpc.com/store.html. However, if you go to http://www.glitchpc.com/store.php, it displays the host's default page. Could sure use a lot of help on all of the above.)
Lucky... If an image is removed from anywhere above the forum directory and a user tries to access it, the page will display 404, but NO images within the page which looks horrible.
Reply With Quote
  #94  
Old 12-31-2008, 03:32 PM
Saviour's Avatar
Saviour Saviour is offline
 
Join Date: Apr 2007
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually...

I decided against this mod...and created my own error pages. Much more reliable...and easier to configure.

Uninstalled!
Reply With Quote
  #95  
Old 01-08-2009, 11:56 PM
lilbill0005's Avatar
lilbill0005 lilbill0005 is offline
 
Join Date: Jan 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A few quick edits got the navbar added, which I wanted, but, I can't get images to display if errors are caused anywhere except for within the forums directory.

So, you either:
a) need to add a $forumpath type variable to specify where the forums are (to get sendmessage to point to the proper file, as well as to show images, etc.)

or, as a cop-out:
b) Have people put the .htaccess file within their forum directory, so it only has those http errors for the forums themselves.

I'll be working on a fix for the forumpath thing, but, I'm not a great PHPer. >.<
Reply With Quote
  #96  
Old 01-16-2009, 09:26 AM
lilbill0005's Avatar
lilbill0005 lilbill0005 is offline
 
Join Date: Jan 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There's actually so much wrong with this, I don't even know that it's worth fixing. At least not for me. Every time I fix one problem, I run into another. I'm thinking about disabling it.

By the way, because I realized I'd forgotten to post this earlier, here's how to add the navbar:

Open up httperror.php

Find:
Code:
$globaltemplates = array(
	'HTTP_ERROR',
	'http_error_bit'
);
Change to:
Code:
$globaltemplates = array(
	'HTTP_ERROR',
	'http_error_bit',
	'navbar'
);
Find:
Code:
$httperrorbit = '';
After, add:
Code:
$navbar = '';
Find:
Code:
	eval('$httperrorbit = "' . fetch_template('http_error_bit') . '";');
Before, Add
Code:
	eval('$navbar = "' . fetch_template('navbar') . '";');

Then, in your HTTP_ERROR template, find $header, and add $navbar on the next line.

And you'll have a navbar. Then, to get CSS and images working, change your code for each error from something like:
Code:
ErrorDocument 404 /forums/httperror.php?e=404
to:
Code:
ErrorDocument 404 http://www.example.com/forums/httperror.php?e=404
Unfortunately, while that makes the pages and images work properly, it nulls the use of a back button, as it actually does a sort of permanent redirect to the page. The problem is, the variables and CSS stuff need to be globalized, and despite the script pretending to be somewhere else, it needs to know where it actually is, and it's not doing that.

On top of that- and this is something I wouldn't know how to fix entirely- if someone is making a call to an image or script or file via inline what-have-you, they get a 404, and show up in the WOL as viewing the Who's Online Script. I have no idea how to make it not do that, as it'd be calling images and scripts and such after it's already called the thread. I think the best idea would be to remove it from Who's Online altogether, as it doesn't matter if someone is viewing an error page. -_-

I've fixed it by putting blank scripts where ones were being called, but, that's a cheesy solution, and I shouldn't have to.

If the original author or someone more professional than I can fix these flaws, that'd be great.

Someday, I'll learn PHP. T_T

EDIT: As far as fixing the online thing (I mean, why would you want to have "So and so is viewing a page that isn't there! Wee! Especially when that's blocking what they are actually viewing. I mean, someone could purposefully link to an image on the site to block their thread from showing up in the Who's Online; it's not good), in the AdminCP find the plugin manager, and look for "Product : Custom Error Pages"

and uncheck both "Custom Error Page (Online Location Process) - online_location_process" and "Custom Error Page (Online Location Unknown) - online_location_unknown". Then, hit enter, or scroll to the save button. This will disable anything displaying on the Who's Online page, to avoid anyone having to mess with anything. Although, it could be useful for debugging, to see if any pages are making calls to things that aren't there. Although, I guess you could just check Firefox's Error Console. XD

I hope my post has been helpful. ^_^
Reply With Quote
  #97  
Old 04-06-2009, 03:03 PM
Icy Icy is offline
 
Join Date: Nov 2007
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Having problem with the page title. Its showing HTTP Array at Golpo Community

http://www.golpo.net/forum/icy.php
Reply With Quote
  #98  
Old 05-26-2009, 12:33 PM
Saviour's Avatar
Saviour Saviour is offline
 
Join Date: Apr 2007
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Decided to give this mod another chance...

I have worked out my previous issues. However, I do have a question...and hopefully, someone will be able to point me in the right direction.

I used to have the DownloadsII mod installed. If I go to the downloads.php page of my site...I get an error 404 from this mod...no problem there...since the mod is no longer installed. However, if I go to a file location, such as: http://glitchpc.com/forums/downloads.php?do=file&id=10, then a blank page is displayed, but no error page.

Does anyone have an idea why this is happening?

I'm running vB 3.8.2.
Reply With Quote
  #99  
Old 05-26-2009, 08:55 PM
Saviour's Avatar
Saviour Saviour is offline
 
Join Date: Apr 2007
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update...

Resolved this issue by re-installing the DownloadsII mod.
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 06:34 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.05723 seconds
  • Memory Usage 2,297KB
  • 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
  • (8)bbcode_code
  • (1)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
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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