Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Wishlist
    • Component/s: Record
    • Labels:
      None

      Description

      Luke O'Sullivan shared this on the mailing list:

      ---

      I have added google scholar tags to our vufind based repository. I took an approach similar to that used when generating openurl links:

          /**
           * Get Google Scholar Tags
           *
           * @return array
           */
          public function getGoogleScholarTags()
          {
              $meta = array();
              $format = $this->getOpenURLFormat();
              $pubDate = $this->getPublicationDates();
              $pubDate = empty($pubDate) ? '' : $pubDate[0];
              $meta[] = array("name" => "citation_title", "content" => $this->getTitle());
              $meta[] = array(
                  "name" => "citation_author",
                  "content" => $this->getPrimaryAuthor()
              );
              foreach ($this->getSecondaryAuthors() as $author) {
                      $meta[] = array("name" => "citation_author", "content" => $author);
              }
              $meta[] = array(
                  "name" => "citation_publication_date",
                  "content" => $pubDate
              );

              switch ($format) {
              case 'Edited book':
              case 'Authored book':
              case 'Book':
                  $meta[] = array(
                      "name" => "citation_isbn",
                      "content" => $this->getCleanISBN()
                  );
                  break;
              case 'Journal article':
              case 'Article':
                  $meta[] = array(
                      "name" => "citation_issn",
                      "content" => $this->getCleanISSN()
                  );
                  $meta[] = array(
                      "name" => "citation_volume",
                      "content" => $this->getContainerVolume()
                  );
                  $meta[] = array(
                      "name" => "citation_issue",
                      "content" => $this->getContainerIssue()
                  );
                  $meta[] = array(
                      "name" => "citation_firstpage",
                      "content" => $this->getContainerStartPage()
                  );
                  $meta[] = array(
                      "name" => "citation_journal_title",
                      "content" => $this->getContainerTitle()
                  );
                  break;
              case 'Journal':
                  $meta[] = array(
                      "name" => "citation_issn",
                      "content" => $this->getCleanISSN()
                  );
              default:
                  break;
              }

              return $meta;
          }

      In core.phtml we then do

      $tags = $this->record($this->driver)->getGoogleScholarTags();
      foreach ($tags as $tag) {
      if (!empty($tag['content'])) {
      $this->headMeta()->appendName($tag['name'], $tag['content']);
      }
      }

      ---

      We may want to consider making this a configurable option, though if so, it should be off by default -- most VuFind instances are not serving up the sort of content indexed by Google Scholar, but for sites using it as an institutional repository front end, this would be appropriate.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Demian Katz
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: