domingo, 6 de enero de 2013

.tel Mapping Tool

Friday, July 15th, 2011
You might have already seen this tool, which allows 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, sub-domains 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:
’ + r['logo'] + ‘’ + r['dds'] + ‘
http://’ + domain + ‘” target=”_blank”>’ + idndomain + ‘

’ + r['firstnaptr'] + ‘’ 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.

No hay comentarios:

Publicar un comentario