The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Custom HTTP Error Documents Details »» | |||||||||||||||||||||||||
I've made a little hack that will show custom HTTP error documents to any visitor to your site, if he or she creates the error condition. These are errors like 404 (file not found) or 500 (internal server error). I've included processing for about 23 various HTTP errors.
The error documents are templates within vBulletin, but these do not apply only to vBulletin. Any visitor to any part of your site would see the error document (if appropriate). Now obviously this means that this hack should not be used by those of you that do not allow guest/unlogged-in viewing of your board, because if a guest creates an error condition, he/she would only see the vBulletin "not logged in or no permission" message, which wouldn't be very useful. This hack also involves modifying your .htaccess file, and I believe only Apache-powered servers use that (correct me if I'm wrong). Because screwing up that file can make your site unusable, make sure you keep a backup copy of it, and if you can't find a .htaccess file in your root web directory, check with your webhost to see if they've hidden it, which is often the case. DO NOT just make a new, blank .htaccess file and upload it because you may overwrite a hidden one, potentially killing your site. As you can probably tell by now, this hack is perhaps not an appropriate choice for the complete newbie. I strongly suggest that you use this hack only if you read the directions and actually understand them; many times, people just blindly follow the instructions without a clue as to what they're doing, and usually, this is fine, but I'm warning you now, you can hurt your site if you screw this up, and if you don't know what you're doing, you won't know how to fix it if/when you do screw it up. (By now you may be asking why I'm releasing this. Well, I did it originally for my own site, and figured some others of you may like it as well. This is actually a very simple hack to install; it involves only one file mod, one new very small file, and importing one file into the db, and that's it. You may wish to modify/customize the templates as you desire. You will find them in with the regular vB templates in the section "HTTP Error Templates".) For a demo, please visit this non-existant page on my website, to show you a 404 (other errors look similar, with customized messages): http://www.jjr512.com/ddkd4iafgi8d.php Show Your Support
|
Comments |
#22
|
||||
|
||||
Marry me JJR512
|
#23
|
||||
|
||||
Quote:
ErrorDocument 400 /forums/error.php?error=400 |
#24
|
||||
|
||||
Tested, yep, it works like that.
|
#25
|
|||
|
|||
Quote:
|
#26
|
||||
|
||||
Quote:
Satan |
#27
|
||||
|
||||
ok here is an interesting bad bug i foun thats gona keep me from useing this great hack. in the online users for 90% of my users it shows: Unknown Location: /forums/error.php?error=404 (in included a screen shot) even for me even know im viewing online.php. It does this same thing on you forums to JJR512 except it seems you modifyed your online.php to make it look cleaner.
might wanna get this fixed b/c i use my online.php alot. |
#28
|
|||
|
|||
This is NOT a bug.
Every different file that is not set in the source code of vBulletin, will display as unknown location. You have to edit it. |
#29
|
||||
|
||||
To make it look nicer in Who's Online:
Open online.php Find: Code:
case 'gallery': $userinfo[where] = "Viewing Picture <a href='gallery.php?s=$session[sessionhash]'>Gallery</a>"; break; Code:
// HTTP Errors case 'httperror': $userinfo[where] = "Experiencing an HTTP Error"; break; // End HTTP Errors Code:
case 'gallery.php': $userinfo[activity] = 'gallery'; break; Code:
// HTTP Errors case 'error.php': $userinfo[activity] = "httperror"; break; // End HTTP Errors |
#30
|
||||
|
||||
why do all thoughs errors go away when i take the error.php out then? And for me it shows the error and im looking at the online.php
|
#31
|
||||
|
||||
I'm sorry...I'm not quite certain I understand the problem here.
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|