Het Biografisch Portaal van Nederland

80.425 personen
in 125.413 biografieën

Inhoud


Linking to the Biographical Portal

Linking to the Biographical Portal can be done in different ways.

 

We appreciate it very much if our sources link to our biographical portal. Links to persons in the portal look like this http://www.biografischportaal.nl/persoon/87515907. These links are permanent  in the sense that they will always work. When the use of an identifier disappears (for example, when we discover duplicates in our database, and have to remove one of the ids) the old link will redirect to the new biography, and so it will keep on working.

If you are the maintainer of one of the sites that serves as a source to the portal, it may be difficult or labor intensive to construct links from your site to the biographical portal. To make your life easier, we implement a "resolver" and a JSON interface that automatically constructs links on your site. The only thing you have to do is copy and paste some code on your pages.

1. Use the BioPort resolver

We implemented a "resolver" that, given the URL of a biography linked to in the database, redirects the user to the right personal page. For example the following link redericts the user to the person that has among its biographies a link to the DVN biography of Ada van Holland: http://www.biografischportaal.nl/resolver?url=http://www.historici.nl/Onderzoek/Projecten/DVN/lemmata/data/adavanholland

One way to implement this schema is by using Javascript on the original page:

<a OnClick="window.location='http://www.biografischportaal.nl/resolver?url=' + document.URL;return false;" 
   href="http://www.biografischportaal.nl"><img src="http://www.biografischportaal.nl/@@/bioport/images/zieook-transparent.png"></a>

 

2. Use Javascript.

A typical use case is the one where you want links to appear only if (1) the Biography is actually quoted in the Biographical Portal and (2) there are other biographies available in the biographical portal. 

The following code allows you to place links on your page that depend on the information that is present in the Biographical Portal. 

First, you place an element where you want the link to appear on your page, for example:

<a id="bioport_link" style="display:none" 
    href="http://www.biografischportaal.nl"><img src="http://www.biografischportaal.nl/@@/bioport/images/zieook-transparent.png"></a>

The "id" and "style" attributes are important - you can change the text or add images.

At the bottom of the page, you copy the following code:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>

<script>
    var create_link = function(url) {
        id = 'bioport_link';
        base_url = 'http://www.biografischportaal.nl/';
        $.ajax({
            type:'GET',
            url:base_url + 'resolver',
            data:{'url':url, 'min_number_of_biographies':2 },
            success:function(data){
                url = data['url'] || base_url;
                $('#' + id).attr('onclick', 'window.location="' + url + '";return false;');
                if (data['url']) {$('#' + id).show()};
            },
            dataType:'jsonp'
        });
    };
    create_link(document.URL)
</script>

Note that all this functionality is still somewhat in Beta, so there are details that may not work. If you encounter any problems, please contact jelle@gerbrandy.com.

 

examples

You can see the code in action on the sites of the Digitaal Vrouwenlexicon van Nederland and the Biografisch Woordenboek van Nederland

 


home zoeken bladeren project blog agenda links vragen contact