Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Custom error-handler based on vBulletin templates Details »»
Custom error-handler based on vBulletin templates
Version: 1.00, by AlexanderT AlexanderT is offline
Developer Last Online: Jul 2021 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 05-10-2004 Last Update: Never Installs: 34
 
No support by the author.

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

Show Your Support

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

Comments
  #12  
Old 05-11-2004, 09:47 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dankinit
Sounds like it's looking in the wrong place for the css file. I think i had to hack my board to give it an absolute path for the css file...can't remember though, it was awhile ago.
Where would I have to give the path for that at? Do you remember?

What's wierd is that my home page doesn't have a problem with it.
Reply With Quote
  #13  
Old 05-12-2004, 04:59 AM
GamerJunk.net's Avatar
GamerJunk.net GamerJunk.net is offline
 
Join Date: Jan 2004
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #14  
Old 05-12-2004, 05:04 AM
MrNase MrNase is offline
 
Join Date: May 2003
Location: Germany
Posts: 670
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know if it validates but placing

Code:
	<base href="http://www.sportboard.de" />
above </header> makes all links have an absolut path

test.html goes to http://www.sportboard.de/test.html and even a relative link to a stylesheet should change.

Pure magic
Reply With Quote
  #15  
Old 05-12-2004, 05:11 AM
colicab-d's Avatar
colicab-d colicab-d is offline
 
Join Date: Dec 2002
Location: Glasgow
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oooh now this is handy thnx very much
Reply With Quote
  #16  
Old 05-12-2004, 06:16 AM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #17  
Old 05-12-2004, 07:50 AM
Phalynx Phalynx is offline
 
Join Date: Feb 2004
Location: Erlangen, Germany
Posts: 2,747
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*install*
Reply With Quote
  #18  
Old 05-12-2004, 09:48 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AlexanderT
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.

Greets
Alex
Didn't chnage anything. I still get the same thing on the home page. If I select NO for stylesheets as files, it works fine. But I like to have them as files.
Reply With Quote
  #19  
Old 05-12-2004, 10:44 AM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #20  
Old 05-12-2004, 11:15 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AlexanderT
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
That fixed it! Thank you, sir.

Do I need to put a closing </base> anywhere with that?
Reply With Quote
  #21  
Old 05-12-2004, 11:48 AM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
That fixed it! Thank you, sir.
Do I need to put a closing </base> anywhere with that?
Cool. I have updated the instruction accordingly. <base> is an empty tag, or a standalone tag, that doesn't use a </base> endtag. The /> at the end is sufficient to make the code xhtml 1.0-valid.
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 04:36 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.04833 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
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
  • (1)bbcode_code
  • (4)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
  • (3)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