Skip to content

Instantly share code, notes, and snippets.

View bangpound's full-sized avatar

Benjamin Doherty bangpound

View GitHub Profile
name = File entity hacks
description = Temporary hacks to File entity module.
core = 7.x
php = 5.2.4
@bangpound
bangpound / policy.drush.inc
Created May 30, 2012 20:41
Drush policy file to prevent catastrophes on live environments.
<?php
/**
* Implement of drush_hook_COMMAND_validate().
*
* Prevent catastrophic sql-sync to live. Note that this file has to be local to the
* machine that intitiates sql-sync command.
*/
function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) {
if (strstr($destination, '.live')) {
@bangpound
bangpound / appserver.make
Created September 30, 2012 02:54
Drupal 7 Features and App Server makefile
; This file was auto-generated by drush make
core = 7.x
api = 2
projects[drupal][version] = "7.x"
; Modules
projects[] = "appserver"
projects[] = "ctools"
projects[features][version] = "1.x-dev"
@bangpound
bangpound / README.md
Created October 16, 2012 14:24
bit.ly and twitter data
@bangpound
bangpound / oembed.patch
Created October 20, 2012 15:06
oembed wip
diff --git a/oembedcore.module b/oembedcore.module
index e473913..ac774ea 100644
--- a/oembedcore.module
+++ b/oembedcore.module
@@ -110,7 +110,7 @@ function oembedcore_theme() {
'template' => 'oembed',
'file' => 'oembedcore_theme.inc',
'path' => $path,
- 'variables' => array('embed' => NULL, 'title' => '', 'content' => ''),
+ 'render element' => 'element',
@bangpound
bangpound / id3-remove-demos-1.patch
Created October 20, 2012 18:09
Remove demos from getid3 1.9.3
commit cc58949b94bab61058da4b7ef9c448d6552d1c33
Author: Benjamin Doherty <[email protected]>
Date: Sat Oct 20 13:08:30 2012 -0500
remove demos.
diff --git a/demos/demo.audioinfo.class.php b/demos/demo.audioinfo.class.php
deleted file mode 100644
index be74fd1..0000000
--- a/demos/demo.audioinfo.class.php
@bangpound
bangpound / embedded-jplayer.patch
Created October 21, 2012 01:45
support jplayer embedded in filtered text fields.
diff --git a/includes/jplayer.theme.inc b/includes/jplayer.theme.inc
index 410d605..3e63c96 100644
--- a/includes/jplayer.theme.inc
+++ b/includes/jplayer.theme.inc
@@ -15,8 +15,12 @@ function template_preprocess_jplayer(&$vars) {
$vars['mode'] = $vars['settings']['mode'];
// Get the field info so we can figure out what type it is.
- $field_info = field_info_field($vars['field_name']);
- $player = jplayer_sort_files($vars['items'], $vars['player_id'], $vars['mode'], $field_info['type']);
diff --git a/status.php b/status.php
new file mode 100644
index 0000000..ab415ed
--- /dev/null
+++ b/status.php
@@ -0,0 +1,98 @@
+<?php
+// Register our shutdown function so that no other shutdown functions run before this one.
+// This shutdown function calls exit(), immediately short-circuiting any other shutdown functions,
+// such as those registered by the devel.module for statistics.
<?php
/**
* Implements hook_block_info().
*/
function eifundraising_block_info() {
$blocks = array();
$blocks['thermometer'] = array(
'info' => t('Thermometer'),
'description' => t('Thermometer'),