35
Quote:
I like this idea...but is there an easy way to hack XOOPS to make such a message display ?
I thought the easiest way to do it would be to replace the error message's variable with a complete message similar to the one I've posted.
_US_REGISTERNG variable is defined around line 37 in /language/english/user.php:
define('_US_REGISTERNG','Your last request failed because it seems your computer is set up behind a firewall, which blocks sending information to {SITE_NAME}.
Our site uses Referrer-checking to secure contents being posted; this method prevents improperly identifiable users from placing undue content on the site.
When you click a Web page, your browser notes the current page that you are on and sends that information to the server before accessing a new page. This way, the server knows the address of the last Web page you viewed.
Some firewalls block this information by default. It appears this is the case for your connection, which means we were unable to ascertain that the data you submitted before accessing this page was typed on a page belonging to this website. That's a security issue for us.<br /><br />If you are using a firewall such as Norton Internet Security (NIS), ZoneAlarm Pro, etc., please modify your settings accordingly. (For an example of firewall setup, see https://xoops.org/modules/xoopsfaq/index.php?cat_id=13#25).
Additionally, your browser must be set up to accept cookies from {SITE_NAME}.
These simple steps are necessary for us to keep this site secure; it prevents untrustworthy users from accessing it. Please check your firewall and cookie settings, then try again.');
I'm not sure whether the SITE_NAME variable requires the brackets to be rendered, or whether it needs to be specified as "$SITE_NAME". From the looks, register.php doesn't do any templating on the variable, so SITE_NAME and the http link may need to handled differently.
Some other variables may need to be modified as well (upon failed login, failed post, etc.)
Another possibility is to leave the message alone, and modify register.php (login.php, post.php?) to redirect to another page, like so:
Lines 206 & 212:
CHANGE: echo _US_REGISTERNG;
TO: redirect_header('firewall.php', 4, _US_REGISTERNG);
I'll try setting myself behind a firewall to test this if I have the time.
Eric