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 static function GetTermNameByTid($tid) { | |
$parents = taxonomy_get_parents($tid); | |
$output = ''; | |
if ($parents) { | |
$term = taxonomy_term_load($tid); | |
$output = $term->name; | |
return $output; | |
} else { | |
return FALSE; | |
} |
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
$form[ConfigureNode::BANNER_TOP_CF."_text"] = array( | |
'#type' => 'text_format', | |
'#title' => t('Banner Description'), | |
'#rows' => 5, | |
'#resizable' => FALSE, | |
'#default_value' => variable_get(ConfigureNode::BANNER_TOP_CF."_text", ""), | |
'#format' => 'full_html' | |
); |
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
$field_name = 'field_banner_media'; | |
$field_info = field_info_field($field_name); | |
$field_id = $field_info['id']; | |
$nids = array($banner_top); | |
$sql = 'SELECT * FROM {node} WHERE nid IN (:nids)'; | |
$nodes = db_query($sql, array(':nids' => $nids))->fetchAllAssoc('nid'); | |
field_attach_load('node', $nodes, FIELD_LOAD_CURRENT, array('field_id' => $field_id)); | |
$field_banner = field_get_items('node', reset($nodes), $field_name); |
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
/** | |
* Implements hook_ctools_plugin_api(). | |
*/ | |
function workshop_helper_ctools_plugin_api($module, $api) { | |
if ($module == "ds" && $api == "ds") { | |
return array("version" => "1"); | |
} | |
return NULL; | |
} |
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
#!/bin/bash | |
# From here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# Based on: https://github.com/saxenap/install-redis-amazon-linux-centos | |
# Thanks to https://raw.github.com/gist/2776679/b4f5f5ff85bddfa9e07664de4e8ccf0e115e7b83/install-redis.sh | |
# Uses redis-server init script from https://raw.github.com/saxenap/install-redis-amazon-linux-centos/master/redis-server | |
############################################### | |
# To use: | |
## wget https://raw.github.com/jorgerc/install-redis-amazon-linux-centos/master/redis-install-script.sh | |
## chmod 777 redis-install-script.sh | |
## ./redis-install-script.sh |
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
$preset = new stdClass(); | |
$preset->disabled = FALSE; /* Edit this to true to make a default preset disabled initially */ | |
$preset->api_version = 1; | |
$preset->name = 'flexslider'; | |
$preset->title = 'FlexSlider'; | |
$preset->html = '<div class="flexslider"> | |
<ul class="slides"> | |
{{#data}} | |
<li> | |
<img src="{{image}}" /> |
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
$preset = new stdClass(); | |
$preset->disabled = FALSE; /* Edit this to true to make a default preset disabled initially */ | |
$preset->api_version = 1; | |
$preset->name = 'jquery_cycle2'; | |
$preset->title = 'JQuery Cycle2'; | |
$preset->html = '<div class="cycle-slideshow" | |
data-cycle-fx=scrollHorz | |
data-cycle-timeout=2000 | |
> | |
<!-- empty element for caption --> |
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
$preset = new stdClass(); | |
$preset->disabled = FALSE; /* Edit this to true to make a default preset disabled initially */ | |
$preset->api_version = 1; | |
$preset->name = 'cycle2_carousel_pager'; | |
$preset->title = 'Cycle2 Carousel Pager'; | |
$preset->html = '<div id="slideshow-1"> | |
<p> | |
<a href="#" class="cycle-prev">« prev</a> | <a href="#" class="cycle-next">next »</a> | |
<span class="custom-caption"></span> | |
</p> |
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
$preset = new stdClass(); | |
$preset->disabled = FALSE; /* Edit this to true to make a default preset disabled initially */ | |
$preset->api_version = 1; | |
$preset->name = 'cycle2_youtube'; | |
$preset->title = 'Cycle2 Youtube'; | |
$preset->html = '<div class="cycle-slideshow" | |
data-cycle-fx=scrollHorz | |
data-cycle-timeout=0 | |
data-cycle-prev=#prev | |
data-cycle-next=#next |
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
$preset = new stdClass(); | |
$preset->disabled = FALSE; /* Edit this to true to make a default preset disabled initially */ | |
$preset->api_version = 1; | |
$preset->name = 'liquid_slider'; | |
$preset->title = 'Liquid Slider'; | |
$preset->html = '<div class="liquid-slider" id="slider-id"> | |
{{#data}} | |
<div> | |
<h2 class="title">{{title}}</h2> | |
{{{description}}} |
OlderNewer