PDA

View Full Version : Adsense Ads in avatars till user picks one


tonym
11-26-2006, 11:22 PM
Is there a way to put an ad in avatars that arnt in use....

say im a user of the forum....i didnt choose to have a avatar

then a ad would be displayed in the box ...untill the users picks a avatar

thanks

dougeetx
11-26-2006, 11:29 PM
I can tell you how to do it with the sigs.

tonym
11-26-2006, 11:31 PM
so if they dont have a sig it will post an ads in there till they get 1?

Zia
01-23-2007, 05:12 PM
I can tell you how to do it with the sigs.

why not ?

but it need html allowed?

lebanon
01-23-2007, 07:08 PM
i suppose editing the postbit template should do what ur asking for.

from my template
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>

so before the </if> exactly you should add this
<td class="alt2"><script type="text/javascript"><!--
google_ad_client = "pub-0984414105651333";
google_ad_width = 125;
google_ad_height = 125;
google_ad_format = "125x125_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "F5F7F9";
google_color_bg = "F5F7F9";
google_color_link = "000000";
google_color_text = "000000";
google_color_url = "0049AA";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td>
ofcourse replacing with ur own google code

so the whole thing looks like :
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td><else />
<td class="alt2"><script type="text/javascript"><!--
google_ad_client = "pub-0984414105651333";
google_ad_width = 125;
google_ad_height = 125;
google_ad_format = "125x125_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "F5F7F9";
google_color_bg = "F5F7F9";
google_color_link = "000000";
google_color_text = "000000";
google_color_url = "0049AA";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></if>

let me know if that worked :)

xlguy
01-23-2007, 11:30 PM
You are only allowed a maximum of 3 adsense on 1 page.

Zia
01-26-2007, 04:39 PM
hello Lebanon...:) every where..

w/o manual tempate editing..is there any way to do it?

You are only allowed a maximum of 3 adsense on 1 page.

that means..if there 3+ user w/o avtar there will 3+ adsense will be shown....
is it againts tos?

lebanon
01-28-2007, 03:27 PM
hey zia :)
Well i dont think it can be done without template edit.
But i guess xlguy is right too, its against the tos, and after all i havent tried it, i just supposed the if/else situation in the template :)