You are here

function fb_app_load in Drupal for Facebook 5

Same name and namespace in other branches
  1. 5.2 fb_app.module \fb_app_load()

File

./fb_app.module, line 200
Defines a custom node type that stores a facebook application configuration.

Code

function fb_app_load($node) {
  $fb_app = db_fetch_object(db_query('SELECT * FROM {fb_app} WHERE nid=%d', $node->nid));
  $fb_app_data = fb_app_get_data($fb_app);
  $result = db_query('SELECT * FROM {fb_app_block} WHERE nid=%d', $node->nid);
  while ($data = db_fetch_object($result)) {
    $blocks[$data->delta] = $data;
  }
  return array(
    'fb_app' => $fb_app,
    'fb_app_blocks' => $blocks,
    'fb_app_data' => $fb_app_data,
  );
}