Version: 1.00, by JamesAB
Developer Last Online: Sep 2023
Category: Miscellaneous Hacks -
Version: 3.8.0
Rating:
Released: 03-05-2009
Last Update: 03-05-2009
Installs: 99
Supported Uses Plugins
Re-useable Code Additional Files Translations
About this hack:
This hack allows you to use vBulletin template driven pages for 400, 401, 403, 404 and 500 webserver error pages that will perfectly match your own forum's design. Five custom pages are added to your forum by this hack. You can then instruct your webserver to use these pages for it's error pages.
Features:
Error pages will still work even if your forum is turned off in the AdminCP.
Admin CP option to automatically redirect to your forum's main page after the error page is shown for 5 seconds.
Admin CP option to show or hide notices on error pages.
Installation information on hack:
Files to upload: 5
New templates added: 5
Time to install: 10 minutes.
You can test that the pages are working correctly by visiting:
<URL OF YOUR FORUM HOME>/400_forum.php
<URL OF YOUR FORUM HOME>/401_forum.php
<URL OF YOUR FORUM HOME>/403_forum.php
<URL OF YOUR FORUM HOME>/404_forum.php
<URL OF YOUR FORUM HOME>/500_forum.php
Next you will need to edit your webserver's configuration file or add lines into an .htaccess file.
.................................................. ..........
If your forum directory is the same as your website's document root, add these lines:
.................................................. ..........
If your forum is located in a directory within your website's document root, you'll need to replace <forum_directory> with the directory of your forum in these lines:
You can easily customize the templates for each indivual error page.
The templates can be found grouped together under HTTP Error Templates.
For the purpose of this hack, I used very generic error messages.
You can easily edit any of the phrases to best suit your site.
Each page uses three different vBulletin phrases.
The error name in the navbit. (for example... jab_404_error_navbit)
The title of the error table. (for example... jab_404_error_title)
The message shown for the error. (for example... jab_404_error_message)
These show the five error pages in vBulletin's default style.
Your pages will use your own forum's style and look just like your other pages.
In the "400 Bad Request" screen shot, I indicated the three phrases that can be edited.
Nice addition. One note is that it only works properly if the Store CSS Stylesheets as Files? option is set to No. When yes, the style is ignored, and it looks horrible. Would be great if you could integrate the usage of CSS Stylesheet files as well.
Nice addition. One note is that it only works properly if the Store CSS Stylesheets as Files? option is set to No. When yes, the style is ignored, and it looks horrible. Would be great if you could integrate the usage of CSS Stylesheet files as well.
On my forum, I have always had Store CSS Stylesheets as Files? set to Yes and it is working properly.
I'm not sure I completely understand the problem and why you are having trouble.
Any reason why lots (nearly half) of my active members would be shown in the Who's Online listing as this:
Unknown Location
/forum/404_forum.php
I'm really stumped.
I don't have an answer for you, because this mod does not implement adding the error pages as locations in the Who's Online listings.
I just looked at a forum with about 500 people online and didn't see anything out of the ordinary and I didn't see any viewing these custom error pages.
I suggest you check for other mods you may have installed that might effect the Who's Online list.
I don't have an answer for you, because this mod does not implement adding the error pages as locations in the Who's Online listings.
I just looked at a forum with about 500 people online and didn't see anything out of the ordinary and I didn't see any viewing these custom error pages.
I suggest you check for other mods you may have installed that might effect the Who's Online list.
Thanks,
James
It happens even when I set the "Enable Plugins" Admin CP setting to "No", so I don't think this is being caused by a plugin (including yours).
I just notice that this didn't start happening until I installed your plugin, and am very confused why it would be showing your 404_forum.php page as the current location.
I even totally uninstalled your mod, but the online location still shows as 404_forums.php.
Fixed it. It seems the problem was being caused by session variables.
For others who might notice the same issue, simply add the following line near the top of 404_forums.php:
Code:
define('SKIP_SESSIONCREATE', 1);
That doesn't necessarily fix the problem and what it definitely will do is make your members who reach the error page think they've been logged out when in fact they're still logged in.