User login

Agaric

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).

Administrator Experience for Drupal: Skip Confirmation for Deletion of Less Important Items

CS would like a module that lets you set in which places you want to be required to confirm delete and which places should just let you delete.

  • Menu items-- don't make me confirm
  • Content-- make sure

I don't think the confirm form is necessary to present cross-site scripting-- that's in the token with the form (or delete link— that might be an easy way to do this, change one or the other to links so you can visually see if you're getting a confirmation or not, and maybe think twice faster).

How to create a Feature without the initial download through the UI

If you hate downloading and unzipping the initial feature you create as much as i do, because you haven't bothered with that foolishness since Drush, this post is for you.

This is the minimal information needed (from my experimentation) for Features to recognize your module as a Features module. Then you can add variables and other features through the UI (or Drush), and drush fu feature_example to update your module code (where feature_example is the name of your feature) and fu stands for features-update.

In feature_example.info:

CTags and Vim

Thanks in part to
http://sachachua.com/blog/2008/07/eclipse-to-emacs-navigating-your-source-tree/

Set-up:

(If not already installed: sudo apt-get install exuberant-ctags)

ctags -R -f ctagstags --languages=php --langmap=php:.module.php.inc.engine.profile .

In .vimrc,

set tags=ctagstags;/

In .bashrc

Preprocess from a module: removing the content author from Drupal 7 search results

All, not just most, but all the content on a particular site was set to be posted without showing the by-line or submitted by text. Given this requirement, it makes no sense to have search results show the user that submitted the content, every time. This can be themed away in search-result.tpl.php or it can be removed with a pre-process function as shown below.

You can do this from a module or a theme, where 'example' is the system name of that module or theme:

Permission sets for sensible defaults in module-provided permissions to roles

Created a feature that would be easily shareable among Drupal sites except for a big failing of Drupal to allow for module-provided sensible default permissions.

Get development and site-building modules and enable and configure them automatically

update: it exists, http://drupal.org/sandbox/mlncn/1204336

it should be a drush script that puts files in sites/all/modules/devel
keeps them up-to-date with git
and then enables them

http://drupal.org/project/environment

is just too much overhead.

Basically all the reasonable approaches are here:

Contributing to the Community for Joy and Gain (Design for Drupal Boston 2011 session proposal)

This proposed session didn't make it on the schedule, but we'll be perfecting this concept which we can't help but write about and take notes about and wax political about.

Contributing to the Community for Joy and Gain

The Ultimate Project Planning and Management Suite in Drupal

This does not remotely exist yet. Funding a point person to lead the project to make it, and creating or improving all the modules that would make it up, is a job for coordinating community initiatives- itself an initiative that could use support.

Syndicate content