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
<script type="text/javascript" charset="utf-8"> | |
jQuery(document).ready(function(){ | |
// Set the indexes for the countries you want to allow | |
var usIndex = -1; | |
var caIndex = -1; | |
// Find their positions in the array using the 2 character ISO code | |
for (var i = 0; i < FC.locations.config.locations.length; i++) { | |
if (FC.locations.config.locations[ i ].cc2 == "US") { | |
usIndex = i; | |
} else if (FC.locations.config.locations[ i ].cc2 == "CA") { |
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 | |
$numbers = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); | |
$grid = array_chunk($numbers, 4); | |
$output = ''; | |
foreach($grid as $row) | |
{ | |
$output[] = '<tr>'; //or ul | |
foreach($row as $item) |
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 | |
/* | |
This is a simple example. | |
I use h2o for all of my modx templating needs, because the php is kind of verbose. And h2o is as simple as [++] placeholders. | |
( http://wiki.github.com/speedmax/h2o-php/ ) | |
Twig is also a nice option. ( http://www.twig-project.org/ ) | |
*/ |
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
javascript:function showBorders(wndw){for(var i=0;i<wndw.document.forms.length;i++)void(wndw.document.forms[i].target='_blank');}void(frms=window.frames);if(frms.length==0){showBorders(window);}else{for(iQA=0;iQA<frms.length;iQA++){showBorders(frms[iQA]);}} |
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
Guests | |
- Create new user | |
- Login | |
- View unprotected pages | |
Logged in User | |
- All of the above | |
- Search users | |
- Add friends | |
- Contact friends |
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($){ | |
$.each(["live", "die"], function( i, name ) { | |
var method = $.fn[ name ]; | |
$.fn[ name ] = function( types, data, fn, origSelector ) { | |
if ( typeof types === "object" && !types.preventDefault ) { | |
for ( var key in types ) { | |
method.call( this, key, data, types[key], origSelector ); | |
} |
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
// FOR TESTING PURPOSES ONLY | |
FC.checkout.InitCoupon = function() { | |
fc_cart_foot_discount_new = '<tr id="fc_cart_foot_discount_new"><td class="fc_col1" colspan="2"><a href="#" onclick="FC.checkout.AddCoupon(); this.blur(); return false;">Add a coupon</a></td><td class="fc_col2"><input type="text" name="coupon" id="fc_coupon" class="fc_text fc_text_short" value="" style="display:none;" /><a id="fc_coupon_apply" href="javascript:;" style="display:none;">Apply!</a></td></tr>'; | |
if (jQuery('#fc_cart_foot_discount_new').length == 0) { | |
jQuery(fc_cart_foot_discount_new).insertBefore('#fc_cart_foot_shipping'); | |
} | |
jQuery('#fc_coupon_apply').unbind('click').click(function(){ |
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 | |
// SNIPPET: PhotoDimensions | |
// | |
// Parameters: | |
// image | |
// classWide | |
// classTall | |
if (!$image) { | |
return ''; |
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
<script type="text/javascript" charset="utf-8"> | |
jQuery(document).ready(function(){ | |
// Set the indexes for the countries you want to allow | |
var usIndex = -1; | |
var caIndex = -1; | |
// Find their positions in the array using the 2 character ISO code | |
for (var i = 0; i < FC.locations.config.locations.length; i++) { | |
if (FC.locations.config.locations[ i ].cc2 == "US") { | |
usIndex = i; | |
} else if (FC.locations.config.locations[ i ].cc2 == "CA") { |
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 | |
if( ! function_exists('pPrint') ) { | |
function pPrint($arr, $return = false){ | |
$output = '<pre>'.print_r($arr, TRUE).'</pre>'; | |
if ($return) | |
return $output; | |
else | |
echo $output; | |
} | |
} |