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
// Modify server variables to be compatible with the OAuth.php library | |
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST']; | |
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") { | |
$_SERVER['SERVER_PORT'] = 443; | |
} | |
else { | |
$_SERVER['SERVER_PORT'] = 80; | |
} | |
$_SERVER['QUERY_STRING'] = preg_replace("/&{0,1}q=[^&]*&{0,1}/i", "", $_SERVER['QUERY_STRING']); |
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 | |
// Retrieve CSRF token | |
$curl_get = curl_init(); | |
curl_setopt_array($curl_get, array( | |
CURLOPT_RETURNTRANSFER => 1, | |
CURLOPT_URL => 'http://dev-oauth-test.gotpantheon.com/services/session/token', | |
)); | |
$csrf_token = curl_exec($curl_get); | |
curl_close($curl_get); | |
$csrf_header = 'X-CSRF-Token: ' . $csrf_token; |
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 | |
//include parsedown.php, to format the descriptions parsedown markup | |
include '../plugins/parsedown.php'; | |
// header needed for https workaround | |
$opts = array('http'=>array('header' => "User-Agent:MyAgent/1.0\r\n")); | |
$context = stream_context_create($opts); | |
$content = file_get_contents('https://4good.org/library-feed/Your_Feed_Here/latest.json',false,$context); | |
// function to remove the {by} in the description |
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
$feeds_importer = new stdClass(); | |
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */ | |
$feeds_importer->api_version = 1; | |
$feeds_importer->id = 'ning_users'; | |
$feeds_importer->config = array( | |
'name' => 'Ning Users', | |
'description' => 'port over ning users', | |
'fetcher' => array( | |
'plugin_key' => 'FeedsFileFetcher', | |
'config' => array( |
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
## Service Script | |
define(['angular'], function (angular) { | |
'use strict'; | |
angular.module('atlasApp.services.Drupal', ['restangular']) | |
.config(function(RestangularProvider){ | |
RestangularProvider.addResponseInterceptor(function(data, operation, what, url, response, deferred) { | |
var extractedData; |
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
<h1>EBS is SASSy</h1> | |
<p>Sunt laborum accusamus Marfa, Thundercats butcher irony bitters. Letterpress delectus non, Etsy sint officia tofu forage et. Readymade pop-up cornhole, Marfa assumenda hoodie paleo photo booth vinyl. Keytar kitsch pork belly wolf. Tofu tempor sunt paleo food truck occupy cardigan, iPhone ex excepteur quinoa small batch odio ethical aliquip. Consectetur +1 gastropub tattooed keytar reprehenderit, slow-carb assumenda polaroid VHS duis fanny pack do synth. Hella Tonx tousled, chillwave aliquip beard consequat master cleanse PBR irony cupidatat vinyl nostrud. And a <a>Regular Link</a>.</p> | |
<a class="button">Button</a> |
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
<div class="Discussions"></div> |
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
$view = new view(); | |
$view->name = 'setup'; | |
$view->description = ''; | |
$view->tag = 'default'; | |
$view->base_table = 'node'; | |
$view->human_name = 'setup'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
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
$view = new view(); | |
$view->name = 'what_it_is'; | |
$view->description = ''; | |
$view->tag = 'default'; | |
$view->base_table = 'node'; | |
$view->human_name = 'What it is'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
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 | |
// Hide/display stuff for users who are already registered | |
$query = new EntityFieldQuery(); | |
$query | |
->entityCondition('entity_type', 'registration') | |
->propertyCondition('entity_id', $node->field_product_ref['und'][0]['product_id']); | |
$result = $query->execute(); | |
//print_r($result['registration'][10]); | |
$ids = array_keys($result['registration']); | |
$registrations = entity_load('registration', $ids); |
OlderNewer