Google Adsense Block

Google Adsense Block

by Farooq Mr. -
Number of replies: 14
Have any body google adsense block for moodle.
Average of ratings: -
In reply to Farooq Mr.

Re: Google Adsense Block

by daniel ginerman -
Oh, I'd like to have this issue resolved too! Is it possible to get Google AdSense as a block?
thanx,

daniEl
In reply to daniel ginerman

Re: Google Adsense Block

by N Hansen -
Add an HTML block to your course. In your admin settings for the html editor, temporarily set it to disallow use of the html editor (this keeps the Adsense code from getting mangled). Go to the html block, and paste the Adsense code into it. Now you should have an Adsense block. Don't forget to re-allow use of the html editor again after you are finished.
In reply to N Hansen

Re: Google Adsense Block

by Kim Flintoff -

I've also been struggling with this... I've had some success with making direct edits to SUMMARY data in some parts of my database ...

When it comes to HTML blocs there doesn;t seem to be a SUMMARY field only CONFIGDATA which seems to be an encoded version of the data I enter...  such as

Tzo4OiJzdGRDbGFzcyI6Mjp7czo1OiJ0aXRsZSI7czo2OiJnb29nbGUiO3M6NDoidGV4dCI7czoxNjoiZmFudGFzdGljYWwgZGF0YSI7fQ==

which translates back to the term "fantastical data" that I entered into the HTML editor.

Is there a way of entering the Adsense code directly into the Database? 

BTW - when did all these problems with ADSENSE data start?  I used to have no problems on earlier versions of Moodle to enter it directly into the SOURCE section of the editor and saving before looking at it in WYSIWYG... 

In reply to N Hansen

Re: Google Adsense Block

by Kim Flintoff -
That didn't work for me (turning off the HTML editor) ... I think I ended up getting a server error.  My host has been dabbling with Apache rules lately so they may have upset the applecart...
In reply to Kim Flintoff

Re: Google Adsense Block

by Jan Dierckx -

Do you mean you can't turn off the HTML editor in your user profile? Or do you mean: even with the html editor turned off, the adsense code gets mangled?

In reply to Jan Dierckx

Re: Google Adsense Block

by N Hansen -
I turned it off completely on my site temporarily from the admin control panel, not from my user profile. For some reason I have this feeling that it isn't enough to turn it off in the user profile, but I could be wrong. I didn't actually try it in an HTML block with Adsense code, but with Google search code, which has the same issues, and it worked. I also used it in a resource with the code for Adsense referrals and that worked as well.
In reply to Jan Dierckx

Re: Google Adsense Block

by Kim Flintoff -
I turned off HTML in the Admin panel but still had the Google code disappearing..
In reply to Kim Flintoff

Re: Google Adsense Block

by B. Gültekin Çetiner -

The following shows how I do it. I hope it will be useful.

Step 1. Add HTML Block

Step 2. Modify the Block to put adsense script (Script is for Adwords)

This is the result.

In reply to B. Gültekin Çetiner

Re: Google Adsense Block

by Kim Flintoff -

Hi Gültekin,

I have been entering the data as HTML in the TEXT area... but when I save it disappears.. vanishes...

Thanks for the clever little flash movies but that's exactly what I've been doing...

In reply to Kim Flintoff

Re: Google Adsense Block

by Richard Jones -
Picture of Plugin developers Picture of Testers

Hi Kim

Did you ever get this issue resolved - I have exactly the same problem but can't find a resolution in the forum.

Thanks

Richard

 

In reply to Richard Jones

Re: Google Adsense Block

by Art Lader -

Hi,

I wonder if you have Tidy enabled in your filters. Perhaps this is causing the problem.

Just a guess, of course.

Regards,
Art

Attachment tidy.gif
In reply to B. Gültekin Çetiner

Re: Google Adsense Block

by Vincent Szewczyk -
I have Google adsense ads being displayed in html blocks, however, the ads all have to do with Learning Management Systems or Course Management Systems.

Do you have any suggestions, advice, recommendations, etc regarding where changes need to be made in Moodle that would allow adsense to deliver ads that are relevant to the content of each course?

Thank you.
In reply to N Hansen

Re: Google Adsense Block

by Thiago Oliveira -
This poses another problem for me... I got Adsense and the search to work, but my site is in English and Portuguese and i need the block to change languages when the user selects a different language. I suspect a simple HTML block wouldn't do this. I suspect I have to actually create a Adsense block and have the two different codes for the two different languages?

What do you suggest?