Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
blith
Client


Joined: Jul 18, 2003
Posts: 977

PostPosted: Thu Oct 14, 2004 10:18 am Reply with quote

I just discovered a really good way to put your googleads in the forums without putting it in the overall_header. What you can do is modify the following three files:

index_body.tpl
viewforum_body.tpl
viewtopic_body.tpl

Open each file and find where the first table ends, marked by
Code:
</table>

then after that put in
Code:
<div style="text-align: center; margin-bottom: 20px; margin-top: 20px;">


***insert your googlead code here****

</div>

Then your googleads will appear in your forums. If you match the colors to the ones on your site they blend right in. You will start seeing ads targeted at what each thread is about... (I hope Embarassed )

Maybe this should be moved as it is not a block. I am sorry.
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Thu Oct 14, 2004 10:53 am Reply with quote

I just place mine in themes.php. Yes, you have to add it to each one but it's just a one time deal.
 
View user's profile Send private message
blith
PostPosted: Thu Oct 14, 2004 11:23 am Reply with quote

I had mine up there also Raven but modifying these three files bring it right down into the forum body. More visual more clicks. Take a look at what I mean. I think it looks good. Only registered users can see links on this board! Get registered or login!
 
SmackDaddy
Involved
Involved


Joined: Jun 02, 2004
Posts: 268
Location: Englewood, OH

PostPosted: Thu Oct 14, 2004 11:44 am Reply with quote

When I tried adding more than one google adsense ad, the subsequent ads were blank.....but I was using the NSN Banner Clients system, so i am not sure if that had something to do with it.......

I might have to consider doing what you did blith....looks good! Mr. Green

_________________
Smack out...
Only registered users can see links on this board! Get registered or login!

Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
jaded
Theme Guru


Joined: Nov 01, 2003
Posts: 1006

PostPosted: Fri Oct 15, 2004 10:58 am Reply with quote

seems to me that this is basicly what i suggested that you do to your forums Smile

_________________
Themes BB Skins Only registered users can see links on this board! Get registered or login!
Graphic Tees Only registered users can see links on this board! Get registered or login!
Paranormal Tees Only registered users can see links on this board! Get registered or login!
Ghost Stories & More Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
blith
PostPosted: Fri Oct 15, 2004 2:02 pm Reply with quote

jaded wrote:
seems to me that this is basicly what i suggested that you do to your forums Smile

Right but it is not on every page and it is further down. Google has a funny thing about having ads on search pages. they do not want to see them there. So this removes them from search results. I know it is not a hard fast rule against forums search pages but who knows. Anyway I like them a little further down like this rather than in the overall_header. I appreciate your help though because it sent me down the right path!! Very Happy
 
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1159
Location: Sanbornton, NH USA

PostPosted: Sat Oct 16, 2004 7:58 am Reply with quote

blith wrote:
I had mine up there also Raven but modifying these three files bring it right down into the forum body. More visual more clicks. Take a look at what I mean. I think it looks good. Only registered users can see links on this board! Get registered or login!


OKay... I give... I don't see any google ads in there anywhere.

_________________
Steph Benoit Only registered users can see links on this board! Get registered or login!
1CMS, 100% Section 508 and W3C XHTML/CSS Compliant (Truly) 
View user's profile Send private message Visit poster's website
Raven
PostPosted: Sat Oct 16, 2004 8:19 am Reply with quote

Right below the menu bar and right above the "Gamers Roam: Forums" title.
 
64bitguy
PostPosted: Sat Oct 16, 2004 8:30 am Reply with quote

I must be blind... The only thing I see anywhere is the amazon top 100 thing in his menu bar... I don't see a google ad here anywhere.
 
Raven
PostPosted: Sat Oct 16, 2004 9:54 am Reply with quote

I don't know. I see it. He'll have to respond.
 
64bitguy
PostPosted: Sat Oct 16, 2004 10:46 am Reply with quote

Oh nevermind.. I figured it out...

I was my windows hosts file blocking ads... As I've really bumped it up.. (A little too good I guess), I don't see ads anywhere anymore...

I removed the google ad blocking settings and I see it fine now.

Smile
 
Vargarv
New Member
New Member


Joined: Nov 16, 2004
Posts: 7

PostPosted: Tue Nov 16, 2004 1:26 am Reply with quote

mmm, I edited the files as you said and only a blank space appears, look:
Only registered users can see links on this board! Get registered or login!

I did it exactly as you said, what can be wrong?
 
View user's profile Send private message
64bitguy
PostPosted: Tue Nov 16, 2004 1:39 am Reply with quote

I see you have the google ads up in there, but before your <head> tag, you have:

Code:
<html><cript type="text/blaffacript" language="blaffacript" src="http://counter.fateback.com/java.php?user=10003"></cript><nocript>

                         <a href="http://counter.fateback.com" target="_blank">
                         <img src="http://counter.fateback.com/webstat.php?user=10003" alt="counter" border="0"/></a></nocript>


