function theme_google_scholar_link in Bibliography Module 7
Same name and namespace in other branches
- 6.2 includes/biblio_theme.inc \theme_google_scholar_link()
- 7.2 includes/biblio.theme.inc \theme_google_scholar_link()
2 theme calls to theme_google_scholar_link()
- biblio_node_view in ./
biblio.module - theme_biblio_export_links in includes/
biblio_theme.inc - Creates a group of links for the various export functions.
File
- includes/
biblio_theme.inc, line 1072
Code
function theme_google_scholar_link($variables) {
$node = $variables['node'];
$query = array();
$query['btnG'] = 'Search+Scholar';
// as_q = all the words.
$query['as_q'] = '"' . str_replace(array(
' ',
'(',
')',
), array(
'+',
), $node->title) . '"';
if (isset($node->biblio_contributors[0]['lastname'])) {
$query['as_sauthors'] = $node->biblio_contributors[0]['lastname'];
}
$query['as_occt'] = 'any';
// Exact phrase.
$query['as_epq'] = '';
// At least one of the words.
$query['as_oq'] = '';
// Without the words.
$query['as_eq'] = '';
// Published in.
$query['as_publication'] = '';
// Lower date in date range.
$query['as_ylo'] = '';
// Upper date in date range.
$query['as_yhi'] = '';
// Search articles in all subject areas.
$query['as_sdtAAP'] = 1;
// Include patents.
$query['as_sdtp'] = 1;
$attrs = array(
'title' => t("Click to search Google Scholar for this entry"),
);
if (variable_get('biblio_links_target_new_window', NULL)) {
$attrs = array_merge($attrs, array(
'target ' => '_blank',
));
}
$attrs = array_merge($attrs, array(
'rel' => 'nofollow',
));
return array(
'title' => t('Google Scholar'),
'href' => 'http://scholar.google.com/scholar',
'attributes' => $attrs,
'query' => $query,
);
}