Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Adding adsense to my forum. Don't understand...
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

rgeorgiou
Starting Member

United Kingdom
8 Posts

Posted - 08 January 2006 :  10:42:24  Show Profile  Visit rgeorgiou's Homepage
Hi Snitz,

I'm trying to add adsense to my forum (www.atukv.net then click on forum from the menu). I have read everything that I can find on your support forum but still haven't managed to do it.

I'm not an ASP programmer so don't really understand what's going on. I know I can just paste the code at the top of the page and it works but I heard that this will get me baned by google.. Is that right? Also if I put the code at the top the ads that are shown are always the same. It is obviously not reading the actual posts.

How do I put AdSence on my forum in simple english?

Thanks for your time and help. I really do appreciate it.
Richard Georgiou
richard(at)entity7(dot)com

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 08 January 2006 :  11:06:27  Show Profile  Visit HuwR's Homepage
DOn't post multiple copies of the same question, doing so will just get you ignored.
Go to Top of Page

rgeorgiou
Starting Member

United Kingdom
8 Posts

Posted - 08 January 2006 :  11:31:51  Show Profile  Visit rgeorgiou's Homepage
I've only made one post and this is it... What do you mean?

Best regards
Richard Georgiou
Go to Top of Page

Rasco
Advanced Member

Germany
3192 Posts

Posted - 08 January 2006 :  11:33:51  Show Profile  Send Rasco an ICQ Message
Have you looked at this post?

http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=56746&SearchTerms=google,adsense

German Snitz Forum
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 08 January 2006 :  11:49:23  Show Profile  Send ruirib a Yahoo! Message
quote:
Originally posted by rgeorgiou

I've only made one post and this is it... What do you mean?

Best regards
Richard Georgiou


There are 2 additional posts authored by you, that were located in different forums. Just check the active topics page for the last hour and you will see what HuwR meant.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

rgeorgiou
Starting Member

United Kingdom
8 Posts

Posted - 08 January 2006 :  13:18:11  Show Profile  Visit rgeorgiou's Homepage
Hello,

thanks for the responses. I have read that post yes, I've tried putting that code into my forum code but don't really understand where to put it.

Sorry for posting twice. I'm a web designer and engineer and dont do such things normally however I got caught with some error ecuase of an appostrophie in the subject field. I think this must have been the cause... Sorry!! :-)

Anyway... :-)... I'm trying to put my adsense code onto my forum at www.atukv.net but am worried about getting banned from adsense if I do it incorrectly. I don't want to break (or even bend) any rules.

I know that I can add the code before the ASP code on the default.asp, forum.asp and post.asp pages but this then appears on all the pages which I have been told is against the adsense rules. I then removed the code immediately.

What I suppose I'm really after is a very simple explanation of where I should place the code in what pages.

Obviously I'm quite happy copy and pasting the adsense code but I do need to know where to stick it..

Hope you can help and thanks once again for your time.
Richard Georgiou
richard(at)entity7(dot)com

Edited by - rgeorgiou on 08 January 2006 13:21:39
Go to Top of Page

Helterskelter
Junior Member

United Kingdom
331 Posts

Posted - 08 January 2006 :  14:19:30  Show Profile  Visit Helterskelter's Homepage  Send Helterskelter an ICQ Message
To add to the bottom of every page add the code to the bottom of inc_footer.asp
to place at the top add the code to inc_header.asp

Like html look for the </body> in footer
or in header find the area u want to ad the code to and close asp by %>
add code then start asp <%

Why to sit and have a play it's eaiser then u think.

Helter

Go to Top of Page

rgeorgiou
Starting Member

United Kingdom
8 Posts

Posted - 09 January 2006 :  10:40:22  Show Profile  Visit rgeorgiou's Homepage
Thanks Helterskelter! I've added the google code my the inc_header but now the adsense shows on ALL the pages including the "Thanks for posting" pages which I believe breaks the TOS... Is there a way to choose which pages the code is displayed on easily?

thanks again Helterskelter for your time and expertise!

Richard Georgiou
richard(at)entity7(dot)com
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 09 January 2006 :  13:18:56  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
do the following, this code wa sposted here a while ago, can't seem to find the link.:

if not(Instr(Request.ServerVariables("Path_Info"), "register.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "policy.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pop_profile.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "search.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "login.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "password.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "rules.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "faq.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "post.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "404.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "privateread.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pm_view.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "contact.asp") > 0) then
   GoogleAdOK=TRUE
else
  GoogleAdOK=FALSE
