Author |
Topic  |
rgeorgiou
Starting Member
United Kingdom
8 Posts |
Posted - 08 January 2006 : 10:42:24
|
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
|
DOn't post multiple copies of the same question, doing so will just get you ignored. |
 |
|
rgeorgiou
Starting Member
United Kingdom
8 Posts |
Posted - 08 January 2006 : 11:31:51
|
I've only made one post and this is it... What do you mean?
Best regards Richard Georgiou |
 |
|
Rasco
Advanced Member
    
Germany
3192 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 08 January 2006 : 11:49:23
|
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 |
 |
|
rgeorgiou
Starting Member
United Kingdom
8 Posts |
Posted - 08 January 2006 : 13:18:11
|
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 |
 |
|
Helterskelter
Junior Member
 
United Kingdom
331 Posts |
Posted - 08 January 2006 : 14:19:30
|
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 |
 |
 |
|
rgeorgiou
Starting Member
United Kingdom
8 Posts |
Posted - 09 January 2006 : 10:40:22
|
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 |
 |
|
weeweeslap
Senior Member
   
USA
1077 Posts |
Posted - 09 January 2006 : 13:18:56
|
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 |
 |
|
corinaw
Starting Member
USA
22 Posts |
Posted - 14 February 2006 : 01:12:35
|
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
|
 |
|
Astralis
Senior Member
   
USA
1218 Posts |
Posted - 14 February 2006 : 01:27:14
|
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. |
 |
|
corinaw
Starting Member
USA
22 Posts |
Posted - 14 February 2006 : 10:48:37
|
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 |
 |
|
corinaw
Starting Member
USA
22 Posts |
Posted - 14 February 2006 : 11:14:01
|
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
|
 |
|
Astralis
Senior Member
   
USA
1218 Posts |
Posted - 14 February 2006 : 18:33:44
|
Thanks for sharing your solution. |
 |
|
metro
Starting Member
Russia
16 Posts |
Posted - 13 April 2006 : 18:10:39
|
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 |
 |
|
johnvaam
Starting Member
20 Posts |
Posted - 26 April 2007 : 12:59:13
|
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? |
 |
|
Topic  |
|