25 Mar 2007

Advertlets Poll JavaScript Parameters

By default, the given Advertlets (an Asian blog / weblog advertising network) codes that you need to add in your blog are as below:

<script type="text/JavaScript">
	adv_username = 'username';
	adv_gid = 'username_default';
</script>
<script type="text/JavaScript"
	src="http://www.advertlets.com/_/js/advertlets.js">
</script>

There are several more parameters that you can use to customize the way Advertlets displays your poll by referring to the table below:

Parameter Values Definition
adv_font_type typeface The name of a font face of choice. For example Helvetica or Verdana. Defaults to Arial.
adv_box_width percentages Set Advertlets box width. Defaults to 100%.
adv_iframe_border 0, 1 Set a border or no border to Advertlets box. 1 = true, 0 = false. Defaults to 1.
adv_iframe_border_color colors Set Advertlets box border color (hex codes). Only applies if you set adv_iframe_border to 1. Defaults to 8FADCC.
poll_margin lengths Set a shorthand margin property inside Advertlets box. Defaults to 0.
box_color_unpicked colors Set background color (hex codes) for the unpicked poll answer box. Defaults to E5F2FF.
box_color_picked colors Set background color (hex codes) for the picked poll answer box. Defaults to 0066CC.

For example, to remove Advertlets iframe border simply add adv_iframe_border_color = '0'; somewhere before or after adv_gid = 'username_default'; line. This also applies to other parameters but make sure the values are set correctly.

Currently, I found out that adv_font_type parameter is not functional.