Welcome! Log In Create A New Profile

Advanced

AdSense

Posted by keverw 
AdSense
March 17, 2008 07:35AM
Hello, can some one tell me a way i can add Google AdSense to my search results pages on the right side.



Edited 1 time(s). Last edit at 03/17/2008 08:40AM by keverw.
Re: AdSense
March 17, 2008 10:54AM
hi, you just have ton insert you code where you want it to appear in your templates files, it's very easy.
Re: AdSense
March 18, 2008 07:04AM
I was playing with the Templates files. I cant get it to line up right.



Edited 1 time(s). Last edit at 03/19/2008 01:20AM by keverw.
Re: AdSense
November 20, 2008 05:32AM
anyone?
Re: AdSense
November 27, 2008 06:13PM
Note;
Be sure to back up your originals before making any changes to your files.

Edit these two files;

search_results.html

categories.html

Open them up either on the server or in notepad.

At the top of the file in search_results.html, just before;

<?php
extract($search_results);
?>

you'll want to place this;

<table width="740" cellpadding="5" cellspacing="2" align="center" bgcolor="#FFFFFF">
<tr><td valign="top">
<tr><td valign="top"><div>

Then, at the bottom of the same file, just after the;

<?php }?>

you'll want to place this;

<div> </div>
</td>

<td width="30%" valign="top">

<table width="100%" cellpadding="5" cellspacing="2">
<tr>
<td bgcolor="#f5f5f5"><center><-- your adwords script goes here --></center> <div id="common_report" align="left">
</div></td>
</tr>
</table>
</td>
</tr>
</table>


In your categories.html file you'll want to do the same thing;

in the top of the file just before;

<?php if ($catid && is_numeric($catid)){?>

you'll want to place this;

<table width="740" cellpadding="5" cellspacing="2" align="center" bgcolor="#FFFFFF">
<tr><td valign="top">
<tr><td valign="top"><div>

Then at the bottom, just after the;

<?php }?>

You'll want to place this;

<div> </div>
</td>

<td width="30%" valign="top">

<table width="100%" cellpadding="5" cellspacing="2">
<tr>
<td bgcolor="#f5f5f5"><center><-- your adwords script goes here --></center> <div id="common_report" align="left">
</div></td>
</tr>
</table>
</td>
</tr>
</table>

------------------------------------

"We usually write to fit most screen resolutions, so you may or may not want to rewrite the table widths, cellspacing and colours"
Re: AdSense
August 02, 2009 06:26AM
This actually works tongue sticking out smiley Nice one!
Re: AdSense
August 11, 2011 08:54PM
from what i have tested out is that you dont need to have both searchresults.php and catagories.php...

What do I mean?

ok first if you only want to show ads on search results page then you dont need to add the catagories page...and vice versa

if you only edit the search results page you will have ads ONLY AFTER the user searches your search engine

If you only edit the catagories page then you will have the ads on the front page...i personally dont like having ads on my front page (atleast until i get some good content and a great layout of for the front page) so i left them out of the catagories page...

I am still doing some testing with this feature im going to work on getting it more set into the actual layout so that the layout dont have an "off" look... meaning that it dont exactly fit right with the way that i like!!

this will take me a while because i am also working on other little features as well tongue sticking out smiley


im going to stop babbeling and get back to work...thank you for the code tongue sticking out smiley
Sorry, only registered users may post in this forum.

Click here to login