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
<?xml version="1.0" encoding="utf-8"?> | |
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never"> | |
<!-- This style was edited with the Visual CSL Editor (http://steveridout.com/csl/visualEditor/) --> | |
<info> | |
<title>American Psychological Association 6th Edition - Spanish Translation</title> | |
<id>https://gist.github.com/4225434</id> | |
<link href="http://www.zotero.org/styles/apa" rel="self"/> | |
<link href="http://owl.english.purdue.edu/owl/resource/560/01/" rel="documentation"/> | |
<author> | |
<name>Simon Kornblith</name> |
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 | |
//stop deletion of nodes and comments | |
function MODULE_form_alter (&$form, &$form_state) { | |
//stop any node/comment deletions | |
if ((isset($form['operation']['#value']) && $form['operation']['#value'] == 'delete') || $form['#id'] == 'node-delete-confirm' || $form['#id'] == 'comment-confirm-delete') { | |
//set a message... | |
drupal_set_message('your message'); | |
//stop people from being able to submit the delete form (and in turn stop the delete) | |
unset($form['actions']['submit']); |
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
/* | |
* CSS Counters | |
* More information here: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Counters | |
*/ | |
ol{ | |
counter-reset: simple-numbering; // Sets the counter called simple-numbering to 0. | |
li { | |
list-style: none; | |
position: relative; |
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
# Drush-Bash tricks 0.1 | |
# Copyright Nuvole 2010. | |
# License: GPL 3, see http://www.gnu.org/licenses/gpl.html | |
# For a quick start: copy this entire file to the end of the .bashrc | |
# file in your home directory and it will be enabled at your next | |
# login. See http://nuvole.org/node/26 for more details and options. | |
# Drupal and Drush aliases. | |
# To be added at the end of .bashrc. |
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 | |
/** | |
* Implements hook_node_validate(). | |
* | |
* Makes image field required. | |
*/ | |
function mymodule_node_validate($node, $form, &$form_state) { | |
if ($node->type == 'carrousel_item') { | |
if (! isset($form_state['values']['field_summary_image'][LANGUAGE_NONE]['0']['entity']->field_media_summary_image[LANGUAGE_NONE][0]['fid']) || |
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 | |
/** | |
* Implements hook_install(). | |
*/ | |
function yourmodule_install() { | |
// Populates 'name_of_vocabulary' vocabulary with taxonomy terms. | |
// Edit name_of_vocabulary with your desired vocabulary's machine name. | |
$vocabulary = taxonomy_vocabulary_machine_name_load('name_of_vocabulary'); | |
$terms = 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
<?php | |
/** | |
* Implements hook_theme_registry_alter(). | |
*/ | |
function feature_blog_theme_registry_alter(&$theme_registry) { | |
$theme_registry['node']['preprocess functions'][] = 'onecolumn_class_node_preprocess'; | |
} | |
/* |
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 | |
/** | |
* Examples of valid statements for a Drush runtime config (drushrc) file. | |
* Use this file to cut down on typing out lengthy and repetitive command line | |
* options in the Drush commands you use and to avoid mistakes. | |
* | |
* Rename this file to drushrc.php and optionally copy it to one of the places | |
* listed below in order of precedence: | |
* |
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
[user] | |
name = Your Name | |
email = [email protected] | |
[color] | |
status = auto | |
branch = auto | |
interactive = auto | |
diff = auto | |
[alias] | |
st = status -sb |
OlderNewer