Skip to content

Instantly share code, notes, and snippets.

View bangpound's full-sized avatar

Benjamin Doherty bangpound

View GitHub Profile
@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 / 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 / README.md
Created October 16, 2012 14:24
bit.ly and twitter data
@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 / 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')) {
name = File entity hacks
description = Temporary hacks to File entity module.
core = 7.x
php = 5.2.4
<?php
function panels_form_alter(&$form, $form_state, $form_id){
if ($form_id == 'soy_poderosa_photo_node_form' && arg(0) == 'node' && arg(1) > 0 ){
$form['buttons']['submit']['#value'] = t("Submit your photo");
}
}
function nlirh_imagefield_widget($element) {
if ($element['#field_name'] == 'field_soy_poderosa_photo' && $element['#type_name'] == 'soy_poderosa_photo') {
print "WTF!";
$element['data']['title']['#title'] = t('The better title just for this field on this node type.');
}
drupal_add_css(drupal_get_path('module', 'imagefield') .'/imagefield.css');
$element['#id'] .= '-upload'; // Link the label to the upload field.
return theme('form_element', $element, $element['#children']);
}
<?php
/**
* FormAPI theme function. Theme the output of an image field.
*/
function theme_imagefield_widget($element) {
if ($element['#field_name'] == 'FIELD_WHATEVER' && $element['#type_name'] == 'soy_poderosa_photo') {
$element['data']['title']['#title'] = t('The better title just for this field on this node type.');
}
drupal_add_css(drupal_get_path('module', 'imagefield') .'/imagefield.css');