pub; // expand the title $pub = chado_expand_var($pub, 'field', 'pub.title'); $pub = chado_expand_var($pub, 'field', 'pub.volumetitle'); // get the citation $values = array( 'pub_id' => $pub->pub_id, 'type_id' => array( 'name' => 'Citation', ), ); $citation = chado_generate_var('pubprop', $values); $citation = chado_expand_var($citation, 'field', 'pubprop.value'); // get the abstract $values = array( 'pub_id' => $pub->pub_id, 'type_id' => array( '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); } // get the author list $values = array( 'pub_id' => $pub->pub_id, 'type_id' => array( 'name' => 'Authors', ), ); $authors = chado_generate_var('pubprop', $values); $authors = chado_expand_var($authors, 'field', 'pubprop.value'); $authors_list = 'N/A'; if ($authors) { $authors_list = $authors->value; } // get the first database cross-reference with a url $options = array('return_array' => 1); $pub = chado_expand_var($pub, 'table', 'pub_dbxref', $options); $dbxref = NULL; if ($pub->pub_dbxref) { foreach ($pub->pub_dbxref as $index => $pub_dbxref) { if ($pub_dbxref->dbxref_id->db_id->urlprefix) { $dbxref = $pub_dbxref->dbxref_id; } } } // get the URL // get the author list $values = array( 'pub_id' => $pub->pub_id, 'type_id' => array( 'name' => 'URL', ), ); $options = array('return_array' => 1); $urls = chado_generate_var('pubprop', $values, $options); $urls = chado_expand_var($urls, 'field', 'pubprop.value'); $url = ''; if (count($urls) > 0) { $url = $urls[0]->value; } ?>
type_id->name)) . '.inc'; $inc_path = DRUPAL_ROOT . '/' . drupal_get_path('module', 'tripal_pub') . "/theme/templates/pub_types/$inc_name"; if (file_exists($inc_path)) { require_once "pub_types/$inc_name"; } else { require_once "pub_types/default.inc"; }