end if
if GoogleAdOK=TRUE then
%>
<center><script type="text/javascript"><!--
google_ad_client = "you client id goes here";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_color_border = "333366";
google_color_bg = "000044";
google_color_link = "FFFFFF";
google_color_url = "CCCCCC";
google_color_text = "CCCCCC";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<%


Add that code to where you want ads displayed, the pages listed above will not display the ads. I have more pages blocked than a typical install would require but ad whatever suits your needs. Enjoy.

coaster crazy
Go to Top of Page

corinaw
Starting Member

USA
22 Posts

Posted - 14 February 2006 :  01:12:35  Show Profile
I used this mod on my forum and it is working, but I have a couple problems I'm hoping someone can help me with.

I've blocked most all of the pages that would violate TOS, except since this is in the header, google ads are also showing up on all the admin pages. is there a way to add a wildcard to the above statement such as admin* to exclude all those pages from displaying ads?

Would it be easier to list the pages to allow ads on instead? Every sample I've seen in this forum formats it by pages to exclude, so I presume this is either a necessity or makes more sense somehow? If it is possible to do this, I assume I just remove the "not" at the beginning of the line, would I change the "and_" to something else too?

Thanks for any assistance
Go to Top of Page

Astralis
Senior Member

USA
1218 Posts

Posted - 14 February 2006 :  01:27:14  Show Profile  Send Astralis a Yahoo! Message
I think it would be easier to just add the pages you want it to appear, perhaps. When I ran Adsense on the message board, I ran it on topic.asp and active.asp. Those were the most popular pages.
Go to Top of Page

corinaw
Starting Member

USA
22 Posts

Posted - 14 February 2006 :  10:48:37  Show Profile
That's why I was thinking it would be easier to specify the pages to include. I do like my current ad location via the footer and header though. Do you know of a way to say something like only include in active.asp, default.asp,forum.asp and topic.asp.

Thank you in advance
Go to Top of Page

corinaw
Starting Member

USA
22 Posts

Posted - 14 February 2006 :  11:14:01  Show Profile
Wow, Now I have a cup of coffee in me and the old brain is working a bit better.

I changed to this code in the header and footer (DUH!) and it works great. Ads will only display in the 4 files below and I don't have to exclude multiple files It should be a little easier for processing too.

'########### start google ads
if not(Instr(Request.ServerVariables("Path_Info"), "default.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "active.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "forum.asp") > 0) and _
not(Instr(Request.ServerVariables("Path_Info"), "topic.asp") > 0) then
GoogleAdOK=FALSE
else
GoogleAdOK=TRUE
end if
if GoogleAdOK=TRUE then
%>
<!--#INCLUDE FILE="inc_google_adunit.asp" -->
<%
end if
'########### end google ads

Go to Top of Page

Astralis
Senior Member

USA
1218 Posts

Posted - 14 February 2006 :  18:33:44  Show Profile  Send Astralis a Yahoo! Message
Thanks for sharing your solution.
Go to Top of Page

metro
Starting Member

Russia
16 Posts

Posted - 13 April 2006 :  18:10:39  Show Profile
Thanks a lot.
The inc_footer.asp ends with

Response.Write " </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"</body>" & vbNewLine & _
"</html>" & vbNewLine

my_Conn.Close
set my_Conn = nothing
%>

If I put my google lines under that starting with
<p align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-843419.......

It all works fine on all pages.

If I insert your code right after
my_Conn.Close
set my_Conn = nothing
%>

It give the error
Active Server Pages error 'ASP 0116'

Missing close of script delimiter
inc_footer.asp, line 91

and line 91 is
<%
end if
'########### end google ads


If I put in a end script --- %>

then if gives the error

Microsoft VBScript compilation error '800a03f8'

Expected 'Sub'

inc_footer.asp, line 92

end if
----^

So I must be missing just a bit of the correct code.

If you would be so kind as the show what is wrong please.

The other thing is the inc_google_adunit.asp

do we make a file with that name and put the google code in it and if so do we need <% and %>

I know there are a lot of people that share the question so appreciate your help.

Best regards
Go to Top of Page

johnvaam
Starting Member

20 Posts

Posted - 26 April 2007 :  12:59:13  Show Profile
Hi all,
This info is very useful, but I've just found out that the Google ad just shows up for 1~2 seconds only before the website was redirected to default.asp/active.asp/topic.asp/forum.asp when we login and logout.

Does it against the AdSense rule/TOS?
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.88 seconds. Powered By: Snitz Forums 2000 Version 3.4.07