NameLink depends on the NameTag tool to add tags around scientific names. NameLink recognizes these tags and looks the names up in the Global Names Index and adds hyperlinks to the names in the manner specified by the configuration
JavaScript:
NameLink functionality can be initiated by a client by including a javascript file on any HTML page:
<script type="text/javascript" src="http:></script>
Parameters can be defined BEFORE including the namelink.js file. Here are some customizable parameters:
<script type="text/javascript">
var namelink_sources = ['eol', 'gbif', 'gni'];
var namelink_show_logo = true;
var namelink_show_common_name = true;
</script>
Paramaters:
callback |
if a callback is specified the response of this API will be a javascript function of the same name. The only argument of the function will be a JSON object representing the generated HTML.
callback=hello_world
hello_world({"html":""})
|
collections |
a comma delimited list of collections to link to. The order indicates precedence.
col: Catalogue of Life
eol: Encyclopedia of Life
gbif: Global Biodiversity Information Facility
gni: Global Names Index
itis: Integrated Taxonomic Information System
namebank: uBio Namebank |
return_result |
if set to anything except 0, the page HTML will be marked up on the NameLink server and the resulting linked HTML will be returned |
logo |
if set to anything except 0, an icon for the linked collection will be included after each linked name |
common_names |
if set to anything except 0, common names for the found scientitic names will be looked up and included after the name in parenthesis
currently this option only works for collection EOL |
url |
the URL of the page to be linked |
Examples:
Link to GBIF and GNI in that order and include logos:
http://services.eol.org/namelink/doc/namelink_service.php?collections=gbif,gni&logo=1&url=http://www.bioline.org.br/abstract?id=fb95003
Link a BioOne article to ITIS, EOL, NameBank, GBIF and GNI in that order
http://services.eol.org/namelink/doc/namelink_service.php?collections=itis,eol,nb,gbif,gni&logo=1&url=http://www.bioone.org/doi/full/10.1671/039.029.0113
Link a BioOne article to EOL and include common names
http://services.eol.org/namelink/doc/namelink_service.php?collections=eol&common_names=1&url=http://www.bioone.org/doi/full/10.1671/039.029.0113
Comments (1)
May 16, 2009
David Shorthouse says:
Cool stuff Patrick. Are you checking to see if jQuery might already be loaded on...Cool stuff Patrick. Are you checking to see if jQuery might already be loaded on the client side? Here's an example: http://jquery-howto.blogspot.com/2009/03/check-if-jqueryjs-is-loaded.html