Skip to content

Instantly share code, notes, and snippets.

@kae76
kae76 / 02_custom.module
Last active August 29, 2015 14:07
Created a custom module: A simple fix for WYSIWYG making the configuration site wide. This fulfilled the initial user story requirements.
<?php
/**
* @file custom.module
* Drupal site build.
*/
/**
* Implements hook_wysiwyg_editor_settings_alter().
*/
@kae76
kae76 / my workflow.md
Last active January 4, 2016 17:39
Drupal Features

Fork off source repo:

your-organzation/repo-name, preparing the git side of things.

// delete current remote origin (git@).
git remote rm origin
// Add fork as origin user/organzations/repo-name (with push perms).
git remote add origin git@github.com:user/repo-name.git
// Add source repo as upstream (https).
git remote add upstream https://github.com/organzations/repo-name.git
// Check out branch and create a local version

@kae76
kae76 / omega8cc.md
Last active December 29, 2015 13:49

[distro name] = replace with project name, e.g. openatrium would give you http://git.drupal.org/project/openatrium.git
[platform name] = replace with desired platform name based on [distro name] should not have any empty spaces
[Omega8 UID] = replace with user ID provided by Omega8.css (you will find this in the first part of your Ægir url o123456789.vXX.location.hostX.biz)

Download and build the distribution (via command line)

  1. ssh [Omega8 UID].ftp@[Omega8 UID].hostname
  2. cd ~
  3. mkdir tmp if doesn't already exist
  4. cd tmp

Vagrant setup

First clone the Vagrant Box repo

git clone git@github.com:kae76/drupaldev-nginx.git

Follow the following steps, inspired from the repo's ReadMe file
but only running vagrant up right at the end!

cd drupaldev-nginx

@kae76
kae76 / I can not attach a media file type
Created October 9, 2013 15:50
I can not attach a media file type in <code>/node/add/oa-discussion-post</code>
Error message
Warning: include_once(): Unable to allocate memory for pool. in drupal_load() (line 1100 of /var/www/tcs-openatrium.drupal.dev/www/includes/bootstrap.inc).
Warning: include_once(): Unable to allocate memory for pool. in include_once() (line 8 of /var/www/tcs-openatrium.drupal.dev/www/profiles/openatrium/modules/contrib/oa_core/modules/oa_widgets/oa_widgets.module).
Warning: include_once(): Unable to allocate memory for pool. in drupal_load() (line 1100 of /var/www/tcs-openatrium.drupal.dev/www/includes/bootstrap.inc).
Warning: include_once(): Unable to allocate memory for pool. in drupal_load() (line 1100 of /var/www/tcs-openatrium.drupal.dev/www/includes/bootstrap.inc).
Warning: include_once(): Unable to allocate memory for pool. in drupal_load() (line 1100 of /var/www/tcs-openatrium.drupal.dev/www/includes/bootstrap.inc).
Warning: include_once(): Unable to allocate memory for pool. in drupal_load() (line 1100 of /var/www/tcs-openatrium.drupal.dev/www/includes/bootstrap.inc).
Warning: include_o
<?php
/**
* Implements hook_form_alter().
*/
function sandbox_custom_form_alter(&$form, &$form_state, $form_id) {
kpr($form);
if ($form['#id'] == 'views-exposed-form-news-page') {
// $my_label = 'label name';
$my_label = $form['#info']['filter-type']['label'];