User login

Definitive Guide to Drupal 7

Exporting views to files to be managed by version control: Drupal 7

The trick to somewhat Drupal 8-esque configuration management in Drupal 7, when it comes to Views, is to make your view defined in the user interface to be defined by a module instead. This is done with hook_views_default_views().

From Michelle Lauer's Views chapter in the Definitive Guide to Drupal 7:

Maintaining a Drupal project with Git: Vacating the master branch

If you've already been committing code to master, do this to start a new 7.x branch and kill off the code in the master branch so noone gets confused.

cd /path/to/repo
git checkout -b 7.x-1.x

git push origin 7.x-1.x

git checkout master
git rm -r *
echo "Real code is not kept on the master branch, to see the code: git checkout 7.x-1.x" > README.txt
git add README.txt
git commit -m "Add a README explaining that the master branch is empty."
git push origin master

Best practice for an upgraded site to define RDF mappings for RDFa output?

A site that has been upgraded from Drupal 6 to Drupal 7 has not even had this code from standard.install in the Standard profile run yet. Can generic mappings like this be easily taken care of in other custom configuration of RDF or should this (plus more?) go in an update hook?

Incremental improvements make Drupal's code awesome

A fix was recently committed to both Drupal 8 and Drupal 7 to use #attached for block_admin_display_form() instead of drupal_add_css(). It only came up in my "Your issues" block on my drupal.org dashboard because, it turned out, i was the one who had initially complained about it. And that's all i did- looking for core examples to tell readers of dgd7.org how to write good code, i noticed core was in fact doing it wrong.

Removing book navigation

Remove book entirely, with hook_page_alter()

Example use of Kickstarter to fund a book (by Young Voices Nation)

YOUNG VOICES NATION: BOOK PROJECT

LAST CHANCE TO TAKE PART

LAST CHANCE TO:

- Get your name in as a backer
- Get a signed copy of the book
- Receive a Chong Kim original art piece

TODAY IS THE LAST DAY

A month ago I didn't know if the YVN: Book Project funding would be successful. I wasn’t even sure if using Kickstarter would work. But thanks to your overwhelmingly generous support I was proven wrong, and am now more inspired than ever.

If you've been on the fence about supporting, now's your chance.

Getting rid of modules entirely, with update function for cleanup

When deleting modules in code you can clean up after the fact, esp. for modules that don't clean up after themselves well enough on uninstall.

git rm -r sites/all/modules/contrib/hashcash

git rm -r sites/all/modules/contrib/imageapi

To your update module, we can add:

Talmud: Git version-controlled, free, open, collaboratively-written books the way G-d intended

Having experienced writing an epic tech book - 36 authors and 36 chapters and no, it did not break down nice and neat like that - we are convinced there is a better way than the traditional publishing model. Drawing on the tradition of open source free software about which we wrote, we propose donation-funded, completely free and open texts of superior quality and timeliness, marked by clean mark-up and powered by technologies of collaboration.

Core Form Messages to AJAXify

Messages to AJAXify with a helper module to http://drupal.org/project/formmsgs

Error messages to AJAXify-- why wait until you submit the form to know this?

The first ones are relevant
* "The username cannot contain multiple spaces in a row."
* username taken (both these handled by http://drupal.org/project/username_check )
* optional duplicate title warning

Syndicate content