You are here

function _build_google_scholar_link in Bibliography Module 6

2 calls to _build_google_scholar_link()
biblio_link in ./biblio.module
Implementation of hook_link().
_build_biblio_link in ./biblio_theme.inc
Creates a link to export a node (or view) in EndNote Tagged format

File

./biblio_theme.inc, line 1018

Code

function _build_google_scholar_link($node) {
  $query = array();
  $query['btnG'] = 'Search+Scholar';
  $query['as_q'] = '"' . str_replace(array(
    ' ',
    '(',
    ')',
  ), array(
    '+',
  ), $node->title) . '"';

  // as_q = all the words
  $query['as_sauthors'] = $node->biblio_contributors[1][0]['lastname'];
  $query['as_occt'] = 'any';
  $query['as_epq'] = '';

  // exact phrase
  $query['as_oq'] = '';

  // at least one of the words
  $query['as_eq'] = '';

  // without the words
  $query['as_publication'] = '';

  // published in
  $query['as_ylo'] = '';

  // lower date in date range
  $query['as_yhi'] = '';

  // upper date in date range
  $query['as_sdtAAP'] = 1;

  //Search articles in all subject areas
  $query['as_sdtp'] = 1;

  //include patents
  return array(
    'title' => t('Google Scholar'),
    'href' => 'http://scholar.google.com/scholar',
    'attributes' => array(
      'title' => t("Click to search Google Scholar for this entry"),
    ),
    'query' => $query,
  );
}