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
/* | |
* Open external link in a new window | |
*/ | |
$('a:not([href^="'+ window.location.protocol + '//' + window.location.host + '"]):not([href^="#"]):not([href^="/"])') | |
.attr('target', '_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
$ch = curl_init($post_url); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_POST, 1); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('data1'=>'val','data2'=>'val2'))); | |
$data_str = curl_exec($ch); | |
curl_close($ch); | |
file_put_contents($path_to_xml_data,$data_str); |
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
.ir { | |
border:0; | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
background-color: transparent; | |
} |
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
.nav-tabs > li, .nav-pills > li { | |
float:none; | |
display:inline-block; | |
*display:inline; /* ie7 fix */ | |
zoom:1; /* hasLayout ie7 trigger */ | |
} | |
.nav-tabs { | |
text-align:center; | |
} |
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
RewriteEngine On | |
RewriteBase / | |
### Redirect www to non-www ### | |
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC] | |
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301] | |
### Redirect non-www to www ### | |
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC] | |
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301] |
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
php_value upload_max_filesize 20M | |
php_value post_max_size 20M | |
php_value max_execution_time 200 | |
php_value max_input_time 200 |
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
function fancyAlert(msg) { | |
jQuery.fancybox({ | |
'modal' : true, | |
'content' : "<div style=\"margin:1px;width:240px;\">"+msg+"<div style=\"text-align:right;margin-top:10px;\"><input style=\"margin:3px;padding:0px;\" type=\"button\" onclick=\"jQuery.fancybox.close();\" value=\"Ok\"></div></div>" | |
}); | |
} | |
function fancyConfirm(msg,callback) { | |
var ret; | |
jQuery.fancybox({ |
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
// Encode/decode htmlentities | |
function encodeEntities(s){ | |
return $("<div/>").text(s).html(); | |
} | |
function dencodeEntities(s){ | |
return $("<div/>").html(s).text(); | |
} |
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
<xsl:for-each select="publishers-countries/entry"> | |
<xsl:variable name="c" select="country/@handle" /> | |
<xsl:if test="not(preceding-sibling::*/country/@handle = $c)"> | |
<option> | |
<xsl:value-of select="country/."/> | |
</option> | |
</xsl:if> | |
</xsl:for-each> |
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
var html = jQuery('#html-element').val(); | |
if (html != '') { | |
html = jQuery(html).get(0); | |
var xhtml = getXHTML(html); | |
jQuery(this).val(jQuery(xhtml).get(0).outerHTML); | |
} | |
function getXHTML(node) { |
OlderNewer