Home • HanBar™ Lexicon • Expression Server |
Brought to you by |
||||||||||||||||||||||||||||||||
OverviewThe Hanbar™ Lexicon Expression Server sends you a random expression from the Hanbar database. By following the instructions below, you can show a phrase-a-day on your website, and start practicing your Chinese today. How it WorksThe Expression Server has access to the same database of expressions that Hanbar Lexicon uses. You use it by visiting this page with a few parameters, such as the subject category, and the format you want the Expression Server to present it to you. Some of the categories are:
How To (The Basics)The Expression Server can send you an expression in a variety of ways, but probably the simplest is to ask for a little bit of JavaScript that you include into your webpage, followed by a bit more JavaScript you put directly into your web page. The first bit is the expression the Expression Server has chosen for you, the second bit allows you to decide how to make it look on your page. Here's one possible way of doing this. You can copy this and paste it into your web page. You can substitute another category in place of conversation if you'd prefer. If your sample is producing a random jumble of letters and strange jibberish instead of Chinese characters, it could be because your web page isn't set to use Unicode. This can be fixed by making sure the meta tag shown below appears near the top of your webpage: If you don't have access to the head section of your web page, or if you already have another charset given there, you'll have to resort to advanced programming techniques. Anyway, the example above is just does a bare-bones presentation. A bit more HTML, and you can have a rather fancy presentation. The possibilities are limited only by your imagination. See the "JS Format" section, below, for a full description of the JavaScript object that Expression Server sends to you. How To (Advanced)For the techno-geeky, here are all the parameters in their full glory:
The formats available are:
Examples: http://woxuezhongwen.com/hanbar/exprserver.asp?cat=conversation&format=jsThis example fetches one of the expressions from the conversation category, sending back the response in JavaScript object notation. http://woxuezhongwen.com/hanbar/exprserver.asp?pinyin=bu4&format=xmlThis example fetches one of the expressions with a character pronounced bu in the 4th tone, returning the response in Hanbar XML. The Fine PrintUsing the Expression Server is free. The only thing we ask is that you attribute us as the provider of the expressions, and put a link to the http://woxuezhongwen.com main site near the provided content. It can be as simple as the following: That's not too much to ask, is it? Thanks, and enjoy! |
|
||||||||||||||||||||||||||||||||
This page is Copyright © MediusRes.Com and
Thomas M. Tuerke 2002-2024
unless otherwise indicated All Rights Reserved Reproduction or distribution without prior written permission is strictly prohibited. Scripting and DHTML by Technomancer Software technomancer.ws Privacy Policy |
Support MediusRes.com |