You are here

function lightbox2_nodeapi in Lightbox2 5

Implementation of hook_nodeapi().

File

./lightbox2.module, line 88

Code

function lightbox2_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
  global $_LIGHTBOX2_INCLUDE;
  if (lightbox2_exclude_these_paths() != 1) {
    if ($op == 'view' && !$_LIGHTBOX2_INCLUDE) {
      lightbox2_add_files();
      $_LIGHTBOX2_INCLUDE = true;
    }
    elseif ($node->type == 'image' && !$_LIGHTBOX2_INCLUDE) {
      lightbox2_add_files();
      $_LIGHTBOX2_INCLUDE = true;
    }
  }
}