User login

SDL

Media styles workaround (extremely fragmented notes)

Summary of What's Working

<?php
/**
 * Define additional view modes for Media formatting.
 */
function feature_media_configuration_entity_info_alter(&$entity_info) {
  // Based on RobW's code: http://drupal.org/node/1026790#comment-4667062
  // Media module only recognizes view modes with the prefix media_.
 
  // View mode for mobile slideshow images

Organic Groups in Drupal 7 does not use entity IDs as group IDs

Update: Here is the code we currently use, abstracted into a helper function with lots of comments but it's really just two lines:

Modules in consideration for the SDL project

Deleting Drupal Fields Programmatically (So As to Change Field Type with Features)

In brief: The code at the bottom of this post deletes the named fields. If you are changing the field type for one or more fields, put it in an update hook for a feature module and run update.php before running features revert, your feature will happily rebuild the fields with their new settings. This destroys data.

FieldException: Cannot change an existing field's type. in field_update_field() (line 230 of /home/ben/code/sdl/web/modules/field/field.crud.inc).

Providing a default user in an installation profile in Drupal 7

Found some great clues in a test

http://api.drupal.org/api/drupal/modules--simpletest--drupal_web_test_case.php/7/source

Putting that to work in our installation profile's .install file, shown beneath a modification of standard.install's role creation to create an additional 'content manager' role and to name the 'administrator' role more appropriately, as 'developer':

Syndicate content