Elxis CMS Forum

Support => General => Topic started by: ahmet on April 23, 2011, 21:28:38

Title: HOW TO PUT GOOGLE ADDSENSE CODE..[SOLVED]
Post by: ahmet on April 23, 2011, 21:28:38
Hello,
I put adsense code in a module clean the necerrary parts.and published it..
It was workind since i changed the module position..
nthg(excep module) seems on my website....
is there another way to put it???
tnx,
Title: Re: HOW TO PUT GOOGLE ADDSENSE CODE..
Post by: ks-net on April 23, 2011, 23:32:21
http://wiki.elxis.org/wiki/Google_AdSense_custom_module

also i think ..if i remembered well .. that there is module to display adsence adds but iam not sure ..have you searched EDC?
Title: Re: HOW TO PUT GOOGLE ADDSENSE CODE..
Post by: ahmet on April 25, 2011, 10:10:01
i was exactly using like that..
now it doesnt work....
in edc i couldnt find anything...
Title: Re: HOW TO PUT GOOGLE ADDSENSE CODE..
Post by: ks-net on April 25, 2011, 11:00:35
your page's html code   contenting the proper code?
did you checked page source... is the  adsense code there?

***
the new position exists in the tpl?
Title: Re: HOW TO PUT GOOGLE ADDSENSE CODE..
Post by: ahmet on April 25, 2011, 11:23:22
this is the html code.

<div class="moduletable">
<p><!--
google_ad_client = "ca-pub-3357464869196144";
/* addsense yatay 728 */
google_ad_slot = "9704982295";
google_ad_width = 728;
google_ad_height = 90;
// --></p></div>
<div class="moduletable">
TPL?
Title: Re: HOW TO PUT GOOGLE ADDSENSE CODE..
Post by: datahell on April 25, 2011, 11:44:03
The best way to insert external javascripts is the index.php file of your template (example: template/okto/index.php).
I advise you to open that file and copy-paste the source code google provided you with to the place you want.
Title: Re: HOW TO PUT GOOGLE ADDSENSE CODE..
Post by: ks-net on April 25, 2011, 13:25:08
yes you can open your index.php and add what ever you want...absolutely better and faster... if you have some  basic knowledge on html!

tpl => stands for template

Quote
<div class="moduletable">
<p><!--
google_ad_client = "ca-pub-3357464869196144";
/* addsense yatay 728 */
google_ad_slot = "9704982295";
google_ad_width = 728;
google_ad_height = 90;
// --></p></div>
<div class="moduletable">
TPL?

this is wrong

correct should be
Quote
<script type="text/javascript">
<!--
google_ad_client = "ca-pub-3357464869196144";
/* addsense yatay 728 */
google_ad_slot = "9704982295";
google_ad_width = 728;
google_ad_height = 90;
// -->
</script>

i think that in tinymce bot the "script" element is forbidden.... and thats why it is cleaned from the code
i say details in wiki... did you read it carefully?

 
Title: Re: HOW TO PUT GOOGLE ADDSENSE CODE..
Post by: xmanhattan on April 25, 2011, 15:06:06
Easiest way I found was to
turn off tinymce
then create a module with the code
then turn on tinymce

Title: Re: HOW TO PUT GOOGLE ADDSENSE CODE..
Post by: datahell on April 25, 2011, 15:13:32
It is not good to insert javascript inside the content items or modules text area. Prefer editing the template.
Title: Re: HOW TO PUT GOOGLE ADDSENSE CODE..
Post by: ahmet on April 25, 2011, 18:55:00
Easiest way I found was to
turn off tinymce
then create a module with the code
then turn on tinymce


it was the way i was using..but its not always working....pardon when i cleaned the cache it works....
Where to put the code in php.index ?
is there any tutorial or link?
tnx..
Title: Re: HOW TO PUT GOOGLE ADDSENSE CODE..
Post by: datahell on April 25, 2011, 21:03:45
The process is easy, you dont need any tutorial.

Download (via FTP) your template's index.php file and open it with a text editor such as pspad (http://www.pspad.com/).
For your site for example you should edit this file: templates/philoxenia/index.php

Copy-paste the code google gave you to the exact place in index.php file you want it to be displayed.
Save the file and upload it in your site via FTP overwriting the old one.
Title: Re: HOW TO PUT GOOGLE ADDSENSE CODE..
Post by: ahmet on April 25, 2011, 21:38:46
thank you datahell,
u understood where i am trying to put the google code... main index.php...
ok i got it..
thanks......