You are here

function fb_canvas_nodeapi in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 5 fb_canvas.module \fb_canvas_nodeapi()

File

./fb_canvas.module, line 270
This module provides some app-specific navigation to facebook apps.

Code

function fb_canvas_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  if ($op == 'view' && $node->type == 'fb_app') {
    if (user_access('administer fb apps')) {
      $fb_app = $node->fb_app;
      $output = theme('dl', array(
        t('Canvas URL') => "http://apps.facebook.com/{$fb_app->canvas}",
      ));
      $node->content['fb_canvas'] = array(
        '#value' => $output,
        '#weight' => 2,
      );
    }
  }
}