This website is composed of information connected through taxonomy. It is simultaneously a proof-of-concept and a means to allow Agaric to share and store information both within the collective and the world as part of our open documentation philosophy.

User login

This website is composed of information connected through taxonomy. It is simultaneously a proof-of-concept and a means to allow Agaric to share and store information both within the collective and the world as part of our open documentation philosophy.

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.

Beware of transactions in Drupal 7

Drupal 7's database layer makes use of transactions in several places. Be careful when you expect to see the results of node_save() outside of the scope of the current request. If someone accesses your website data before the transaction has been committed, the results of queries executed within are not visible. Either all queries succeed or nothing happens at all in a database transactions.

The Web site model and the Web app model

From http://www.sthlmconnection.se/en/blog/appification-web

Choose the Classic model if:

The product is mostly page/document based.
Accessibility for people with disabilities and SEO is non-negotiable.
Your project scope is large and the budget is limited.

Choose the App model if:

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: