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
/** | |
* Add a "silverpop form bean creators" role for users who can create beans of silverpop_form type. | |
*/ | |
function energy_content_update_7046(&$sandbox) { | |
$perms = array(); | |
$new_role = new stdClass(); | |
$new_role->name = 'silverpop form block creators'; | |
$status = user_role_save($new_role); | |
$perms = array(); |
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
/** | |
* Implementation of hook_form_alter | |
*/ | |
function socialflow_form_alter(&$form, &$form_state, $form_id) { | |
$socialflow_entities = variable_get('socialflow_entities',array()); | |
//check settings for entity type and bundle | |
if(array_key_exists('#entity_type', $form) && | |
array_key_exists($form['#entity_type'], $socialflow_entities) && | |
array_key_exists('#bundle', $form) && |
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 | |
/** | |
* @file | |
* state_machine.module | |
*/ | |
/** | |
* Class file loader for base.inc. | |
*/ | |
function state_machine_load_class_file() { | |
if (!class_exists('StateMachine')) { |
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
Array | |
( | |
[plugin] => energy_highcharts_embed | |
[data] => Array | |
( | |
[highcharts_embed_code] => (function($) { $(document).ready(function() { | |
console.log('javascript executed'); | |
console.log($('#energy-highcharts-embed-container-327403')); |
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
# new file: ../../../config/vcl/energy.vcl | |
# modified: modules/contrib/bean | |
# modified: modules/custom/energy_content/energy_content.field_group.inc | |
# modified: modules/custom/energy_content/energy_content.install | |
# modified: modules/custom/energy_content/energy_content.module | |
# modified: modules/custom/energy_content/fields/energy_content.fields.homepage.inc | |
# modified: modules/custom/energy_content/includes/pages.inc | |
# modified: modules/custom/energy_content/plugins/bean/latest_downloads_listing.inc | |
# modified: modules/custom/energy_content/theme/theme.inc | |
# modified: modules/custom/energy_offices/energy_offices.module |
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
# new file: config/vcl/energy.vcl | |
# modified: docroot/sites/all/modules/contrib/bean | |
# modified: docroot/sites/all/modules/custom/energy_content/energy_content.field_group.inc | |
# modified: docroot/sites/all/modules/custom/energy_content/energy_content.install | |
# modified: docroot/sites/all/modules/custom/energy_content/energy_content.module | |
# modified: docroot/sites/all/modules/custom/energy_content/fields/energy_content.fields.homepage.inc | |
# modified: docroot/sites/all/modules/custom/energy_content/includes/pages.inc | |
# modified: docroot/sites/all/modules/custom/energy_content/plugins/bean/latest_downloads_listing.inc | |
# modified: docroot/sites/all/modules/custom/energy_content/theme/theme.inc | |
# modified: docroot/sites/all/modules/custom/energy_offices/energy_offices.module |
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
/** | |
* Saves a InstagramMedia object to {drupagram} | |
*/ | |
function drupagram_media_save($media) { | |
// Cleanse the full_name field of bad chars | |
if (!empty($media)) { | |
if (!empty($media->likes)) { | |
if (!empty($media->likes['data'])){ | |
foreach ($media->likes['data'] as $index => $like_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
$file_path = drupal_get_path('module', 'cc_ingestion_engine') . '/xml/cbindicators_revised.xml'; | |
include($file_path . '/cc_ingestion_engine.module'); | |
$content = utf8_encode(file_get_contents($file_path)); | |
$xml = simplexml_load_string($content); | |
$areas_xml_object = $xml->areas; | |
$charts_xml_object = $xml->charts; | |
$chart_types = $xml->chart_types; | |
$definition_sources_xml_object = $xml->definitionsources; | |
$indicators_xml_object = $xml->indicators; | |
$measures_xml_object = $xml->measures; |
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
$databases = array( | |
'default' => array( | |
'default' => array( | |
'driver' => 'mysql', | |
'database' => 'robinhood', | |
'username' => 'root', | |
'password' => '', | |
'host' => 'localhost', | |
), | |
), |
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
first one: | |
a:1:{s:5:"stats";a:1:{s:13:"vertical_tabs";a:1:{i:0;a:1:{s:8:"fieldset";a:1:{s:4:"icon";a:1:{s:8:"file_fid";s:3:"537";}}}}}} | |
second one: | |
a:2:{s:5:"stats";a:1:{s:13:"vertical_tabs";a:29:{i:0;a:1:{s:8:"fieldset";a:3:{s:5:"title";a:1:{s:9:"textfield";s:17:"City Stat Title 0";}s:11:"description";a:1:{s:8:"textarea";s:82:"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod. 0";}s:4:"icon";a:1:{s:8:"file_fid";a:4:{s:3:"fid";i:0;s:13:"upload_button";s:6:"Upload";s:13:"remove_button";s:6:"Remove";s:6:"upload";N;}}}}i:1;a:1:{s:8:"fieldset";a:3:{s:5:"title";a:1:{s:9:"textfield";s:17:"City Stat Title 1";}s:11:"description";a:1:{s:8:"textarea";s:82:"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod. 1";}s:4:"icon";a:1:{s:8:"file_fid";a:4:{s:3:"fid";i:0;s:13:"upload_button";s:6:"Upload";s:13:"remove_button";s:6:"Remove";s:6:"upload";N;}}}}i:2;a:1:{s:8:"fieldset";a:3:{s:5:"title";a:1:{s:9:"textfield";s:17:"City Stat Title 2";}s:11:"description";a:1:{s |