Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2013-02-05 09:02:00

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,545
Website GitHub Twitter

Re: Boxberry bespoke packaging

@colak

The cookie disclaimer is generated by some jQuery, like so:

jQuery(function() {
	// display cookie disclaimer on first visit
	if($.cookie('acceptedCookies') === null ) {
		$('body').prepend('<div id="cookie-disclaimer"><div class="container"><p><strong>This website uses cookies to enhance your experience.</strong> By continuing to use this website you agree to cookies being placed on your computer. If you wish to use this website but do not wish for cookies to be placed on your computer you can change the settings in your internet browser. <a href="#" data-action="close">Close</a>.</p></div></div>');
		// show disclaimer
		$('#cookie-disclaimer').css('display', 'block');
		// mark disclaimer as viewed, keep cookie for 4 years (1461 days)
		$.cookie('acceptedCookies', 1, { expires: 1461 });
		// close button
		$('[data-action="close"]').click(function() {
			$('#cookie-disclaimer').slideUp('fast');
			return false;
		});
	}
});

And some CSS:

/* cookie disclaimer */
#cookie-disclaimer {
	background-color: #e8e8e8;
	border-bottom: 1px solid #cccccc;
	padding: 1px 0;
	-webkit-box-shadow: inset 0px -0.25em 0.231em rgba(51, 51, 51, 0.1);
	-moz-box-shadow: inset 0px -0.25em 0.231em rgba(51, 51, 51, 0.1);
	box-shadow: inset 0px -0.25em 0.231em rgba(51, 51, 51, 0.1);
}
	#cookie-disclaimer .container {
	margin: 0 auto;
	max-width: 62em;
}

It’s also available for the Textpattern default theme in my GitHub repo extras folder.

@jstubbs

The advantage over Wufoo is that I only had to buy a one-off unlimited use licence, instead of the monthly charge that Wufoo take. Apart from that, both their feature sets are very similar.

Offline

#14 2013-02-05 09:39:14

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Boxberry bespoke packaging

Thanks Phil, I checked the pricing for both sites and came to the same conclusion.

Offline

#15 2013-02-05 09:43:54

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Boxberry bespoke packaging

BTW Phil – there is a 404 on the site for jQuery.

Offline

#16 2013-02-05 09:49:23

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,545
Website GitHub Twitter

Re: Boxberry bespoke packaging

@jstubbs

I’ve just (this morning) updated the site to use jQuery v1.9.1 from Google’s CDN – it’s not actually on their CDN yet though (sometimes takes a few hours to appear there after an official release). It should fallback to the local version of jQuery just fine while it can’t find the CDN version.

Offline

Board footer

Powered by FluxBB