User login

note

Disabling Drupal's default notifications to the administrator when a user registers

This is not tested, but running this code (in an update hook, via Drush php-eval, however) should prevent Drupal from sending its notifications to the site e-mail address when a new, pending approval user registers:

Google Web Versus Google AJAX API Search Results

Google search results via their API vary greatly versus the results from the web interface (as an anonymous, not-logged-in user). This has been reported by others, but here is a direct test performed by me. We are fortunate in this example that the first two results are the same (albeit in reverse order). However the next results bear no resemblance to each other whatsoever.

The default Web UI returns 10 results at a time (on a page).

The default AJAX API returns 4 results at a time, and so was repeated twice advancing by four for the second result set.

Wrapping a link around a renderable array for images in Drupal 7

I was asked a question about theming linked images and gave the wrong answer, that it was a known pain point, but it kept bugging me because i was pretty sure i was not remembering something. The failure of link render arrays i was thinking of is their use in item_list, but in fact there is a secret theme function that can be used to put linked images in a render array properly.

Thanks to the amazing Morbus Iff for documenting using theme_image_formatter in a render array:

Removing Redundant Templates from a Subtheme using a Diff command

in

In Drupal 7, templates in a base theme will be used if an active subtheme does not have that template. This means that there is never a reason to have a template that is identical to what is already in the base theme.

Best Way to See Identical Files

diff --recursive --brief -s issybase issymobile

The -s flag makes diff mention identical files as well as modified ones.

Even better:

diff --recursive --brief -s issybase issymobile | grep identical

Delete a content type programmatically in Drupal 7

This is what i put as an update hook in a .install file:

Drupal and AtomPub

I want this for publishing from Tomboy to Drupal (data.agaric), as Tomboy and AtomPub already work together:
http://flukkost.nu/blog/tomboyblogposter/

Ancient interest in the forums, and no response:

Implementing AtomPub for Publishing Nodes?
http://drupal.org/node/193167

Response from a maintainer of the now-in-contrib BlogAPI module:

Update only Drupal core with Drush

drush up drupal

Syndicate content