Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Adsense Widget


Reply

7 Posts   5436 Views

Avatar
Ryan

21 December 2007 at 11:00am Community Member, 11 Posts

Hey.

I have developed an Adsense Widget as part of the Google Highly Open Participation contest.

The Adsense Widget will allow the integration of Google Adsense adverts into your site.

I have got the code to output into the website correctly, but I can't seem to get the advert to appear.

Does anybody know why this is?

Thank You.

Avatar
Sigurd

21 December 2007 at 11:30am Forum Moderator, 628 Posts

( I've asked Will Scott who worked with Google APIs on SilverStripe before, to respond, although given xmas, its reasonable to expect he may be unable to respond )

Perhaps if you put up a live working copy somewhere, you could ask on a google adwords mailing list; is it just some javascript to show the ads?

Avatar
Ryan

21 December 2007 at 12:20pm Community Member, 11 Posts

yes, Its just some Javascript which displays the advert.

Thank you.

Avatar
laktek

21 December 2007 at 3:12pm Google Summer of Code Hacker, 76 Posts

As far as I know, Adsense only displays ads on live sites (which means publicly accessed and approved by Google). Were you testing this on a live site or on your local copy ?

Avatar
Ryan

21 December 2007 at 10:13pm Community Member, 11 Posts

That is probably what it wrong I was testing it locally.

Thank You.

Avatar
Ryan

21 December 2007 at 10:51pm Community Member, 11 Posts

Could someone please try using this widget on a live server.

Thanks.

Avatar
Ryan

21 December 2007 at 11:35pm Community Member, 11 Posts

I have found the problem, since SilverStripe outputs as xml

<?xml version="1.0" encoding="UTF-8"?>

Firefox will treat it as its xml and will not understand the write() function.

I am going to use CDATA to try for a work around, otherwise It will not work in firefox.