User login

Benjamin Melançon

Adding non-menu things to primary links menu items with Drupal 7's page alter hook

The request was to stick search in a menu. I said "I bet that's easy with hook_page_alter()!"

Not quite.

The primary links menu is output directly by the theme, and so is one of the very very few things that occurs after hook_page_alter().

You can tell the theme to stop outputting it directly, and put it in a block that is displayed in a region, or you can add it to the page rendering array in code with hook_page_build().

Settings for sets of sites: Putting Drush configuration into your project repository

Inherit local-only options with 'parent'

Parent is not working across files. Filed support request: http://drupal.org/node/1262230

In an aliases file that lives with your project, so for our SDL project, sdl.aliases.drushrc.php, put in all settings that are true no matter who is using Drush and from where. This is the settings for an externally hosted development collaboration site.

Change the text of a tab, such as 'View', for one node type

<?php
/**
* Implements hook_menu_alter().
*
* Use a title callback to replace the text shown on nodes' "View" tab.
*/
function example_menu_alter(&$items) {

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:

Collaboratively writing e-mail (sharing mail drafts)

A test: I gave one GMail account edit access to another GMail account (yes, you can do this) and started editing an e-mail, saved it as draft, and then went to the other account— the draft was there, but not only was there no autorefresh of the other's changes when i edited simultaneously, but it forked and created two drafts of the same e-mail.

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:

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.

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

Trying out Zotero

http://www.zotero.org/

I was invited to join a group. The link to join a group only works if you already have an account and are logged in. Pretty clunky, that part.

But there's a big file manager at the bottom of my firefox now. We'll see how this works. A lot of it seems duplicative of Evernote. I just want to do all this in Drupal...

As all Zotero notes can be viewed as web pages in Firefox, i expect i'll like the underlying data storage in Zotero a whole lot more than Evernote.

Essential Smart Phone Features

GPS and Directions

  • Read-aloud turn-by-turn directions

MiFi or Tethering

  • Must be easy to get internet access for laptop through cell networks
  • Must be able to provide full Internet, including e-mail, IRC, SSH.

Dictation

  • Automatic voice to text (with correction so it learns), or possibly a paid service

Data sharing with personal computer

  • Contacts, text messages, notes must be easily shared with a computer in basic text format
Syndicate content