vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Custom HTTP Error Documents (https://vborg.vbsupport.ru/showthread.php?t=41651)

Floris 07-29-2002 03:21 PM

Tried it, ..

cpanel 4.9 lets you save as 400.shtml etc.
So I just put in a meta refresh tag for 0s to redirect to the error.php and it works now very nice :)

Dean C 07-29-2002 03:28 PM

Quote:

1. Import the newtemplates.sql into your database. NOTE: You should make a backup of your database first, or at least of the template table.
How do i do this :)?

Ian 07-29-2002 03:46 PM

Quote:

Originally posted by Mist
How do i do this :)?
I'm wondering the same thing.

Floris 07-29-2002 03:48 PM

Run an SQL query :)

phpMyAdmin = your best friend.

Ian 07-29-2002 03:54 PM

Quote:

Originally posted by xiphoid
Run an SQL query :)

phpMyAdmin = your best friend.

Could you elaborate on this? I have phpMyAdmin installed and I've used it many times... How do I import the file?

Floris 07-29-2002 04:00 PM

I'd say .. read the manual.

But.. you could copy paste the content of the .sql file to the big input window and press go. it will run the query then.

Takara 07-29-2002 04:20 PM

Just a note, in the instructions it says

Quote:

In the .htaccess file, locate any lines beginning with "ErrorDocument". Erase those and replace with the following code. If you do not have any lines like that, just add this at the end of the file.

ErrorDocument 400 http://www.yourdomain.com/forums/error.php?error=400
ErrorDocument 401 http://www.yourdomain.com/forums/error.php?error=401
ErrorDocument 403 http://www.yourdomain.com/forums/error.php?error=403
ErrorDocument 404 http://www.yourdomain.com/forums/error.php?error=404
ErrorDocument 405 http://www.yourdomain.com/forums/error.php?error=405
ErrorDocument 406 http://www.yourdomain.com/forums/error.php?error=406
ErrorDocument 407 http://www.yourdomain.com/forums/error.php?error=407
If you just add the path, and leave out your domain the error document will take the place of the URL.. soo.. by going to dasdsa.php it leaves the url as dasdsa.php and gives the error reason. Otherwise it redirects you to the error.php ^^

JJR512 07-29-2002 06:53 PM

Quote:

Originally posted by FireFly
Any particular reason for this? ;)
PHP Code:

$error $error

Good hack. :)

:o Nope! :D

Well, actually, when I first tested it, I wasn't getting the number to show up in the browser title bar. So I figured maybe for the variable to get parsed into the template it had to be explicitly declared, which is why I did that. But I think I just needed to refresh or something...anyway, it started working, I don't know why, but it did, and I forgot to take that part out. :)

LouChipher: I can't release a German version myself, since I don't speak it well enough to translate it. But it should be easy, since all the language is in the templates. If anyone else wants to do it, by all means, feel free.

Ian: If you can use phpMyAdmin, it's easy. You can do what xiphoid said, which is to open the file newtemplates.sql, copy the entire contents, go to phpMyAdmin, on the screen where you see the list of tables in the left pane and below that you have a text box labelled "Run SQL query/queries...", paste the contents of the file into that box, and hit the Go button. Or, an easier way is to go to that same spot in phpMyAdmin, but below that text box is a smaller field with a Browse...button, which you can use to point it to the file newtemplates.sql, then hit the Go button. That will upload the file into the server's memory and execute the instructions inside it.

Takara: I'm not quite sure I understand what you're saying. Are you saying in the .htaccess file, on the ErrorDocument xxx lines, I can make the path to error.php be relative, not full? Just make it like ErrorDocument 400 forums/error.php?error=400?

Velocd 07-29-2002 10:41 PM

Very nice hack, looks great. I also use the cpanel for custom error documents, so I'll have to look into xiphoid tip on integrating it ;)

JJR512 07-29-2002 10:48 PM

I believe the various cpanels that let you add custom error documents only help to automate the process. That does not (or shouldn't) exclude the ability to do it manually. If you create a custom 404 page, for example, it just saves that page for you somewhere and adds the appropriate line to .htaccess. If you can edit .htaccess manually, you can do this hack. :)


All times are GMT. The time now is 06:13 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
  • Page Generation 0.01052 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete