There's actually so much wrong with this, I don't even know that it's
worth fixing. At least not for me. Every time I fix one problem, I run into another. I'm thinking about disabling it.
By the way, because I realized I'd forgotten to post this earlier, here's how to add the navbar:
Open up httperror.php
Find:
Code:
$globaltemplates = array(
'HTTP_ERROR',
'http_error_bit'
);
Change to:
Code:
$globaltemplates = array(
'HTTP_ERROR',
'http_error_bit',
'navbar'
);
Find:
Code:
$httperrorbit = '';
After, add:
Find:
Code:
eval('$httperrorbit = "' . fetch_template('http_error_bit') . '";');
Before, Add
Code:
eval('$navbar = "' . fetch_template('navbar') . '";');
Then, in your HTTP_ERROR template, find $header, and add $navbar on the next line.
And you'll have a navbar. Then, to get CSS and images working, change your code for each error from something like:
Code:
ErrorDocument 404 /forums/httperror.php?e=404
to:
Code:
ErrorDocument 404 http://www.example.com/forums/httperror.php?e=404
Unfortunately, while that makes the pages and images work properly, it nulls the use of a back button, as it actually does a sort of permanent redirect to the page. The problem is, the variables and CSS stuff need to be globalized, and despite the script pretending to be somewhere else, it needs to know where it actually is, and it's not doing that.
On top of that- and this is something I wouldn't know how to fix entirely- if someone is making a call to an image or script or file via inline what-have-you, they get a 404, and show up in the WOL as viewing the Who's Online Script. I have no idea how to make it not do that, as it'd be calling images and scripts and such
after it's already called the thread. I think the best idea would be to remove it from Who's Online altogether, as it doesn't matter if someone is viewing an error page. -_-
I've fixed it by putting blank scripts where ones were being called, but, that's a cheesy solution, and I shouldn't have to.
If the original author or someone more professional than I can fix these flaws, that'd be great.
Someday, I'll learn PHP. T_T
EDIT: As far as fixing the online thing (I mean, why would you want to have "So and so is viewing a page that isn't there! Wee! Especially when that's blocking what they are
actually viewing. I mean, someone could purposefully link to an image on the site to block their thread from showing up in the Who's Online; it's not good), in the AdminCP find the plugin manager, and look for "Product : Custom Error Pages"
and uncheck both "Custom Error Page (Online Location Process) - online_location_process" and "Custom Error Page (Online Location Unknown) - online_location_unknown". Then, hit enter, or scroll to the save button. This will disable anything displaying on the Who's Online page, to avoid anyone having to mess with anything. Although, it could be useful for debugging, to see if any pages are making calls to things that aren't there. Although, I guess you could just check Firefox's Error Console. XD
I hope my post has been helpful. ^_^