![]() |
Custom error-handler based on vBulletin templates
What this hack does?
--------------------------- UPDATE: Improved instruction.txt, fixed for those who use external style sheets This hack adds a custom error-handler to your site using the vBulletin template engine to display the appropriate errors (e.g. 404 File not Found, 403 Forbidden, etc). Demo ------- Go to my site and enter some non-existing url. E.g. Random 404 Error. Or try to access my /cgi-bin path to receive a 403 error. What to do? ---------------- queries to run: 0 templates changed: 0 templates added: 1 (ERROR_SHELL) files changed: 1 (.htaccess) files added: 1 (error.php) Time needed to install ---------------------------- < 5 mins |
Ahhh, a new toy for me to play with. Thank you very much, sir. ;)
[high]* Boofo clicks the install button continuously![/high] |
beautiful :)
|
Nice work. I'll add to my install list :cool:.
|
I'm having a strange problem with my style background not showing as well as the alt1 and alt2 variables. :(
|
I can't get this to work. I know it has something to do with how I'm doing the htaccess file.
|
Same here. When I install it every page get's a 500 error. Everything is in my root folder, I commented out the chmod line but to no avail.
|
Quote:
|
You might want to take out custom code in that error.php and re-release it...
Also a side note to anybody installing it, if you haven't put absolute paths to your navbar links, you'll see they point to incorrect files. |
Quote:
|
Quote:
What's wierd is that my home page doesn't have a problem with it. |
Good hack, but my host already lets me make my own error pages so I could easily do this without the hack.
Great job though! |
I don't know if it validates but placing
Code:
<base href="http://www.sportboard.de" /> test.html goes to http://www.sportboard.de/test.html and even a relative link to a stylesheet should change. Pure magic ;) |
oooh now this is handy :) thnx very much :)
|
Ok, I updated the hack with improved instruction. Please download again.
@Boofo: Error.php is now copied to your forums path; please re-download the hack. I assume you store CSS stylesheets as files, this is why it didn't work correctly for you. @Preech/FleaBag: Check the new instruction. Perhaps you need to ask your webhost for assistance. @Dankinit: Ok, I moved the custom error handling specific to my site to /example/. I included it first place to help people further customizing their error responses. Greets Alex |
*install*
|
Quote:
|
Boofo did you read the new instruction? Earlier you said yourself that "if the error.php file is accessed from my forums directory, it looks like it is supposed to" ?!
Edit: Ahh I think i understand your problem now. I must think again if it is at all possible to support external style sheets like in your case then. Perhaps if you copy the style sheets to your root path, but that would be a pain. Lemme think about it. Edit2: Could you add <base href="http://www.yoursite.com/yourforum/" /> to the <head> section of the ERROR_SHELL template and see if it does any difference? Greets |
Quote:
Do I need to put a closing </base> anywhere with that? |
Quote:
|
Quote:
https://vborg.vbsupport.ru/showthread.php?t=63520 |
Quote:
|
Quote:
|
Wow, this is awesome. :D Saves me a LOT of work.
[high]* Synicide clicks install![/high] |
Quote:
|
Quote:
|
Quote:
|
Quote:
Code:
<base href="$vboptions[bburl]" /> Also a switch($_SERVER['REDIRECT_STATUS']) would probably be a nicer way to code this ... rather than all those else if's Just a personal preference thing :) [high]* Natch clicks install just the same :) [/high] Great idea! |
Quote:
How would you set up the switch code? |
As I mentioned in the post above, this code can be more efficient (and easier to add new error codes) witha switch statement:
Find: PHP Code:
PHP Code:
In the ERROR_SHELL template, find: HTML Code:
<title>$vboptions[bbtitle]</title> HTML Code:
<title>$error[title] - $vboptions[bbtitle]</title> |
Quote:
Quote:
|
I believe that Zachery has posted code that gives an absolute path to the link href statement to call stylesheets - that's why I didn't notice it not working ... it did for me :)
|
Witrh Zach's code, I don't need the Base code in the template anymore. Thank you, sir. ;)
|
Quote:
|
Where I can add the 'AllowOverride FileInfo' entry?
Problem already resolved, thanks |
Quote:
|
Quote:
|
i wasn't using the sendmessage.php, so the link was messed up for contact. that should be an option.
also, it's funny, when you do click the contact us link, it takes u to the contact page and after you send it, it takes u back to the 404 page. ;) |
Quote:
|
Quote:
|
All times are GMT. The time now is 07:08 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|