The place where I write things down.
The use of #ajax attribute in the Drupal Form API is limited to a certain set of form elements. But what if you want to use a link to trigger your AJAX instead? It may be possible using the Drupal AJAX framework, but you'll need to figure out a way to pass the $form_state without breaking your form. There is a workaround that will allow you to use the AJAX built into the Form API with links or any other element.
Here's a useful snippet if you want to add an "Unblock selected users" operation to Views Bulk Operations (VBO). All you need to do is create a new Rules component. To make things simple, just import the following in Rules components:
Hooks in Drupal are awesome, but when another module calls the same hook it can cause conflicts (hook_form_alter is a common example). If you want to make sure your module's hooks get called last, you need to use hook_module_implements_alter().
So you've come across a scenerio where you need to give users special access to nodes, but the collection of content access control modules available on drupal.org don't quite meet your need. Then you my friend need to build your own solution.
I found myself in the same boat, so I thought I'd share some of the articles that really helped me grasp custom node access.
If you've ever created a block with hook_block_info you know that the visibility options are limited to just pages. In my case, I wanted to set my block to only appear on certain node types. The challenge is that you can't do it from hook_block_info because node type visibility isn't dictated by the block module, it's provided by the node module.
But fear not, there is a way! If you want to add content type based visibility for your block, you can do so in the .install file of your module using hook_install.