Page 1 of 2

[BETA][Add-On] Redirect Link Page Addon

Posted: 23 Nov 2011, 13:54
by doktornotor
Modification Name: Error Pages - Redirect Link Page Addon
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.
Limitations:
  • 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!
Features:
  • 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.
Screenshots: (DVGFX2 style)
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
0.1.0
  • Initial revision
Modification Download: 0.2.0 (or see attachment)

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!

:P

[ALPHA][Add-On] Redirect Link Page Addon

Posted: 23 Nov 2011, 14:05
by martin123456
Nice :thumb:

:thumb: crashes your forum and drinks all the beer in your fridge, your own damn fault for using it!

??? did't crash mine but it did take the fridge

you left your themes file in there some might get confused by it :D DVGFX2 in styles

[ALPHA][Add-On] Redirect Link Page Addon

Posted: 23 Nov 2011, 14:14
by doktornotor
martin123456 wrote: you left your themes file in there some might get confused by it :D DVGFX2 in styles
This should do no harm and is not forbidden anywhere even by the phpBB.com specs, AFAICT. It simply will not get installed if that style is not available/active on your forum. (You might receive some stupid warning by AutoMOD though, bug the mod tools guys for that.)

BTW, attached here as well, since the webhosting tends to suck sometimes.

P.S. Wrt the beer, that was me, but pssssssst... :lol:

[ALPHA][Add-On] Redirect Link Page Addon

Posted: 23 Nov 2011, 14:32
by Stoker
Love the idea and looking great :thumb:

[ALPHA][Add-On] Redirect Link Page Addon

Posted: 23 Nov 2011, 15:19
by Vox Populi
Have not tested but thanks for the efforts. Looks unique. Will do a local with it.

[ALPHA][Add-On] Redirect Link Page Addon

Posted: 23 Nov 2011, 15:27
by martin123456
Tested and works 100%

[ALPHA][Add-On] Redirect Link Page Addon

Posted: 23 Nov 2011, 17:03
by doktornotor
martin123456 wrote:Tested and works 100%
Thanks, sounds good for a first release. :D

[ALPHA][Add-On] Redirect Link Page Addon

Posted: 23 Nov 2011, 17:32
by martin123456
doktornotor wrote:
martin123456 wrote:Tested and works 100%
Thanks, sounds good for a first release. :D
Have i said thanx ?? if not thanx any way

[BETA][Add-On] Redirect Link Page Addon

Posted: 15 Dec 2011, 02:24
by doktornotor
Updated to 0.2.0. This can be fully localized now, simply translate language/en/mods/go.php. ;)

[BETA][Add-On] Redirect Link Page Addon

Posted: 15 Mar 2012, 02:26
by genez
ty