At A Glance SFX feature
NOTICE
The software in this repository is free and open-source software, provided AS IS, with NO WARRANTY OF ANY KIND.
Feel free to use, share and modify the software in this repository, always keeping the original authorship information at the beginning of each script intact.
All of our software is licensed under a Creative Commons Attribution 3.0 United States License.
What It Is
The At a Glance feature of the Hekman Library SFX Services Menu unobtrusively displays useful journal-level metadata and relevant links. The At a Glance information is pulled directly from Ulrich's Periodical Index, and includes a link directly to the journal's detailed display on Ulrich's website.
Typical metadata displayed in the At a Glance box includes:
- Journal Type
- Publication Frequency
- Whether or not the journal is peer-reviewed
- A link to the journal's RSS feed, if available
- A "more details" link to the detailed display for this journal on Ulrich's website
The At a Glance feature only displays when all of these conditions are met:
- The journal has a valid ISSN
- An Ulrich's Periodical Index entry exists for this ISSN
Technology Requirements
Server-side- Perl installed, with the following Perl Modules
- LWP::Simple
- CGI
- Javascript must be enabled on the web browser
- Because the SFX template system does not allow external data to be included into the HTML output at compile-time, AJAX is used to retrieve the At a Glance data and render it.
get_journal_info.pl
Download get_journal_info.pl here
Place get_journal_info.pl on your SFX server or on another server of your choice. Note: if you do NOT place the get_journal_info.pl script on your SFX server, you will need to come up with some way to circumvent the security restrictions that limit AJAX requests to the initial web server. A proxy script (see below) can be used on the SFX server to circumvent this restriction.
ajax_proxy.pl
ajax.js
The above javascript will need to be modified with your server and path information. The AJAX functions that are used in the At a Glance feature are the following:
- var ajax2
- function sfxmenu_get_ulrichs_info(issn)
- function createRequestObject()
- function handleInfoResponse()
HTML Integration
To insert the At A Glance feature, place the following code in your SFX menu template:
<script type="text/javascript"> function ajax_init_sfxmenu() { sfxmenu_get_ulrichs_info('<TMPL_VAR NAME="ISSN" ESCAPE="HTML">'); }
</script>
<div id="info_box" style="display:none"> <div style="font-size:80%;text-align:center"> <strong>Journal at a glance</strong></div> <div style="display:none" id="info_box_rss"> </div> <div id="info_box_content"> </div> </div>