function _biblio_token_values in Bibliography Module 6.2
Implements hook_token_values() for Organic Group specific tokens.
1 call to _biblio_token_values()
File
- includes/
biblio.tokens.inc, line 30
Code
function _biblio_token_values($type, $object = NULL) {
switch ($type) {
case 'node':
if ($object->type == "biblio") {
$type = db_result(db_query('SELECT name FROM {biblio_types} as t WHERE t.tid = %d', $object->biblio_type));
#$title = db_result(db_query("SELECT title FROM {node} WHERE nid = %d", $gid));
$values['biblio_year'] = check_plain($object->biblio_year);
$values['biblio_authors'] = check_plain($object->biblio_contributors[1][0]['lastname']);
$values['biblio_type_id'] = check_plain($object->biblio_type);
$values['biblio_type'] = check_plain($type);
$values['biblio_citekey'] = check_plain($object->biblio_citekey);
return $values;
}
break;
}
}