Author |
Topic |
dl4gbe
Starting Member
Thailand
36 Posts |
Posted - 26 May 2006 : 07:58:38
|
Hello.
Here an example to add adsense in topic.asp
Add the folllowing function to topic.asp please do not forget to set your own ID in google_ad_client
sub Adsense(strColorBG)
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & CColor & """ valign=""top"" width=""" & strTopicWidthLeft & """>" & vbnewline
Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"">Google Adsense</span></font>" & vbNewLine
response.write " <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>USA</small></font><br />" & vbNewLine & _
" <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>Mountain View</small></font></p></td>" & vbNewLine
Response.Write " </td>" & vbnewline & _
" <td bgcolor=""" & CColor & """ height=""100%"" width=""" & strTopicWidthRight & """"
if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap")
if (AdminAllowed = 1) and (maxpages > 1) then
Response.Write (" colspan=""3"" ")
else
Response.Write (" colspan=""2"" ")
end if
Response.Write "valign=""top"">" & vbnewline
Response.Write " <table width=""100%"" height=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td valign=""top"">" & vbNewLine
strColor = strColorBG
if (left(strColor,1) = "#") then
strColor = mid(strColor,2)
end if
%>
<script type="text/javascript"><!--
google_ad_client = "xxxxxxxxxxxxxx";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "<%=strColor%>";
google_color_link = "0000FF";
google_color_bg = "<%=strColor%>";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<%
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td valign=""bottom"" align=""right"" height=""20""><a href=""#top"">" & getCurrentIcon(strIconGoUp,strLangTopic00200,"align=""right""") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
end sub
at the beginning of the file declare one variable.
bolShowAdd = true
At the end of the big reply loop bevor the next insert this.
if bolShowAdd = true then
adsense(CColor)
bolShowAdd = false
end if
Here is an example:
http://www.thai-wahn.com/topic.asp?TOPIC_ID=4755
Please note: colors only work with rgb values. In case you need a ColorName RGB converter I can post the code here.
Chris < |
WWW.TIP-THAILAND.DE The newspaper for the German speaking Community in South East Asia (Offices in Phuket, Pattaya, Bangkok, Nong Khai, Vietiane)
|
Edited by - dl4gbe on 26 May 2006 08:15:20 |
|
Podge
Support Moderator
Ireland
3775 Posts |
|
Karel Bata
Junior Member
United Kingdom
122 Posts |
Posted - 29 May 2006 : 11:45:46
|
Are you deliberately out to annoy your users with this? It is very intrusive!
< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 29 May 2006 : 15:11:53
|
Personal feelings aside, its a good mod.
The ad issue is up to each webmaster to decide on his/her own. If user's are ok, then its no big deal. If they're not ok, they'll say so by either saying so or not returning. Either way, bandwidth costs money and I don't know enough to say how to best pay for it. < |
|
|
Karel Bata
Junior Member
United Kingdom
122 Posts |
Posted - 30 May 2006 : 04:13:09
|
There's a seperate thread debating this here.< |
|
|
CarKnee
Junior Member
USA
297 Posts |
Posted - 02 June 2006 : 16:42:17
|
quote: Originally posted by Podge
Very nice.
Do you have a separate channel set up for it? If so, how does it compare to adsense on the rest of the forum?
I have had an AdSense block running as the first reply in a thread for a while now (year or so). It is displayed ONLY to non registered members and "non-supporting" members.
That channel is the highest performing channel I have. It gets 2x the CTR of the 2nd highest performing AdSense block on the site. However, I have played with colors and images extensively to tweak it.
Going by that "Snitz Stats" thing I have in my signature... if you have a rank close to mine I would suggest implementing it and you may be pleasantly supprised.
I am not getting into a debate about ads being evil or not.< |
|
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 02 June 2006 : 17:00:40
|
First reply only? and only for non-registered members? And that gets you double your 2nd highest performing block?
Hmm. Though, all things are relative... $2 is double $1, but nothing to do back-flips about. Any more concrete numbers to help with the decision? (BTW, I'm not implying that those are your numbers, just that 'double' is a relative thing)< |
|
|
CarKnee
Junior Member
USA
297 Posts |
Posted - 05 June 2006 : 10:09:14
|
quote: Originally posted by AnonJr
First reply only? and only for non-registered members? And that gets you double your 2nd highest performing block?
Hmm. Though, all things are relative... $2 is double $1, but nothing to do back-flips about. Any more concrete numbers to help with the decision? (BTW, I'm not implying that those are your numbers, just that 'double' is a relative thing)
I only display the block in the thread to "non-supporting" members (this includes non-registered and non-logged in people). Members of a community web site have "ad blindness" and will most likely not click on any ads.
Furthermore, I tested placing the ad at random positions on the second and greater pages, but their performance was horrible so I removed them.
I didn't say income was doubled, I said Click Through Rate (CTR) was doubled. Income isn't directly proporional to CTR. Income would depend on the format/size of the AdSense block, the keywords you are targeting, etc...
For instance, if I have a thread that starts talking about taking a cruise vacation then I get an adsense block pushing a vacation. Those ads will get a different amount of $$ then a block in a thread about viagra.
-CarKnee< |
|
|
|
bpopark
Starting Member
8 Posts |
Posted - 16 June 2006 : 21:28:25
|
Hey my first MOD for the adsense
http://www.bpopark.com/forum/topic.asp?TOPIC_ID=21
thanks dl4gbe
Just that I had to figure out for long where I had to put these MOD if you specify between what that wd be great for the beginners
till then take care
Pawan
< |
www.bpopark.com/forum |
|
|
weeweeslap
Senior Member
USA
1077 Posts |
Posted - 07 July 2006 : 04:48:03
|
has anyone had problems with the laying out of this in IE? I am using ie7 beta 3 and I am having width issues in which is spreads the topic wide and in firefox it displays at it should within the borders of the layout of the site. Well not on all topics, topics with more tha one page, example, topic with no additional pages it displays fine: http://www.weeweeslap.com/forum/topic.asp?TOPIC_ID=12651 topics with more than one page it extends out: http://www.weeweeslap.com/forum/topic.asp?TOPIC_ID=12631&whichpage=1
But in firefox both are seen as they should be seen so it can be an IE7 issue. My better question is, does anyone have a topic.asp file with this mod installed. I may have added code in the wrong place as adding the code at the end of the big reply loop added the code in a place where it was not expected so I added it elsewhere and it placed it where it should but the proble mentioned above. If anyone has mor einfo this I'd appreciate it. Thanks.< |
coaster crazy |
|
|
jas168
Starting Member
New Zealand
2 Posts |
Posted - 13 April 2007 : 14:50:56
|
hi can some one give some instrustion where to put the codes... thank you advance< |
|
|
kolucoms6
Average Member
845 Posts |
Posted - 24 May 2007 : 09:12:16
|
Where to insert
if bolShowAdd = true then adsense(CColor) bolShowAdd = false end if
< |
|
|
kolucoms6
Average Member
845 Posts |
Posted - 24 May 2007 : 09:15:05
|
And what is this for :
USA Mountain View< |
|
|
MarkJH
Senior Member
United Kingdom
1722 Posts |
|
kolucoms6
Average Member
845 Posts |
Posted - 24 May 2007 : 12:47:22
|
Ok But Where to insert
if bolShowAdd = true then adsense(CColor) bolShowAdd = false end if < |
|
|
Podge
Support Moderator
Ireland
3775 Posts |
|
Topic |
|