pub; // get the citation $values = [ 'pub_id' => $pub->pub_id, 'type_id' => [ 'name' => 'Citation', ], ]; $citation = chado_generate_var('pubprop', $values); $citation = chado_expand_var($citation, 'field', 'pubprop.value'); // get the abstract $values = [ 'pub_id' => $pub->pub_id, 'type_id' => [ 'name' => 'Abstract', ], ]; $abstract = chado_generate_var('pubprop', $values); $abstract = chado_expand_var($abstract, 'field', 'pubprop.value'); $abstract_text = ''; if ($abstract) { $abstract_text = htmlspecialchars($abstract->value); $abstract_text = substr($abstract_text, 0, 450); $abstract_text .= "... " . l("[more]", "node/$node->nid"); } $teaser_text = "
" . $abstract_text; ?>