home

mondofacto dictionary | linking to the dictionary

creating a link to the dictionary

We receive many requests to create links to the dictionary. You may wish to include a link to the main page for the dictionary, via the search form interface or link directly to a specific word.

These approaches do not require specific permission to set up, although it would be nice to hear from you if you are considering setting up a link, and please credit us within your link. On this page you'll find some examples of the HTML required to create links to the mondofacto dictionary.

linking to the dictionary home page

  <a href="http://www.mondofacto.com/dictionary/">The mondofacto dictionary</a>

using a search form

Perhaps you would like to include a search form for the mondofacto dictionary in your own pages. This code should be inserted in your page to allow users to access the search tool directly.

  <form action="http://www.mondofacto.com/facts/dictionary" name="f" method="get" enctype="application/x-www-form-urlencoded">
	 <input name="query" type="text" value="" maxlength="200" />
	 <input name="action" type="submit" value="Search" />
  </form>

  <p>Provided by <a href="http://www.mondofacto.com/">mondofacto</a></p>

If you would like your website user to be directed to the definition in a new tab or window within their browser, replace the first line of the above code, with the following line:

  <form action="http://www.mondofacto.com/facts/dictionary" name="f" method="get" 
  enctype="application/x-www-form-urlencoded" target="_blank">

The target="_blank" is the only difference to the line. This code tells the browser to open the definition in a new tab or window.

linking to a known word in the dictionary

You may wish to link directly to a particular word in the mondofacto dictionary. This can be achieved by using code fed directly to the search tool. The search term is URL encoded following a question mark (?), where all spaces are replaced by '+' and control characters are converted to %XX in hexadecimal. An example would be:

  <a href="http://www.mondofacto.com/facts/dictionary?WORD">WORD from Mondofacto</a>

In addition a perl subroutine can be used to URL encode any text:

  # Encode string as a URL.  Odd chars -> %XX and space -> '+'.
   sub text2url {
    local($_) = $_[0];
    s|([\000-\037"%&+/<>?\177-\377])|sprintf('%%%02x',ord($1))|eg;
    s/ /+/g;
    $_;
  }

Please Note: If you link directly to a specific word, there is no guarantee that word will remain supported. New words are added to the dictionary almost every day, equally, inappropriate words are also deleted. If you link to a specific word, it could disappear or be modified in the future.