You'll want to move that down under the <head> tag. Note... I had to change some of the words so I could post it here (you can't say s-c-r-i-p-t or j-a-v-a-s-c-r-i-p-t here in the forums), but you'll get the gist of what I'm talking about when you look at your source.
 
Vargarv
PostPosted: Tue Nov 16, 2004 1:50 am Reply with quote

er... what file am I supposed to edit?, I can see the code you say when I right click I select properties but I cant seem to find the exact file
 
64bitguy
PostPosted: Tue Nov 16, 2004 2:01 am Reply with quote

It looks like a custom counter of some kind.

I'm assuming the code would be in your header.php file, or your my_header.php file.

I'd start with those.

Make sure that none of the code for that counter stuff appears above the line that says
Code:
    echo "<head>\n";
but rather after it.
 
blith
PostPosted: Tue Nov 16, 2004 8:06 am Reply with quote

Vargarv wrote:
mmm, I edited the files as you said and only a blank space appears, look:
Only registered users can see links on this board! Get registered or login!

I did it exactly as you said, what can be wrong?

It will take a while before the ads start to appear. Also if they are repeats or there is nothing that corresponds with the page material it will not show any ads and you will have a blank space. I still get that from time to time on mine... I just took a look at your site and it seems to be working now...
 
Vargarv
PostPosted: Tue Nov 16, 2004 11:22 am Reply with quote

mmm, I had to remove the google ad from the header.html, then the ads started to appear, maybe because it detected it as a repeated ad, you know where else and how can I add google Ads?, like private messages, etc?, or how do I add it to the downloads page???
 
64bitguy
PostPosted: Tue Nov 16, 2004 12:57 pm Reply with quote

Vargarv - your counter code is still in the wrong place, it needs to be AFTER the <head> command in headers.php. In fact, I suggest that your remove this code completely. PHP-Nuke has a built in counter feature that works with your statistics module. You can also display counter information in other forms like blocks (See Raven's "Site Info" block on the left of your screen). Having this other counter in there just screws up the works.

If you take the google ad code out of all of the other "sections" that you have put it in, and have it only in the header.php file, after the <head> tag, you will produce ads on EVERY page on your site.

Finally, there should be no google code in your header.html file, only your header.php file!
 
Vargarv
PostPosted: Tue Nov 16, 2004 1:54 pm Reply with quote

64bitguy wrote:
Vargarv - your counter code is still in the wrong place, it needs to be AFTER the <head> command in headers.php. In fact, I suggest that your remove this code completely. PHP-Nuke has a built in counter feature that works with your statistics module. You can also display counter information in other forms like blocks (See Raven's "Site Info" block on the left of your screen). Having this other counter in there just screws up the works.

If you take the google ad code out of all of the other "sections" that you have put it in, and have it only in the header.php file, after the <head> tag, you will produce ads on EVERY page on your site.

Finally, there should be no google code in your header.html file, only your header.php file!


Well, That code is not in headers.php and I haven't been able to find it in any other file, also apparently If i put the googlead in header.php It won't have any effect because the theme Im using has a header.html and the changes I do in it actually appear on the site. Do you have any more ideas where can I locate that code?
 
64bitguy
PostPosted: Tue Nov 16, 2004 2:04 pm Reply with quote

Look for the header.php and my_header.php not only in your root directory, but also in your /themes/THEMENAME/ directory.
 
Vargarv
PostPosted: Tue Nov 16, 2004 2:08 pm Reply with quote

There is only header.html in the directory of the theme, no header.php or my_header.php
 
cksoft
New Member
New Member


Joined: Aug 02, 2005
Posts: 1

PostPosted: Tue Aug 02, 2005 4:05 am Reply with quote

How can i remove the reference to "http://counter.fateback.com/java.php?user=11481" from my page.
 
View user's profile Send private message
gstrategic
Hangin' Around


Joined: Aug 15, 2005
Posts: 46

PostPosted: Mon Aug 29, 2005 8:43 pm Reply with quote

Quote:
I just place mine in themes.php. Yes, you have to add it to each one but it's just a one time deal.


What's your exact code for this?

Thanks,
 
View user's profile Send private message
Stang5_0
Hangin' Around


Joined: Oct 17, 2002
Posts: 49
Location: Phoenix, AZ

PostPosted: Mon Feb 13, 2006 2:17 pm Reply with quote

To further clarify, is this the proper method to get the googleads at the top of the forums similar to what we see here on this site? I like it and think it very clean.

I have played with the header files, but the only thing I am able to do is get it to appear on every page. I'd rather it appear in the forums at the top.

Thank You.
Stang
 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Feb 13, 2006 11:29 pm Reply with quote

For the GoogleAds, overall_header.tpl should do it

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©