This file contains hidden or 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
/* <--- move or remove this line to uncomment functions below (and check the end as well!) | |
function my_cforms_action($cformsdata) { | |
### Extract Data | |
### Note: $formID = '' (empty) for the first form! | |
$formID = $cformsdata['id']; | |
$form = $cformsdata['data']; | |
### triggers on your third form | |
if ( $formID == '3' ) { | |
### Do something with the data or not, up to you | |
$form['Your Name'] = 'Mr./Mrs. '.$form['Your Name']; |
This file contains hidden or 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
function my_cforms_action($cformsdata) { | |
$formID = $cformsdata['id']; | |
$form = $cformsdata['data']; | |
$curl_connection = curl_init('https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8'); | |
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30); | |
curl_setopt($curl_connection, CURLOPT_USERAGENT, | |
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"); | |
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false); | |
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1); |
This file contains hidden or 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
object(stdClass)#131 (25) { | |
["ID"]=> | |
int(13) | |
["post_author"]=> | |
string(1) "1" | |
["post_date"]=> | |
string(19) "2011-07-31 12:45:36" | |
["post_date_gmt"]=> | |
string(19) "2011-07-31 12:45:36" | |
["post_content"]=> |
This file contains hidden or 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
.rounded-corners (@radius: 5px) { | |
border-radius: @radius; | |
-webkit-border-radius: @radius; | |
-moz-border-radius: @radius; | |
} |
This file contains hidden or 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
.gradient(@from: #cfe0ec, @to: #d1e4ef) { | |
background-color: @from; | |
background-image: -webkit-linear-gradient(top, @from, @to); | |
background-image: -moz-linear-gradient(top, @from, @to); | |
background-image: -ms-linear-gradient(top, @from, @to); | |
background-image: -o-linear-gradient(top, @from, @to); | |
filter: ~"progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=@{from}, endColorstr=@{to})"; | |
-ms-filter: ~"'progid:DXImageTransform.Microsoft.gradient (GradientType=0, startColorstr=@{from}, endColorstr=@{to})'"; | |
} |
This file contains hidden or 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
$.fn.fontBefitting = function() { // This resizes fonts to make them fit in an element | |
return this.each(function() { | |
var fontSize = parseFloat($(this).css('fontSize')); | |
this.style.overflowY = 'scroll'; | |
// This is if the font too big to fit an enclosing element | |
while (this.clientHeight < this.scrollHeight && fontSize > 1) { | |
fontSize *= 0.99; | |
$(this).css('fontSize',fontSize + 'px'); | |
} | |
// This is if the font is too small |
This file contains hidden or 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
## Adds global NOINDEX,NOFOLLOW meta to site headers | |
$wgExtensionFunctions[] = 'globalNoIndex'; | |
function globalNoIndex(){ | |
global $wgOut; | |
$wgOut->addMeta ( 'ROBOTS' , 'NOINDEX,NOFOLLOW') ; | |
} |
This file contains hidden or 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
<a id="content-add_media" class="thickbox add_media" title="Add Media" onclick="return false;" href="http://www.jackreichert.com/wp-admin/media-upload.php?post_id=1239&TB_iframe=1&width=640&height=83">Upload/Insert <img src="http://www.jackreichert.com/wp-admin/images/media-button.png?ver=20111005" alt="" width="15" height="15" /></a> |
This file contains hidden or 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
// github gist Shortcode Usage: [gist un="" id=""] | |
function gist_shortcode( $atts ) { | |
extract(shortcode_atts(array( | |
'un' => '', | |
'id' => '' | |
), $atts)); | |
return '<script src="https://gist.github.com/' . $username . '/' . $id.'.js"></script>'; | |
} | |
add_shortcode('gist', 'gist_shortcode'); |
This file contains hidden or 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
function activatePlaceholders() { | |
var detect = navigator.userAgent.toLowerCase(); | |
if (detect.search("msie") > 0 ) { | |
$('input[type=text],input[type=email]').each(function(ind,elem) { | |
if ($(elem).attr('placeholder') != ""){ | |
$(elem).val($(elem).attr("placeholder")); | |
$(elem).click(function() { | |
if ($(this).val() == $(this).attr("placeholder")) { | |
$(this).val(""); |
OlderNewer