Version User Scope of changes
Sep 25 2008, 1:30 PM EDT (current) ryan_wetpaint 379 words added
Sep 25 2008, 12:58 PM EDT ryan_wetpaint

Changes

Key:  Additions   Deletions
When a cell is rendered on a page, an ad slot is shown beneath it. This ad slot randomly shows either a Wetpaint ad or, if you have provided it, your own ad content.

Function Reference

String
get
set
AdContentGets or sets the content of your ad slot. This content will be shown 50% of the time. The content is placed into the ad slot without any parsing on the part of the Client Application; therefore, you can use text links, images, Flash media, IFRAMEs, or JavaScript.
String
get
set
AdSlotSizeGets or sets the size of the Wetpaint ad slot. The possible values are in the form "WIDTHxHEIGHT", measured in pixels (for example, "200x200", or "468x60"). The default ad size is "300x250". Note that the Wetpaint ad slot size has no bearing on your ad slot size -- your ad is determined entirely what you pass to setAdContent() -- therefore, it is good practice to ensure that your ad content is of a similar size to the Wetpaint ad slot size.

Example Usage:
if( window.WPCAPI ) {
WPCAPI.setAdContent( "<a href='http://www.wetpaint.com'><img src='http://www.wetpaint.com/img/ad.gif' width=180 height=150/></a>" );
WPCAPI.setAdSlotSize( "180x150" );
}

Ad Slot Sizes:
The following ad slot sizes are accepted:
  • 120x240
  • 120x600
  • 125x125
  • 160x600
  • 180x150
  • 200x200
  • 234x60
  • 250x250
  • 300x250 (default)
  • 336x280
  • 468x60
  • 728x90
Notes for embedding Google Adsense:
If you are pasting in your Google Adsense code, be aware that you need to convert it into a JavaScript String within your <SCRIPT> tags. Keep the following in mind:
  • If you are defining your string in double quotes, you will need to escape (\) all of the double quotes in the string.
  • Either construct the string on multiple lines or remove all line breaks.
  • You may need to remove or break apart any JS comments in the code.
  • You also may need to break apart any closing "</SCRIPT>" tags in the source, so that they do not appear to be the end of your <SCRIPT> block.
  • Finally, be sure to follow Google's Code Implementation Guide.
Example Usage:
if( window.WPCAPI ) {
WPCAPI.setAdContent('<script type="text/javascript"><!' + '--google_ad_client = "pub-xxxxxxxxxx";google_alternate_color = "ffffff";google_ad_width = 160;google_ad_height = 600;google_ad_format = "160x600_as";google_ad_channel ="xxxxxxxxxx";google_ad_type = "text_image";google_color_border = "FFFFFF";google_color_bg = "FFFFFF";google_color_link = "0000FF";google_color_url = "666666";google_color_text = "333333";//--' + '></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></scr' + 'ipt>');
}