howto_user (howto_user) wrote in s2howto,

[paidaccount] How to display AdSense in custom styles

Paid Accounts Only
The following tutorial requires creating and editing a custom style, which in turn requires a paid, permanent, or early adopter account. Please read What are the paid account benefits? and How do I buy a paid account? to learn about the paid account benefits and how to buy a paid account.

If you have your journal style customized, to display Your Journal - Your Money ads on your journal pages, you need to call the print_ad_box("type") method of the Page class in the code of your layout layer. Where 'type' is defining ad format as follows:

s2.top728x90 Top
s2.bottom728x90 Bottom

To add html code around the ad block, viewer_sees_ad_box("type") clause could be used. Where 'type' is an appropriate banner value.


The following code could be used to display the 728x90 Bottom banner:

var Page p = get_page();
if (viewer_sees_ad_box("s2.bottom")) {
   "<div class=\"ad\">";

Contributed by arteman.

Tags: - all styles, displaying adsense, paid accounts only

Comments for this post were disabled by the author