Author: doktornotor
Modification Description: A simple external link redirect page addon for you forum like the one being used here, just a tad bit smarter.
Modification Version: [BETA] 0.2.0
Requirements:
- Error Pages MOD by Stoker (duh!)
- PHP >= 5.2.0 - this mod uses filter_var(); for URL validation.
- Optional (but highly recommended): Prime Links MOD. Instead of specifying the URLs manually, you can use this automagically for all external links on your forum with Prime Links MOD installed. See the DYI instructions for setup.
- Kindly note that referrer checks cannot ever be fool proof as the referrer is passed by the browser. The checks are only done in order to prevent your site being (ab)used as a sort of an open anonym.to service linking to malware domains etc.
- Any bugs regarding incomplete validation checks in FILTER_VALIDATE_URL go to PHP upstream, NOT to me!
- Provides a simple redirect page for your forum, using your style, personalized with avatar and username for registered users.
- Usage can be automated with Prime Links
- Basic sanity checking, including:
- prevent redirect loops (redirect to forum index on failure)
- try to check URL validity (Status Code 400 on failure)
- check for referrer and only perform the redirect when the request comes from our domain (Status Code 403 on failure).
- Styles supported: Pretty much any; prosilver, subsilver2 and DVGFX2 included.
Normal Redirect Screen
Referrer Check Failed Screen
URL Validation Failed Screen
Demo URL:
Normal redirect: Go to my forum's About Us Page and click of the external links in there (hint: they have a small icon next to them)
URL validation failed: click here
Redirect Loop Prevention/Fallback to Forum Index: N/A here (due to referrer check, but it works)
Referrer Check: click here
ChangeLog:
0.2.0
- Add javascript countdown on redirect (credits: Arnevb)
- Get rid of hardcoded language strings
- Use simple_footer.html in prosilver as well for consistency
- Redirect time can now be configured by editing S_REDIRECT_TIME in go.php
- Initial revision
Update instructions:
No instructions included, simply overwrite all files with the updated copy from
root/
folder of the ZIP (or uninstall and reinstall the new version.)The above is beta-quality code, if it crashes your forum and drinks all the beer in your fridge, your own damn fault for using it!