Hi Ron,
In Biblio one has the possibility to activate export links to e.g. Google Scholar and PubMed. Can you do the same for an export link to Worldcat? I changed/added a little to your code and made it work, but as am I not a PHP programmer it is probably not the correct way of doing! Besides it would be better not to jingle with your code...
Here are the lines i added:
file biblio.module
line 449: $show_link = variable_get('biblio_export_links', array('tagged' => TRUE, 'xml' => TRUE, 'bibtex' => TRUE, 'worldcat' => TRUE));
line 455: if ($show_link['worldcat']) $links['biblio_worldcat'] = _build_worldcat_link($node);
file biblio.admin.inc
line 331: '#default_value' => variable_get('biblio_export_links', array('rtf', 'tagged', 'xml', 'bibtex', 'worldcat')),
line 337: 'worldcat' => t('Worldcat'),
file biblio_theme.inc
line 875: $show_link = variable_get('biblio_export_links', array('rtf' => TRUE, 'tagged' => TRUE, 'xml' => TRUE, 'bibtex' => TRUE, 'worldcat' => TRUE));
line 885: if ($show_link['worldcat'] && !empty($node))
line 886: $links .= '
';
line 923: case 'worldcat':
line 924: $link = _build_worldcat_link($node);
line 925: break;
line 1038-1049:
function _build_worldcat_link($node) {
$query = array();
$query['q'] = '"'.str_replace(' ', ' ', $node->title).'"'; // q = all the words
return array(
'title' => t('Worldcat'),
'href' => 'http://www.worldcat.org/search',
'attributes' => array('title' => t("Click to search Worldcat for this entry")),
'query' => $query,
);
}
Hopes this gives you a hint of what I mean.
Thanx and best regards, Christian.
Comments
Comment #1
cvknl commentedAnother great functionality would be an export link to Google Books/Google Preview (only for biblio items that have a ISBN) and maybe an export link to have users buy the book in the Amazon.com online bookstore.
Comment #2
rjerome commentedYep, shouldn't be a problem.
Ron.
Comment #3
liam morlandThis version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.