-2,50 +2,8 |
[[거북이]]님의 요청으로... ISBN 번호가 한국(89~)이나 일본(4~)가 아닌 다른 것들은 amazon.com 으로 링크하도록 함. |
* 부작용: 모름 |
=== wiki.pl 수정 === |
{{{perl |
sub ISBNLink { |
my ($rawnum) = @_; |
my ($rawprint, $html, $num, $first, $second, $third, $hyphened); |
... |
### 일본 서적은 별도로 링크 |
if ($num =~ /^4/) { |
return "<a href='http://bookweb.kinokuniya.co.jp/guest/cgi-bin/wshosea.cgi?W-ISBN=$num'>" . |
"<IMG class='isbn' ". |
"$ImageTag src='http://bookweb.kinokuniya.co.jp/imgdata/$num.jpg' ". |
"OnError='src=\"$noCoverIcon\"' ". |
"alt='".T('Go to the on-line bookstore')." ISBN:$rawprint'>". |
"</a>"; |
} |
### 이 아래부터 추가 |
### 외국 서적은 아마존으로 |
return "<a href='http://www.amazon.com/exec/obidos/ISBN=$num'>" . |
"<IMG class='isbn' ". |
"$ImageTag src='http://images.amazon.com/images/P/$num.01.MZZZZZZZ.gif' ". |
"OnError='src=\"$noCoverIcon\"' ". |
"alt='".T('Go to the on-line bookstore')." ISBN:$rawprint'>". |
"</a>"; |
### 아래는 주석 처리 |
# $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>"; |
# $third = "<a href=\"http://www.pricescan.com/books/" |
# . "BookDetail.asp?isbn=$num\">" . T('search') . "</a>"; |
# $html = $first . "ISBN " . $rawprint . "</a> "; |
# $html .= "($second, $third)"; |
# $html .= " " if ($rawnum =~ / $/); # Add space if old ISBN had space. |
# return $html; |
### |
############### |
} |
}}} |
소스는 [[/ISBN링크]]를 참조 |
=== 추가 업데이트 내역 === |