Forums | Mahara Community

Developers /
Google Adsense


Andi Becker's profile picture
Posts: 38

07 March 2010, 12:43 AM

Hi

 

How can google adsense code be integrated in to views! We tried to insert it into a text element but this isn't working.

We can insert the code but but nothing is showing up!

 Andi 

Penny Leach's profile picture
Posts: 228

15 March 2010, 4:36 PM

Hi Andi,

You probably need to write a text filter to let the javascript through. Have a look in lib/htmlpurifiercustom/ for examples of what to do, but basically you need to process out all the javascript into a small string that won't get stripped by the purifier, and then process it back in afterwards.  You'll need to add it to that xml file there too.

2 results