You are here

function faq_load in Frequently Asked Questions 5.2

Same name and namespace in other branches
  1. 6 faq.module \faq_load()
  2. 7 faq.module \faq_load()

Implementation of hook_load().

Initialises $node->question using the value in the 'faq_questions' table.

Parameters

$node: The node object.

File

./faq.module, line 250
The FAQ module allows users to create a FAQ page, with questions and answers displayed in different styles, according to the settings.

Code

function faq_load($node) {
  $result = db_fetch_object(db_query('SELECT question FROM {faq_questions} WHERE nid = %d AND vid = %d', $node->nid, $node->vid));
  if ($result) {
    $result->title = $result->question;
  }
  return $result;
}