You are here

function biblio_load in Bibliography Module 5

Same name and namespace in other branches
  1. 6.2 biblio.module \biblio_load()
  2. 6 biblio.module \biblio_load()
  3. 7.3 biblio.module \biblio_load()
  4. 7 biblio.module \biblio_load()
  5. 7.2 biblio.module \biblio_load()

Implementation of hook_load().

This hook is called every time a node is loaded, and allows us to do some loading of our own.

File

./biblio.module, line 1841

Code

function biblio_load($node) {
  $additions = db_fetch_object(db_query('SELECT b.*, bt.name as biblio_type_name FROM {biblio} b left join {biblio_types} bt on b.biblio_type = bt.tid WHERE b.vid = %d', $node->vid));
  if ($additions->biblio_year == 9998) {
    $additions->biblio_year = t("In Press");
  }
  if ($additions->biblio_year == 9999) {
    $additions->biblio_year = t("Submitted");
  }
  return $additions;
}