The One that works ....
Expand|Select|Wrap|Line Numbers
- #!C:\Perl\bin\perl.exe
- # openresolver.cgi
- #
- # OpenResolver - a CGI script for resolving OpenURLs.
- #
- # Andy Powell <a.powell@ukoln.ac.uk>
- # UKOLN, University of Bath
- # (For copyright statement and acknowledgements see end).
- #
- # $Id: openresolver.cgi,v 1.14 2002/06/06 12:54:53 lisap Exp lisap $
- #
- #
- # Modified significantly by Melissa Belvadi, Maryville University, St. Louis, MO, USA
- #
- # Start of update notes: Sept 17, 2005:
- # 2005-09-17: added dbline[1] code to title_search within catalog to also check ISSN, not just holdings for match to last
- # around lines 2163-2166 and also same for keyword_search around line 2006 (changed "last" to "next" in keyword_search
- #
- our $openresolverdir = "C:\\Inetpub\\cgi-bin\\openresolver";
- our $header = "$openresolverdir\\header";
- our $footer = "$openresolverdir\\footer";
- our $edrs_usage_log = "$openresolverdir\\edrs-requests.txt";
- our $isbn_usage_log = "$openresolverdir\\isbn-requests.txt";
- our $search_page = "http://library.drury.edu/Research/jsearch.htm";
- our $database_list_file = "C:\\Inetpub\\cgi-bin\\openresolver\\database_list.txt";
- our $lexisapidata = "$openresolverdir/lexisnexis.txt";
- our $datafile="C:\\Inetpub\\cgi-bin\\openresolver\\openresolver.data";
- our $catalogfile="C:\\Inetpub\\cgi-bin\\openresolver\\catalog.data";
- our $goodlogfile="C:\\Inetpub\\cgi-bin\\openresolver\\hitlog-yes.txt";
- our $badlogfile="C:\\Inetpub\\cgi-bin\\openresolver\\hitlog-no.txt";
- our $catalog_search='http://swan.missouri.edu/search~S2/o?SEARCH=';
- our $ez = 'http://library.drury.edu:2048/login?url=';
- our $manual_search_sid = "DULookup";
- use CGI qw(-oldstyle_urls);
- use LWP::Simple;
- use URI::URL;
- use URI::Escape;
- use XML::Simple;
- use XML::DOM;
- #use diagnostics;
Expand|Select|Wrap|Line Numbers
- #!C:\Perl\bin\perl -T
- #
- # OpenResolver - a CGI script for resolving OpenURLs.
- # Written primarily by Melissa Belvadi, Maryville University, St. Louis, MO, USA
- # See copyright and license information at the end.
- use diagnostics;
- use CGI;
- use LWP::Simple;
- use URI::URL;
- use URI::Escape;
- use XML::DOM;
- my $query = new CGI;
- print $query->header("text/html");
- ############################# Local site variables ########################################
- ############# Expect to edit most of these ##############################################
- #################### although a few are just a question of preference for wording of public messages ##################
- our $version = "OpenResolver Drury version for Windows";
- our $short_name = "Drury";
- our $site_abbrev = "DU";
- our $openresolverdir = "C:\\Inetpub\\cgi-bin\\openresolver";
- our $this_script = "http://library.drury.edu/cgi-bin/openresolver_drury.pl";
- our $report_script = "http://library.drury.edu/cgi-bin/openresolver/report_error.pl";
- our $catalog_search='http://swan.missouri.edu/search~S2/o?SEARCH=';
- our $search_page = "http://library.drury.edu/Research/jsearch_test.htm";
- our $home_page = "http://library.drury.edu";
- our $library_phone = "417-873-7348";
- our $library_hours_page = 'http://library.drury.edu/Services/hours.htm';
- our $banner_color = "#990000";
- our $catalog_name="Drury Library Catalog";
- our $catalog_main = 'http://swan.missouri.edu/search~S2';
- our $catalog_search='http://swan.missouri.edu/search~S2/o?SEARCH=';
- our $catalog_keyword='http://swan.missouri.edu/search~S2/X?SEARCH=';
- our $catalog_isn='http://swan.missouri.edu/search~S2/i?SEARCH=';
- our $catalog_title='http://swan.missouri.edu/search~S2/t?SEARCH=';
- our $mobius_name="MOBIUS Union Catalog";
- our $mobius_short_name="MOBIUS";
- our $mobius_main = 'http://mobius.umsystem.edu/search/';
- our $mobius_keyword='http://mobius.umsystem.edu/search/Y?SEARCH=';
- our $mobius_issn='http://mobius.umsystem.edu/search/i?SEARCH=';
- our $mobius_title='http://mobius.umsystem.edu/search/t?SEARCH=';
- our $mobius_author='http://mobius.umsystem.edu/search/a?SEARCH=';
- our $ez = 'http://library.drury.edu:2048/login?url=';
- our $manual_search_sid = "DULookup";
- our $oclc_sid = "mod"; # this is used for outbound openurl links to oclc databases - the 'partneraccess' code
- our $gale_locid = ""; #this is used for outbound openurl links to Gale databases - should be your own
- our $jstor_origin = "DRURY"; # this is your jstor location
- #Set the flag below to 0 if you do not want the box offering Internet Searches to display
- our $use_internet_searches = 0;
- #Variables relating to Interlibrary Loan
- #If you do not use ILLiad, set this to 0 and the illiad variables below to blank
- our $use_illiad = 0;
- our $local_illiad_name = "ILLiad"; # If you have ILLiad but call the service something else locally
- our $illiad_openurl = 'http://www.library.maryville.edu/illiad/illiad.dll/OpenURL?';
- our $illiad_main = 'http://www.library.maryville.edu/illiad/logon.html';
- #Message displayed when no results are found, whether or not you use ILLiad or a blank form
- our $noresults_message_ill;
- if ($use_illiad) { $noresults_message_ill = '<LI>Request a copy of this article through ILLiad (see Interlibrary Loan Request information below).</LI>' }
- else { $noresults_message_ill = '<LI>Request a copy of this article through interlibrary loan.</LI>'};
- #If you have a generic blank web form/address for ILL requests, set this to 1 and give the URL below
- our $use_ill_blank_form = 1;
- our $ill_blank_form = 'http://library.drury.edu/Services/ill.htm';
- our $ill_nofill_text = '(Requests for items owned by ' . ${short_name} . ' in any format will not be filled!)<P>';
- our $mobius_warning_text = '<b><font size="+1">Have you checked <a href="' . ${mobius_main} . '">' .
- ${mobius_short_name} .
- '</a> Yet?</font></b><br>The Library will not process an ' . $local_illiad_name . ' request for a title that ' .
- ' is available through <a href="' . ${mobius_main} . '">' . ${mobius_short_name} . '</a>.<br>' .
- ${mobius_short_name} . ' books usually arrive in 3-4 business days, but ' .
- $local_illiad_name . ' requests can take up to 2 weeks!';
- our $crossref_search = 'http://www.crossref.org/openurl?url_ver=Z39.88-2004&req_dat=ourl_mulibrary:library&multihit=true&rft_id=info:doi/';
- our $worldcat_loc = "missouri"; # this is used for outbound links to open worldcat to set local region to display first
- #the Earliest ERIC Document Microfiche your library carries - if you have none, put 999999
- our $earliest_edrs = 999999;
- our $eric_fiche_text = 'The ERIC microfiche are located along the back southeastern wall on the first floor.';
- # the dissertation warnings are if the genre is actually dissertation or book
- our $dissertation_warning_text_title = 'Warning: This is a dissertation!';
- our $dissertation_warning_text = 'Your citation is to a dissertation, not a "normal" book; you should check
- MOBIUS to see if any Missouri libraries own it, but you will probably need to place an Interlibrary Loan
- request to obtain it, and if so, it might cost money to get it.<P>Speak to the library staff regarding
- this item for an explanation of your options.';
- our $dissertation_warning_text_abs_title = 'Warning: This is a dissertation abstracts citation!';
- our $dissertation_warning_text_abs = 'Your citation is to a Dissertation Abstracts entry;
- you probably really want the entire dissertation (which is treated by libraries like a book,
- but is very likely to require an Interlibrary Loan request).<P>Speak to the library staff regarding
- this item for an explanation of your options.';
- # the diss_abs_holdings comment appears when the genre is article and the citation is to a diss abs publication
- our $diss_abs_holdings_comment = 'Dissertation: Your citation is to a Dissertation Abstracts entry;
- you probably really want
- the entire dissertation. <br> Speak to the library staff regarding this item for an
- explanation of your options.';
- our $psyc_critiques_warning_text_title = 'Warning: Psyc Critiques Book Review!';
- our $psyc_critiques_warning_text = 'Your citation is to a book review in a database called PsycCritiques.
- <br>You may actually want the book itself, in which case you should go back to the PsycINFO record,
- <br>look for the full title of the reviewed book (the title and author above are for the review,
- not the book!), <br> and search for it in the ' . $short_name .
- ' Library Catalog or the ' . $mobius_name . '<br>If you do still want the book review, use the
- ILLiad link below to place an Interlibrary Loan article request. ';
- #Best sort lists - put the database_list abbrevs in order of how high up they should appear
- # if there are multiple holdings matches -
- # For the ISSN list, the earlier in the list, the higher up it will appear...
- # For the title list, the later in the list, the higher up it will appear...
- # in the results the patron sees (higher up = better quality sites, more reliable links, more pdfs)
- # Databases that do not appear in the list will appear in any order below the results from these lists
- # (you do not have to list all databases, just the ones you want to have some kind of preference for)
- # Entries are not checked against the database list file - an invalid one will just have no effect
- our @bestsort_issn_order = ("lexis-nexis", "aph", "buh", "muse", "sih", "ingenta", "jstor", "prh");
- our @bestsort_title_order = ("catalog", "lexis-nexis", "ingenta", "prh", "jstor", "ebscojs", "f5h", "sih", "ufh", "buh", "aph");
- #Provide the text of the customlink that you use in EBSCOHost to link to this openurl server
- our $ebsco_openurl_link_text = 'Check Drury Availability';
- # If you use the public PubMed instead of Medline, change this to PubMed - it is used with faulty PMID cites
- our $pubmed_name = "Medline";
- #If you do not get Medline via EBSCOHost, change this to a 0
- our $use_ebsco_medline = 1;
- # If you want to include links to other area openurl servers, set this to 1 and make sure the file $localserversdata is populated correctly
- our $use_other_servers = 1;
- our $linkto_password_note = 'Note: the library links above will generally require you to have some kind of password from their library to retrieve full text.' . $short_name . ' cannot provide that for you.';
- # if you have made a LibX toolbar, put your Libx code here, otherwise, leave the string empty
- our $libx_id = "libx:du";
- # ###################### Options for the publishing/indexing box - optional more links for journal information
- #Set the flag below to 0 if you do not want the box offering publishing and indexing information to display at all
- our $use_indexing_info = 1;
- # If you set use_indexing_info to 1, you can suppress any particular individual links from displaying below:
- ## If you do not wish to offer your users any of the following kinds of alternative links, set it to 0
- our $offer_worldcat_links = 1;
- our $offer_mobius_links = 1; # this applies just to the publishing/indexing box, not anywhere else
- our $offer_jake_links = 0;
- our $offer_genamics_links = 0;
- our $offer_google_links = 1;
- our $offer_google_scholar_links = 1;
- our $offer_oaister_links = 0;
- ## if you do not subscribe to EBSCO Serials Directory or do not wish it to
- ### display as a link in the publishing/indexing box, set the variable below to an empty string
- our $ebsco_ser_search = 'http://search.ebscohost.com/direct.asp?fQuery=&db=ser&bQuery=';
- # ######################End of options for the publishing/indexing box ########################
- ##########################################################################################
- ######################## End of local site variables ###################################
- ########## File location variables #############################################
- ######################################################################################
- # File location variables that may need changing for your installation (especially Windows versus Linux)
- # You should also make sure that the log files are writeable by your public Internet "user"
- our $header = "$openresolverdir/header";
- our $footer = "$openresolverdir/footer";
- our $edrs_usage_log = "$openresolverdir/edrs-requests.txt";
- our $isbn_usage_log = "$openresolverdir/isbn-requests.txt";
- our $database_list_file = "$openresolverdir/database_list.txt";
- our $datafile="$openresolverdir/openresolver.data";
- our $catalogfile="$openresolverdir/catalog.data";
- our $goodlogfile="$openresolverdir/hitlog-yes.txt";
- our $badlogfile="$openresolverdir/hitlog-no.txt";
- our $fulllogfile = "$openresolverdir/search-log.txt";
- our $lexisapidata = "$openresolverdir/lexisnexis.txt";
- #localserversdata is for providing links to other area openurl servers
- # it should be in tab-delimited format with the columns: <OCLC ID><TAB><Name of library for display><TAB><base of their openurl server>
- # without the <> around the data, just the data itself!
- our $other_servers_data = "$openresolverdir/otherservers.txt";
- ########### End of file location variables ######################