The Forum has been Updated
        The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
    
                        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
 
at the beginning of the file declare one variable.
At the end of the big reply loop
bevor the next insert this.
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
<
                            
                    
                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
Code:
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.
Code:
bolShowAdd = true
At the end of the big reply loop
bevor the next insert this.
Code:
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