Subrion CMS Support Forums   Follow Subrion on Twitter Join Us on Facebook

Go Back   Subrion CMS Support Forums > Subrion CMS Core Discussion > Subrion Core Discussion

Subrion Core Discussion Here we discuss everything that is related to Subrion CMS core functionality. Additional features related to plugins and templates engines. New features that are related to Manage Pages functionality or anything that's not related to Subrion packages.

Reply

 

LinkBack Thread Tools Display Modes
Old 01-10-2008   #1 (permalink)
Junior Member
 
Join Date: Jan 2008
Location: Californis, USA
Posts: 8
Moyougi is on a distinguished road
Send a message via AIM to Moyougi
Default How to create an adsense block within each article

Guys, Here is a perfect way to add AdSense into your Articles.

(MAKE A BACK UP COPY of view-article.tpl)

!) Open view-article.tpl and find
>>>>>>>>>>>>>>>>>>>>>>>>>>>

<div id="notification" class="notification"
{if $msg eq ''}style="display:none;">{else}>{$msg}{/if}</div> (((About LINE 59 )))))

>>>>>>>>>>>>>>>>>>

INSERT THIS CODE on the next line >>>>>>>>>>>

<div style="float: right; padding: 0px; margin: 0px; border-width: 1px 1px 1px 1px; border-style: solid; border-color: white; background-color: white">
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxx";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel ="xxxxxxxxxx";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "883300";
google_color_text = "000000";
google_color_url = "883300";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>

>>>>>>>>>>>>>>>>>>>>>>>>>>

Next DELETE Everything in RED Below >>>>>>>>>>>>>

<div>
<div class="no_overflow">
<div style="margin: 10px 0;">

{$article.description}
{$pagination}
</div>
</div>


>>>>>>>>>>>>>>>>>>>>>

Thats It! Of course you need to fix the AdSense code. I am using a modified Default template with a two (2) column layout so you may have to adjust to a smaller Advertisement Size.

Here is my [url="http://www.bonsailibrary.com/articles/Bonsai-Tools/bonsai-tools-choosing-the-right-bonsai-tools-3.htm[/URL] where the code is working on all articles. (actually only two articles loaded right now, both in the Bonsai Tools category) Feel free to CLICK any Ads

If you have any problems let me know, maybe I can help.
Moyougi is offline   Reply With Quote
Old 01-10-2008   #2 (permalink)
Junior Member
 
Join Date: Jan 2008
Location: Californis, USA
Posts: 8
Moyougi is on a distinguished road
Send a message via AIM to Moyougi
Default Re: How to create an adsense block within each article

I stand corrected! It does not show in IE. The source code shows it there but it doesn't display. Fortunately it also doesn't stop anything else from displaying either.

Any input here Sergey?
Moyougi is offline   Reply With Quote
Old 01-10-2008   #3 (permalink)
Subrion Tech Support
 
Join Date: Apr 2007
Posts: 644
Sergey Hmelevsky will become famous soon enough
Default Re: How to create an adsense block within each article

Yeah, it's IE's bug with floating elements. It was fixed in IE7. How to get worked on IE6:

>>>>>>>>>>>>>>>>>>>>>
<div style="position:relative;float: right; padding: 0px; margin: 0px; border-width: 1px 1px 1px 1px; border-style: solid; border-color: white; background-color: white">
<script type="text/javascript"><!--
google code here
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
>>>>>>>>>>>>>>>>>>>>>

I've take a liberty to fix your view-article.tpl file, Michael.
__________________
With private requests send a ticket on http://www.subrion.com/desk/
Sergey Hmelevsky is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
How to create an adsense block within each article? baramister Subrion Core Discussion 3 06-25-2007 10:30 PM
How do i Create block ? sparsh Subrion Core Discussion 3 06-07-2007 03:49 AM
create-article.php - FIXED redeye Subrion Core Discussion 1 04-17-2007 01:36 PM


All times are GMT -6. The time now is 02:20 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0