admin's blog

Optimizing/Caching Poll's Block

We all know that Poll is a core module which ships with Drupal. After installing this module we can setup poll and we can place a "most recent poll" block any where in region, usually its on a front page. I investigated this module and I found that it takes 20-25 queries to load most recent poll block and when a user submits a vote on that poll it does a cache_clear_all. Which was like WOW, in addition to submitting a vote users were also clearing my cached data. Optimizing or Caching poll's block for any kind of user (authenticated or anonymous) is like piece of cake, but figuring out how to do it was really a big pain in a neck.

Advanced Workflow Management

Advance Workflow Management will help workflow admin define single workflow with states adding a layer of groups at top of that; access control will be based on groups. This module will create a new tab "Workflow Groups" through which admins can create various roles as workflow groups, assign group role to the user (author/editor/publishers) along with the role that manipulate workflow.

Pakistan Flood Line Updates

Sharing a brief report about the relief work done by Save-Humans.org, this group is maintained voluntarily by professionals belonging to various walks of life.

Reported by
Sufyan Kakakhel
http://www.save-humans.org

Index additional information using node_api hook

I was going through one of my projects and I came to know that how simple it is to insert additional information into your site's search indexes using hook_nodeapi. A comprehensive details about hook_nodeapi can be found here.

Following are the steps involved to make this happen:

  • Create a module that implements hook_nodeapi, lets say example_nodeapi()

function example_nodeapi($node, $op) {
  // Function definition here
}

A hundred after nearly five years

After a long five years of out of form batting, Shahid Afridi really did a boom boom when he knocked 100 on Sri-Lanka soil.. Today its a big day for Afridi as he also became the third batsmen to hit most sixes againt single team; he smashed 51 Sixes against Srilanka, he is following Sanath Jaysuriya of Srilanka who smashed 53 Sixes against Pakistan.