# Names of sites. (The first entry is used for the number link.)
@IsbnNames = ('bn.com', 'amazon.com', 'powells.com', 'search');
# Full URL of each site before the ISBN
@IsbnPre = ('http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=',
'http://www.amazon.com/exec/obidos/ISBN=',
'http://www.powells.com/cgi-bin/biblio?isbn=',
'http://www.pricescan.com/books/BookDetail.asp?isbn=');
# Rest of URL of each site after the ISBN (usually not needed)
@IsbnPost = ('', '', '', '');
I decided not to translate the names, since I think many non-US wikis would rather change the links to local sites. --CliffordAdams
--- usemod092/wiki.pl Sat Apr 21 17:44:10 2001
+++ wiki.pl Sun Aug 12 11:08:33 2001
@@ -1482,11 +1482,11 @@
$first = "<a href=\"http://shop.barnesandnoble.com/bookSearch/"
. "isbnInquiry.asp?isbn=$num\">";
$second = "<a href=\"http://www.amazon.com/exec/obidos/"
- . "ISBN=$num\">" . T('alternate') . "</a>";
+ . "ISBN=$num\">";
$third = "<a href=\"http://www.pricescan.com/books/"
- . "BookDetail.asp?isbn=$num\">" . T('search') . "</a>";
+ . "BookDetail.asp?isbn=$num\">";
$html = $first . "ISBN " . $rawprint . "</a> ";
- $html .= "($second, $third)";
+ $html .= "($second" . T('alternate') . "</a>, " . $third . T('search') . "</a>)";
$html .= " " if ($rawnum =~ / $/); # Add space if old ISBN had space.
return $html;
}
-- PeterKaminski
The following copy of ISBNLink will make the URLs subject to translation, so that changing URLs is a matter of adding them to the translation file.
sub ISBNLink {
my ($rawnum) = @_;
my ($rawprint, $html, $num, $first, $second, $third);
$num = $rawnum;
$rawprint = $rawnum;
$rawprint =~ s/ +$//;
$num =~ s/[- ]//g;
if (length($num) != 10) {
return "ISBN $rawnum";
}
$first = $q->a({-href => Ts('http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=%s', $num)},
"ISBN " . $rawprint);
$second = $q->a({-href => Ts('http://www.amazon.com/exec/obidos/ISBN=%s', $num)},
T('alternate'));
$third = $q->a({-href => Ts('http://www.pricescan.com/books/BookDetail.asp?isbn=%s', $num)},
T('search'));
$html = "$first ($second, $third)";
$html .= ' ' if ($rawnum =~ / $/); # Add space if old ISBN had space.
return $html;
}