viernes, 15 de julio de 2011

Una mejora en los dominios .tel que yo sí que uso

.tel Mapping Tool

July 15th, 2011

You might have already seen the, which allow you to very easily embed .tel information on your website.

A couple of weeks ago a significant update was made to the .tel Mapping Tool, which displays .tel domains, subdomains and related domains on a map in a very easy but modular way.

The previous version of the mapping tool allowed you to visualize a domain's info in the "bubble" window in a single way:

.tel mapping tool bubble

But now with the latest update you can pass in a format for the bubble by using the parameter "info=". The value of that parameter is a javascript snippet. The easiest explanation is through an example:

'<div><span style="float: left; margin-right: 10px;">' + r['logo'] + '</span><span>' + r['dds'] + '<br /><a href="http://' + domain + '" target="_blank">' + idndomain + '</a><br /><br />' + r['firstnaptr'] + '</span></div>'

The above gives the default bubble with the image on the left, and on the right the domain and the first contact record below it.
If you want to change it, note that this is a javascript string concatenation. It's pretty clear what the params are:

  • domain : the punycode domain
  • idndomain : the unicode IDN domain (what you want to show to users)
  • r : the result from the domain lookup, which has 'logo', 'dds' and 'firstnaptr', respectively the logo image, the title of your domain (dds), and the first naptr. All of those are actual html snippets.

If you want to pass in the 'info=' parameter using GET, you must escape the whole thing. And don't forget to put single quotes at start and finish, like the example above.
If you use POST, you're good to go.

Note that you can completely screw up the page if you pass in a broken javascript string, as it'll break the whole javascript code on the page. You've been warned: with great power comes great responsibility…

The .tel Mapping tool also now supports all .tel IDN domain types (such as chinese character domains).

Should you want more detail on how to use the .tel Mapping Tool, please see the "Tools for Website Integrationl page.

Posted by
in Apps and services 

No hay comentarios:

Publicar un comentario