This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getGoogleAnalytics () | |
{ | |
$googleid = Config::getConfig()->getPreference('googleAnalyticsCode'); | |
$basketWidget = $this->getWidget('basket'); | |
$clientData = $this->getClientDataForOrderReview($clientID); | |
$orderData = $this->getOrderData($basketWidget,$clientData); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Dragable Demo</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> | |
<script src="ui.js"></script> | |
<style> | |
.item { | |
height: 180px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://wp.tutsplus.com/tutorials/plugins/two-ways-to-develop-wordpress-plugins-object-oriented-progamming/ | |
class My_Widget extends WP_Widget { | |
public function __construct() { | |
// widget actual processes | |
} | |
public function form( $instance ) { | |
// outputs the options form on admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.video-container { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 30px; height: 0; overflow: hidden; | |
} | |
.video-container iframe, | |
.video-container object, | |
.video-container embed { | |
position: absolute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css"> | |
@media only screen and (max-device-width: 480px) { | |
/* mobile-specific CSS styles go here - max-devise-width property only works on apple, Amazon Kindle Fire, Android 2.2+, Microsoft Windows Phone 7.5+ mail clients */ | |
table[class=contenttable] { | |
width: 320px !important; | |
} | |
p { | |
background-color: #000; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JQTWEET = { | |
// Set twitter username, number of tweets & id/class to append tweets | |
user: 'insightinternet', | |
numTweets: 3, | |
appendTo: '#jstwitter', | |
// core function of jqtweet | |
loadTweets: function() { | |
$.ajax({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsersController < ApplicationController | |
before_filter RubyCAS::Filter, :except => :cas_update_user | |
before_filter :check_user, :except => :cas_update_user | |
def promote | |
error = "Please enter your name" if params[:name].blank? | |
error = "Please enter your telephone number" if params[:telephone].blank? | |
error = "Please enter a valid email address" unless params[:email].match(/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}/) | |
if error.blank? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table width='100%' border='0' cellpadding='4' cellspacing='0'> | |
<tr> | |
<td height='50' colspan='4' bgcolor='#000000'><a href='http://www.thestage.co.uk'><img border='0' src='data:image/jpg;base64,R0lGODlhsAAaAPcAAObm5qCgoHJyckpKSujo6LKyssHAwNbW1oyMjNDQ0L29vYKCghoaGhwcHAoK | |
CjQ0NE5OTn5+fnp6eqampmRkZMjIyEJCQq6urmhoaMrKypSUlMTFxZKSklRVVHR0dA0NDZuamrm5 | |
uZiZmHh4eHx8fIaGhmFiYkZGRhUVFbCwsJ+enqSlpV5eXh4eHlBQUGBgYBISEoSEhFxcXICAgGZm | |
ZjY2NoqKigQEBGtra0RERDg4OFhYWJCQkI6Pjjw8PCoqKp2dnTo6OiwsLCMjI29vbyIiIr+/vxAQ | |
ECgoKDAwMFtaWi8uLz4+PlZXVnZ2dsXFxYmJia+urx0dGyAgICYmJlNTUycmJGpqZERDP/T09DMz | |
M/Pz8zIyMvj4+Pr6+vn5+YeGf8fHx359dk1NSc7OzvX19dra2nRzbampqWFgW7a2tvv7+7W1tfLy | |
8jo6NtnZ2c3Nze7u7u/v7/z8/IKCgZaWlv39/f7+/rq6uq2trdLS0tTU1DAwLVdWUuDg4KysrOHh | |
4aurq6qqquvr65eXl8/Pz9vb2/b29t3d3d7e3uXl5djY2PHx8e3t7ff396urqszMzNXV1eLi4ru7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# code for the advert preview and the "why go premium list" on the create new ad form so that it only adopts fixed positioning when all of it is in view. | |
$ -> | |
e = $("div#advert_preview") | |
jWindow = $(window) | |
offsetTop = e.offset().top | |
positionTop = e.position().top | |
jWindow.scroll -> | |
if jWindow.scrollTop() > offsetTop | |
e.css |