AdSense inside page regions
Posted: 22 February 2012 06:03 AM   [ Ignore ]  
Summer Student
Total Posts:  3
Joined  01-31-2012

When I editing and then save page with AdSense block inside like

script type="text/javascript"><!--
google_ad_client "ca-pub-xxxxxxxxxxxxxxx";
google_ad_slot "xxxxxxxxxxxxxxx";
google_ad_width 468;
google_ad_height 60;
//-->
</ script>< script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</ 
script

instead editor save next (I changed some characters)

script type="text/javascript"><!--
google_ad_client "ca-pub-xxxxxxxxxxxxxxx";
google_ad_slot "xxxxxxxxxxxxxxx";
google_ad_width 468;
google_ad_height 60;
//-->
</ script>< script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</ 
script>
ins s_tyle="display:inline-table;border:none;height:60px;margin:0;padding:0;position:relative;visibility:visible;width:468px">
ins id="aswift_0_anchor" s_tyle="display:block;border:none;height:60px;margin:0;padding:0;position:relative;visibility:visible;width:468px">
iframe allowtransparency="true" frameborder="0" height="60" hspace="0" id="aswift_0" marginheight="0" marginwidth="0" name="aswift_0"  
scrolling="no" s_tyle="left:0;position:absolute;top:0;" vspace="0" width="468">
</ 
iframe></ ins></ ins

How to fix it?

Or may be exists any way to include this AdSense block from external file or embedded layout instead of pasting it into region manually everytime?

Profile
 
 
Posted: 23 February 2012 02:23 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRank
Total Posts:  4883
Joined  10-18-2005

Hi Detonator,

You may certainly include that code from an external file using the Mojo Assets tag.

You can include this directly in your layouts as well. Use the Append Content tags in your layout to include your javascript.

You wouldn’t want to paste javascript into a region using the CKEditor, that will result in the trouble you are seeing here.

Cheers!

 Signature 

ExpressionEngine is 2.5 | MojoMotor is 1.2


User Guide | Feature Requests | Bug Tracker | Upgrade Wiki

Profile