PDA

View Full Version : Adsense Block Inside the Article


Jbowers
05-03-2006, 10:16 AM
Hello,


I want to put Google Adsense in the article. I guess I have to edit the article_Full.tpl

What I actually want is, the Google Adsense Block will be inside the article, so the site will get more clicks from users. Here is a site example what I'm talking about. Please check the following link,



http://img162.imageshack.us/img162/6568/googleadsensemod9mm.gif



You see in the image, the article contents on left side of the Adsense block, also under the adsense block. I want like this. Not above or below the article rather on right side as like INSIDE the article as shown in the above Image.

So, can you please tell me how can I do this? Instruction to edit the article_Full.tpl will do.

Thank You.

John Bowers

Alex
05-03-2006, 04:31 PM
This is rather easy to do, here's what you need to add to article_Full.tpl:

Just above the {ARTICLE_BODY} tag, place DIV that will hold the AdSense block:

<div style="float:right; padding:5px;"></div>
and inside the DIV, paste the AdSense Javascript code. This will suffice.

Hope this helped :)

Jbowers
05-04-2006, 05:25 PM
Thank you Alex.

Worked Like a Charm.

John Bowers

Elton
05-14-2006, 11:55 AM
John,

Remember that you are allowed 3 ad blocks, plus a link unit ad per page.

I've got one in the article, like you, but also one at the bottom and one in the main templates to the right.

You can see what I mean at www.anglersnet.co.uk i.e. http://www.anglersnet.co.uk/News/Lowrance_iGPS.html

They work well for me, although I do play around with the positioning from time to time.

AzadarNews.com
06-22-2006, 07:34 PM
Hi

What if i want the Google ads to appear in between an article ?

I mean half of article than Google Ads and than the remaining article.

Help is appreciated

thanks

andy77
07-04-2006, 07:10 PM
Not likely. article_Full.tpl has {ARTICLE_BODY} tag (see http://www.word-press.net/doc/templates.html), and you can't break this to have AdSense in between...

themx
12-31-2006, 10:08 PM
John,

Remember that you are allowed 3 ad blocks, plus a link unit ad per page.

I've got one in the article, like you, but also one at the bottom and one in the main templates to the right.

You can see what I mean at www.anglersnet.co.uk i.e. http://www.anglersnet.co.uk/News/Lowrance_iGPS.html

They work well for me, although I do play around with the positioning from time to time.

Hi Elton, how did u put the adsense in the bottom? I'm trying to put the ad between the "For more news click here »" and "More News" like in the Vivvo demo: http://demo.vivvo.net/?theme=default

Also how to put the adsense block in the main template to the right?

Thx in advance

themx
01-05-2007, 11:33 PM
Does anyone know how to do that?

Micha
01-08-2007, 09:07 AM
I'm trying to put the ad between the "For more news click here »" and "More News" like in the Vivvo demo: http://demo.vivvo.net/?theme=default

Go to your templates folder, open index.tpl and somewhere around line 38 (right after </tr> tag) insert this code:

<tr>
<td colspan="3">
Paste your Adsense code here
</td>
</tr>

Also how to put the adsense block in the main template to the right?

If you want the Adsense to be wisible on all pages you need to edit following templates:
index.tpl
article_Full.tpl
category_Main.tpl
framework.tpl

You can put the code right after {BOX_FEATURED_AUTHOR} tag or anywhere inside that <td> and it will be displayed on right side of your site.

themx
01-08-2007, 08:11 PM
Thanks a lot Micha! now the site it's working like I wanted.

Elton
01-09-2007, 09:14 AM
I go the whole hog and do framework_without_right.tpl too :)

You can get it in an article by modifying article_Full.tpl as such:

Look for:

<div class="plainTxt" id="article_body">
{ARTICLE_BODY}

BEFORE THIS, add:

<div style="float:right; padding:2px; margin:2px;">

{your Google code - I use a 250x250 box}

</div>

