Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-01-12 17:35:22
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Insert an interstitial external link disclaimer?
I am building a website that contains links to external sites, and because of liability issues, the client wants an interstitial disclaimer page to come up whenever a visitor clicks on an external link. The disclaimer would read something like this:
You are now leaving the [Client] website and will go to a site run by another organization. [Client] does not review or monitor the content of this website and [Client] is not responsible for any business dealings or transactions you may have with this site.
I would still like for the external links to be easily managed via TextPattern – either by direct Textile insertion into the article (preferred) or in the Links tab. I have a bit of basic PHP knowledge so I am comfortable inserting PHP snippets in the templates or includes if needed. I just don’t want to reinvent the wheel if someone else has a handy solution already. :)
Any ideas?
Offline
Re: Insert an interstitial external link disclaimer?
Check out http://mar.anomy.net/entry/2004/02/09/12.17.47/ — which documents a popup solution using only a class keyword on links. With this script you simply say <code><a href=“google.com” class=“external”></code> and not only will it open a new window, but it you can style the link differently with CSS. It would probably be pretty easy to modify the script to open a specific disclaimer page in the popup. The trick would be storing the link as a variable for the disclaimer page to pick up. You could probably put it as a hidden field in a form, but that wouldn’t be very elegant…
Last edited by Jeff_K (2006-01-12 18:17:12)
Offline
#3 2006-01-12 18:34:58
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Re: Insert an interstitial external link disclaimer?
Jeff_K, thanks for the Javascript popup idea. It’s certainly quite convenient, although I think I will need to explore other solutions because the idea that a visitor wouldn’t see the disclaimer if Javascript is disabled makes me a bit nervous.
I suppose I could just set up a PHP variable that gets passed along within the URL, and point all links to that page, then use PHP to insert that link’s URL into a “Continue..” link. Would Textile and/or the mod_rewrite processing choke on an URL string like that? Example (with spaces inserted to prevent Textile parsing):
<code> “ External link “ : /articles/interstital?url=http://www.externallink.com</code>Offline