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
<!-- Copyright 2010 Convio, Inc. --> | |
<!-- | |
Conditional for detecting mobile devices | |
[[?xx::x[[S80:isMobile]]x:: | |
isMobile is not yet set | |
[[?xx::x[[S80:UserAgentLowerCase]]x:: | |
UserAgentLowerCase is not yet set | |
Convert User-Agent from HTTP request header to lower case | |
[[U0:UserAgentLowerCase=[[E130:"[[S50:User-Agent]]" "A" "a" replaceall "B" "b" replaceall "C" "c" replaceall "D" "d" replaceall "E" "e" replaceall "F" "f" replaceall "G" "g" replaceall "H" "h" replaceall "I" "i" replaceall "J" "j" replaceall "K" "k" replaceall "L" "l" replaceall "M" "m" replaceall "N" "n" replaceall "O" "o" replaceall "P" "p" replaceall "Q" "q" replaceall "R" "r" replaceall "S" "s" replaceall "T" "t" replaceall "U" "u" replaceall "V" "v" replaceall "W" "w" replaceall "X" "x" replaceall "Y" "y" replaceall "Z" "z" replaceall]]]] |
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
<?php | |
//this goes into template.php function | |
function theme_preprocess_page(&$variables, $hook) { | |
if(isset($variables['node'])) { | |
$node = node_load($variables['node']->nid); | |
if($node->type == 'homepage') { | |
$field_name1 = 'field_left'; | |
$field_name2 = 'field_middle'; | |
$field_name3 = 'field_right'; |
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
<?php | |
//* Do NOT include the opening php tag | |
//* Force content-sidebar layout setting | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); | |
//* Force sidebar-content layout setting | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_content' ); | |
//* Force content-sidebar-sidebar layout setting |
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
<?php | |
/*set the Genesis layout to full width or any other width | |
options as follows: | |
content-sidebar, | |
sidebar-content, | |
content-sidebar-sidebar, | |
sidebar-sidebar-content, | |
sidebar-content-sidebar, | |
full-width-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
nocache=[[S55:1000,99999]] |
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.showHidePlaceholder = function(defaultValue) { | |
$(this).each(function() { | |
var $element = $(this); | |
if($element[0].tagName.toLowerCase() == 'select') { | |
$selectedOption = $element.children('option:selected'); | |
if($selectedOption.text() == defaultValue || $selectedOption.val() == defaultValue) { | |
$element.addClass('placeholder'); | |
} |
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
<?php | |
//render site contact form on the contact-us page [put this code in your node.tpl.php where you want the form to appear] | |
if($node->nid == 4) { | |
require_once drupal_get_path('module', 'contact') .'/contact.pages.inc'; | |
$contact_form = drupal_get_form('contact_site_form'); | |
print drupal_render($contact_form); | |
} | |
?> |
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 resizeIframes($iframes) { | |
$iframes.each(function() { | |
var $iframe = $(this); | |
var height = $iframe.height(); | |
var width = $iframe.width(); | |
var parentWidth = $iframe.parent().width(); | |
var newHeight = Math.ceil(parentWidth*(height/width)); | |
if(parentWidth <= width) { | |
$iframe.attr('width', parentWidth); | |
$iframe.width(parentWidth); |
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
var url = (window.location != window.parent.location) ? document.referrer: document.location; |
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 getParameterByName(name) { | |
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); | |
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), | |
results = regex.exec(location.search); | |
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); | |
} | |
if((getParameterByName('FR_ID') == '1070' || getParameterByName('fr_id') == '1070') && (!getParameterByName('pw_id')) ) { | |
window.location = window.location + '&pw_id=1741'; | |
} |