I see you're using jQuery (from the head of the splash page):
HTML Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
So add this script right after it:
Code:
<script type="text/javascript">
// Skip this Page Script (c)2012 John Davenport Scheuer
// as first seen in http://www.dynamicdrive.com/forums/
// username: jscheuer1 - This Notice Must Remain for Legal Use
;(function(setting){
var cook = {
set: function(n, v, d){ // cook.set takes (name, value, optional_persist_days) - defaults to session if no days specified
if(d){var dt = new Date();
dt.setDate(dt.getDate() + d);
d = '; expires=' + dt.toGMTString();}
document.cookie = n + '=' + escape(v) + (d || '') + '; path=/';
},
get: function(n){ // cook.get takes (name)
var c = document.cookie.match('(^|;)\x20*' + n + '=([^;]*)');
return c? unescape(c[2]) : null;
}
};
if(cook.get('skipthispage')){
location.replace(setting.page);
}
if(!document.cookie){cook.set('temp', 1);}
if(document.cookie){
jQuery(function($){
$('#optout').css({display: ''}).append(setting.optoutHTML).find('input').click(function(){
this.checked? cook.set('skipthispage', '1', setting.days) : cook.set('skipthispage', '', -1);
this.checked && setting.gowhenchecked && location.replace(setting.page);
});
});
}
})({
days: 365, // days cookie will persist
page: 'home-page.php', // page to goto if cookie is set
gowhenchecked: true, // true/false - should page switch when the box is checked?
optoutHTML: '<label for="optoutcheckbox">Don\'t Show this Page Again: <input type="checkbox" id="optoutcheckbox" value=""></label>'
});
</script>
Any configuration you might want to do can be done in the highlighted area near the end.
Add this div to the body where you want the checkbox to appear:
HTML Code:
<div id="optout" style="display: none;"></div>
Browsers without javascript or without cookies will see nothing.
Style - None is required. If you want to style it, you can put selectors and rules like these in your css/splash-page-style.css stylesheet:
Code:
#optout {
display: inline;
background-color: yellow;
}
#optout label {
font: bold 95% sans-serif;
}
The rules are up to you. You can also add a selector and rule(s) for the checkbox:
Code:
#optout input {
background-color: red;
}
Just be aware that a checkbox like other form elements will not always accept styles, and that browser differences in styling them are more common than with other elements. For example IE will give a red background, Firefox will not.
Bookmarks