You are here

function context_contrib_nodeapi in Context 6

Same name and namespace in other branches
  1. 6.2 context_contrib/context_contrib.module \context_contrib_nodeapi()

Implementation of hook_nodeapi().

File

context_contrib/context_contrib.module, line 66

Code

function context_contrib_nodeapi(&$node, $op, $teaser, $page) {
  if ($op == 'view' && $page && arg(0) == 'node') {

    // Implementation of context for nodequeue.
    if (module_exists('nodequeue')) {
      $result = db_query("SELECT qid FROM {nodequeue_nodes} WHERE nid = %d", $node->nid);
      while ($qid = db_fetch_object($result)) {
        context_set_by_condition('nodequeue', $qid->qid);
      }
    }
  }
}