Loading...
 
Skip to main content

Features / Usability


You are viewing a reply to Give Me Adsense or Give Me Death-

Adsense code in a seperate .tpl file

> Could someone please tell me EXACTLY how to get Google Adsense to work? I installed Tiki's module. It displayed an error about not having the account number. I added this (with the real account number) to parameters:
>
> client=pub-xxxxxxxxxxxxxxxx,display=160*600_as
>
> but then it posts this error:
>
> Display type unknown, you have to enter the banner type
>
> Does Adsense require certain Tiki settings for rows or cache or any other setting? If so, what are they?

No, I don't think so. The adsense module code seems to be buggy. I tried the module several months ago and it worked OK, but maybe something changed either with Google's script or how Tiki and/or the module handles it, but in any case I'm getting the same error message as you. I double-checked the module's files and don't see any obvious problems.

> If Tiki doesn't support Adsense, I would have chosen a different wiki but I don't see why this should be so difficult.

You can use Adsense with Tiki, by making a new template file rather than using a module. See this pageQuestion (make sure the theme is "Tikipedia" — right now the Adsense module is only called from that theme's tiki.tpl file. BTW, this theme will soon be available at themes.tw.oQuestion). Both the "toolbox" at the top of the left column and the Google ads box at the bottom are not actual modules but rather are separate template files with module display code details providing the look and functionality. templates/styles/tikipedia/tiki.tpl is modified with {include file="zukakakina_adsense.tpl"}, for example, added.

The adsense .tpl file is the Google javascript that normally is directly added to your web page, with lines from a module .php file at top and bottom to style it.

I'll do a tutorial page on this if the Adsense module is generally not working and people want a (slightly more complicated) alternative, until problems with the module are worked out. The advantage of this template method over the iframe method is that the ad is actually part of the page it appears in and will reflect its content in ad selection.

-- Gary - zukakakina.comQuestion

Do we have any progress on either method?

Thanks!