BibClass Hands On: Filtering

The Problem: Ugly bare URL string in the rsults list for each record

Your Mission: Modify filter for nicer URL presentation

View the Problem:

  1. Go to http://yourid.workshop.umdl.umich.edu/cgi/b/bib/bib-idx
  2. Select MoA books
  3. Search for "smith"
  4. See URL link
  5. Change that link to hide the naked URL

How:

  1. Edit default.functions.cfg in cgi/b/bib/
  2. Find the $gDefaultShortRecordFilter
  3. Change the Substitution on the URL element

My answer:

BEFORE: $$i =~ s,<URL[^>]*>(.*?)</URL>,<strong>URL:</strong> <a href="$1" target="_blank">$1</a><br>,gs;

AFTER:   $$i =~ s,<URL[^>]*>(.*?)</URL>,<a href="$1" target="_blank"><strong>Link to full document</strong></a><br>,gs;