DoorKeeper2@80
You’re about to enter the DoorKeeper Stack product page.



Please click OK to dismiss this message or Cancel to go to an overview of all my stacks…
DoorKeeper Stack

DoorKeeper Stack

shows a message before a visitor enters a page

Use this stack to let the visitor confirm he or she is of legal age to view the content of your site or page (alcoholic beverages, tobacco products, arms, vaping gear, adult content…). This stack is also great for drawing attention to a new product, invite them take a survey, etc.

Demo
I’m sure you didn't miss the message when you entered the page. Here are some more demo pages with examples:
Demo #1: let the visitor confirm he is over 18 years old
Demo #2: invite the visitor to do a survey
Demo #3: draw attention (e.g. to a new product) by offering an alternative page

Usage

Drag one copy of this stack on your Stacks page. The stack has loads of options (see the HUD image on this page and the on demo pages). The actual message text is entered in a styled text area, so you are free to style it, use html and add pictures. Even PlusKits @import((page name)) will work.

When the visitor clicks the accept button, the stack will set a cookie to remember his choice, dismiss the message and not show it again until the cookie expires. When the visitor clicks the reject button the stack will redirect the visitor to another page without setting a cookie, so the message will be shown again at the next visit.

The DoorKeeper can set a session cookie that will expire as soon as the visitor closes his browser or a cookie with an expiration time (from 1-3650 days). As long as the cookie is not expired, the message will not be shown again.
Pro Tip
During development, you can easily remove the cookie by making a temporary empty link* and an id named RemoveDKcookie. Clicking this link will remove the cookie set by the Doorkeeper Stack on that page.

Remove the cookie set by this page now
Doorkeeper Stack: link to remove the cookie
* for an empty link, set the URL to javascript:void(0);
Need help using it on a non-stacks page? Here’s a tutorial.

Background
This stack uses Klaus Hartls jQuery Cookie Plugin v1.4.1 and is partially based on a snippet that has been around on my Mac for a really long time. I can't find it's source anymore, but if anyone knows its creator, I'll be more than happy to put the credits here.

Limitations
  • When the visitor has JavaScript disabled in his browser, the message will not be shown.
  • In RapidWeaver preview mode no cookie can be set, so the message will be shown every time.
  • The reject button is always the default button, so when the visitor hits enter or return, he will be redirected to the alternative page. Hitting the escape button will always dismiss the message and place the cookie.
  • The reject button is always on the right, the dismiss button is always on the left.
Support
Please use this form to report all issues, questions and comments.

This stack requires the Stacks plugin by YourHead (version 2 or higher).
Do you like this stack? Please consider leaving a review in the RapidWeaver Community’s Addons section [link].
DoorKeeper HUD
© 2012-2017 Marathia Web Design | Contact