vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Custom HTTP Error Pages (https://vborg.vbsupport.ru/showthread.php?t=98243)

JJR512 10-11-2005 10:00 PM

Custom HTTP Error Pages
 
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.)

exceem 10-12-2005 07:28 PM

Ive been waiting for somethign similar to this

thanks :)

Andreas 10-12-2005 07:39 PM

Quote:

This hack asks you to make one modification to your includes\adminfunctions_template.php file, to group its templates together. However, this is not absolutely necessary;
You are right, this edit is not necessary at all ;)

Hook template_groups
PHP Code:

$only['http_error'] = 'HTTP Errors'

Another suggestion:
Use phrases for the Text, so users can easily use it with other Languages too.

dsotmoon 10-12-2005 08:11 PM

wow, works great, i didnt make the file edit though

akanevsky 10-12-2005 08:19 PM

'e' should be a TYPE_UINT.

Itworx4me 10-12-2005 09:25 PM

Quote:

Originally Posted by KirbyDE
You are right, this edit is not necessary at all ;)

Hook template_groups
PHP Code:

$only['http_errors'] = 'HTTP Errors'

Another suggestion:
Use phrases for the Text, so users can easily use it with other Languages too.


Ok using your code above doesn't work. I have tested this and it doesn't group the templates.

Thanks,
Itworx4me

Omega Prime 10-12-2005 10:53 PM

Worked like a charm. Thanks :)

[high]* Omega Prime clicks Install[/high]

Andreas 10-12-2005 11:13 PM

It does work, just leave out the s I added accidently ;)

COBRAws 10-12-2005 11:54 PM

been waiting for this 3.5 port too

Thank you sir

--EDiT--
Phrases please, that would be very nice.

Avalon111 10-13-2005 06:18 AM

great work! i love it!!!


All times are GMT. The time now is 03:19 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.01090 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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