Skip to content

Instantly share code, notes, and snippets.

View aprohl5's full-sized avatar

Austin Prohl aprohl5

  • Acquia
  • Boise, ID
View GitHub Profile
@aprohl5
aprohl5 / field_formatter_info_alter-variable_problems
Created March 25, 2014 17:56
field_formatter_info_alter-variable_problems
function linked_field_field_formatter_info_alter(&$infos) {
foreach ($infos as &$info) {
// Add a settings array if no settings were found.
if (!isset($info['settings']) || !is_array($info['settings'])) {
$info['settings'] = array();
}
@aprohl5
aprohl5 / drush_bashrc
Created May 29, 2014 21:18
drush_bashrc
# -*- mode: shell-script; mode: flyspell-prog; ispell-local-dictionary: "american" -*-
#
# Example bash aliases to improve your drush experience with bash.
# Copy this file to your home directory, rename and customize it to
# suit, and source it from your ~/.bash_profile file.
#
# Example - rename this to .drush_bashrc, and in your
# ~/.bash_profile add:
#
#
@aprohl5
aprohl5 / vr_core.module
Last active August 29, 2015 14:03
Just trying to make a block.
<?php
/**
* @file
* Code for the Volunteer Rally Core feature.
*/
include_once 'vr_core.features.inc';
/**
* Shift node type.
@aprohl5
aprohl5 / sass square list
Created July 21, 2014 00:25
making a bulleted list
// Slideshow
.item-list ul.slides,
ul.slides,
.node ul.slides,
ul.epub-slideshow {
@extend .unstyled_lists;
li {
//@extend .unstyled_lists;
//list-style-type: square;
<?php
/**
* Implements hook_preprocess_block().
*
* Adds a few helpful theming classes to a bean block:
* The bean's view mode, bundle (bean type), and the value of an arbitrary
* field, 'field_image_size'. Use this for beans placed using core blocks or
* the Context module.
*/
function THEME_preprocess_block(&$variables) {
@aprohl5
aprohl5 / helpers
Created August 21, 2014 00:40
Useful things to add to projects
//shows views queries in view preview
$conf['views_ui_show_sql_query'] = 1;
@aprohl5
aprohl5 / textlimit
Created August 29, 2014 22:46
Changing a char limit on text in Drupal DB
Example: ALTER TABLE `field_data_field_test_field` CHANGE `field_test_field_value` `field_test_field_value` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
@aprohl5
aprohl5 / ampersand_functionality
Created September 5, 2014 16:56
this an ampersand question
.front {
.header-container {
background-image: url("../images/screw.jpg");
height:400px;
background-attachment: fixed;
background-position: 0% 0%;
background-repeat: no-repeat;
background-size: cover;
@include breakpoint(1px 499px) {
@aprohl5
aprohl5 / html
Last active August 29, 2015 14:09
bullets
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="lt-ie10 lt-ie9 lt-ie8 lt-ie7 ie6" lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <![endif]-->
<!--[if IE 7 ]> <html class="lt-ie10 lt-ie9 lt-ie8 ie7" lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <![endif]-->
<!--[if IE 8 ]> <html class="lt-ie10 lt-ie9 ie8" lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <![endif]-->
<!--[if IE 9 ]> <html class="lt-ie10 ie9" lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"> <!--<![endif]-->
<!--html.tpl.php-->
@aprohl5
aprohl5 / gist:1884d023ba34c6fe315f
Created November 15, 2014 01:00
preprocess block stuff
function mti_theme_preprocess_block(&$vars) {
switch ($vars['elements']['#block']->delta) {
case 'main_callboard':
die(print_r($vars));
break;
}
}