i.e. Mine looks like this (I've just removed the publisher number and ad channel and replaced them with x's:

<h1>{CAPTION_TITLE}</h1>

<div class="categoryTxt">
<p class="plainTxtGray">{ARTICLE_DATE} {LNG_AUTHOR_BY} {ARTICLE_AUTHOR}</p></div>
<div align="right" class="fontSize">
<a href="javascript:tsz('article_body','10px')"> <img alt='small font' border="0" src="{ROOT}img/font3_icon.gif" /></a>
<a href="javascript:tsz('article_body','12px')"> <img alt='medium font' border="0" src="{ROOT}img/font2_icon.gif" /></a>
<a href="javascript:tsz('article_body','14px')"> <img alt='large font' border="0" src="{ROOT}img/font1_icon.gif" /></a>
</div>
<div style="float:right; padding:2px; margin:2px;">

<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxxxx";
google_ad_width = 250;
google_ad_height = 250;
google_ad_format = "250x250_as";
google_ad_type = "text";
google_ad_channel ="xxxxxxxxxxxxxxx";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "000080";
google_color_url = "000080";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>
<div class="plainTxt" id="article_body">
{ARTICLE_BODY}


It may be slightly different in 3.4, but the principle will be the same. The result will be as in:

http://www.anglersnet.co.uk/News/limpets_move_north.html

kaesar30
05-15-2007, 04:31 PM
Hi,

I want to know if it's possible to prederminate or add a number of votes in articles and polls.

kind regards

pcoskat
06-23-2007, 11:25 PM
This is rather easy to do, here's what you need to add to article_Full.tpl:

Just above the {ARTICLE_BODY} tag, place DIV that will hold the AdSense block:

<div style="float:right; padding:5px;"></div>
and inside the DIV, paste the AdSense Javascript code. This will suffice.

Hope this helped :)

Alex, can ^that^ also be done at the bottom of articles, too? if so, how?(See attached example)

Alex
06-24-2007, 12:50 AM
No way, the snapshot you show displays AdSense within the actual article which is not possible. Wysiwyg editor strips any JS code within it (security reasons) so you can put JS anywhere top/bottom/left/right, but not inside the article.

pcoskat
06-24-2007, 03:18 AM
No way, the snapshot you show displays AdSense within the actual article which is not possible. Wysiwyg editor strips any JS code within it (security reasons) so you can put JS anywhere top/bottom/left/right, but not inside the article.

In the OP,it's 'within' the article, too (in the way that I want it - but at the end.)

For the purpose of the attachment, I didn't include the entire article. Just 'pretend' that where the text ends...that's the last sentence of the entire article.

In other words, don't actually read the body text...just look at the overall picture, and placement of google.

Alex
06-25-2007, 10:55 AM
I get it now :)

OK, then what you want to do is edit article_Full.tpl and put the AdSense anywhere around {ARTICLE_BODY} tag.

tvv
06-28-2007, 06:44 AM
oh, it is good! but can I hide gg ads block on article's print version?

Micha
06-28-2007, 09:34 AM
Of course you can.
There is a print.css file in your templates/css folder.
Now it all depends where did you put your ads, and did you enclosed them inside some block element (<p>, <div>...), you can hide them with display:none; property.

For example if you want your ads before and after article, you can place them inside div, and add them class "ads" :

<div id="article_body">
<img src=some_mage" alt="image" align="left" border="0" />
<div class="ads">ADS</div>
{ARTICLE_BODY}
<div class="ads">ADS</div>
</div>

You can ad following to you print.css file:

#article_body div.ads { display: none;}

That way they wont be visible in printable version.

apocan
07-21-2007, 12:07 AM
whatever I did I couldnt do as in Eltons site. it appears as in the pic. even if I use Eltons code it is same. what s problem?

http://img76.imageshack.us/img76/5076/gpgppgyy2.jpg

pcoskat
07-21-2007, 01:58 AM
Post the code you used...

apocan
07-21-2007, 10:02 AM
<div style="float:right; padding:5px;"><script type="text/javascript"><!--
google_ad_client = "pub-7682711748612928";
google_ad_width = 200;
google_ad_height = 200;
google_ad_format = "200x200_as";
google_ad_type = "text";
//2007-07-21: kare
google_ad_channel = "2574255470";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "CC0000";
google_color_text = "000000";
google_color_url = "008000";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<div class="plainTxt" id="article_body">
{ARTICLE_BODY}&nbsp;

Micha
07-23-2007, 09:50 AM
Place floated div inside article_body div.

The structure should be like this:

<div class="plainTxt" id="article_body">

<div style="float:right; padding:5px;">Ad sense code</div>

{ARTICLE_BODY}

</div>

apocan
07-26-2007, 10:32 AM
thanks Micha. it works now

Big Island
08-30-2007, 06:04 AM
Remember that you are allowed 3 ad blocks, plus a link unit ad per page.


Allowed 3 by google, or by Vivvo?