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
function themename_preprocess_image(&$variables) { | |
foreach (array('width', 'height') as $key) { | |
unset($variables[$key]); | |
} | |
} |
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 | |
/** Text from slide 45 of "Tailor your backend to meet the clients needs" | |
* http://www.slideshare.net/stevenvdhout/durable-drupal-backend | |
* remove items from vertical tabs, and add them to another fieldset | |
**/ | |
if (isset($form['#groups']['group_settings'])) { | |
$weight = 0; | |
foreach ($form as $key => $value) { | |
if(is_array($value) && isset($value['#group'])) { | |
unset($form[$key]['#group']); |
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 | |
/** Text from slide 47 of "Tailor your backend to meet the clients needs" | |
* http://www.slideshare.net/stevenvdhout/durable-drupal-backend | |
* Improve the URL selection form | |
**/ | |
if (isset($form['#entity_type']) | |
&& $form['#entity_type'] == 'node' | |
&& isset($form['path']) | |
&& isset($form['path']['alias'])) { | |
unset($form['path']['#type']); // remove the fieldset |
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 | |
/** Text from slide 49 of "Tailor your backend to meet the clients needs" | |
* http://www.slideshare.net/stevenvdhout/durable-drupal-backend | |
* move the moderation state to the actions region | |
**/ | |
$form['revision_information']['#collapsed'] = TRUE; | |
if (isset($form['revision_information']['workbench_moderation_state_new'])) { | |
$form['actions']['workbench_moderation_state_new'] = $form['revision_information']['workbench_moderation_state_new']; | |
unset($form['revision_information']['workbench_moderation_state_new']); | |
} |
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 | |
/** | |
* Return a description of the profile for the initial installation screen. | |
* | |
* @return | |
* An array with keys 'name' and 'description' describing this profile. | |
*/ | |
function feature_server_profile_details() { | |
return 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
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |
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
# Bash script for installing Fish Shell on systems without root access | |
# Fish Shell will be installed in $HOME/local/bin | |
# It's assumed that wget and a C/C++ compiler are installed | |
set -e # exit on error | |
FISH_VER=2.2.0 | |
mkdir -p $HOME/local $HOME/fish_shell_tmp # create our directories | |
cd $HOME/fish_shell_tmp | |
wget http://fishshell.com/files/${FISH_VER}/fish-${FISH_VER}.tar.gz # download source files for Fish Shell |
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 | |
* Example drush alias file for multihost use. | |
*/ | |
// Alias settings common to all. | |
$aliases['base'] = array( | |
'root' => '/var/www/docroot', |
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
#!/bin/bash | |
GITURL="http://git.drupal.org/project/dkan.git" | |
BRANCH="7.x-1.x" | |
PREFIX="projects/dkan" | |
echo "Pulling in latest updates on branch $BRANCH from remote $GITURL." | |
# Change to git root directory. | |
cd "$(git rev-parse --show-toplevel)" | |
git subtree pull --squash --prefix=$PREFIX $GITURL $BRANCH |
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
api: '2' | |
core: 7.x | |
# Specify common subdir of "contrib" | |
defaults: | |
projects: | |
subdir: "contrib" | |
libraries: | |
bad-behavior: | |
download: | |
type: "file" |
OlderNewer