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
/** | |
* 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
# 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
# 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
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
<?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
/** | |
* 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
/** | |
* 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>HighCharts - jsFiddle demo</title> | |
<script type='text/javascript' src='http://code.jquery.com/jquery-1.5.2.js'></script> | |
<link rel="stylesheet" type="text/css" href="/css/result-light.css"> | |
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
/** | |
* socialflow_record_history | |
*/ | |
function socialflow_record_history($entity_type, $bundle, $entity_id) { | |
//check to see if the record exists | |
$check_query = db_query( | |
'SELECT count(entity_id) | |
FROM socialflow_history | |
WHERE entity_type = :entity_type | |
AND bundle = :bundle |