PDA

View Full Version : adsense problem


Mick
01-01-2006, 08:47 PM
right i have made a new template and added it in the templates part of your system :)

template = GAB_custum_ebay_store

now i added a new block in the master script section and choosed the template above

then went to my postbit template added the code $GAB_ads[0]

but i get nothing :(

also how can you link an add block to a catogorie ???, i must be stupid but i think this is a complex hack and maybe i need some help here ??

Regards
Mick

Mick
01-01-2006, 09:36 PM
found out that it will display ok when placed in the header template but not in the postbit template ???

im using the master adblock it should work i think ?

The Geek
01-02-2006, 12:09 AM
Thats because the $GAB_ads variable is out of scope when the postbit is getting processed.

What you will want to do is create a hook in the postbit_process_start. The only code you will need is

global $GAB_ads;

HTH's

Mick
01-02-2006, 12:21 AM
Thats because the $GAB_ads variable is out of scope when the postbit is getting processed.

What you will want to do is create a hook in the postbit_process_start. The only code you will need is

global $GAB_ads;

HTH's

thanks for the reply how do i go about doing that i dont know anything about hooks :(

and also can i use an add block with a catogorie so i can display add blocks to certain forums ?

thanks very much for the help

Mick
01-02-2006, 06:50 PM
ok managed to work the plugin ;)

but still any chance of having blocks associated with catogories i mean i can use conditionals but that means alot more coding per template.

Regards
Mick

The Geek
01-03-2006, 06:35 AM
Hey Mick, Im not totally following what you mean by category association?

Mick
01-06-2006, 10:03 PM
ok what i mean is this

lets say you have a banner you can then associate a banner to a catogorie and the select which forums it will show in etc

it would be a great asset to your program to associate the add blocks with catogories aswell it would save me alot of time adding conditionals to show the adds in what forums

hopefully that makes sense :)

The Geek
01-06-2006, 10:16 PM
Not totally :)

If I get you right, you are wanting to show ads from category A in forums x,y,z and ads from category B in forums t,u,v
As long as they use the same type of block, then it should be fine. Unless of course they use different types of blocks :D

Mick
01-08-2006, 11:50 AM
right i have one adsense block and another ebay block

now if i was to have a banner i could set the banner to a catogorie that i have made and choose what forums they are viewable in!

i cant do anything like this with the add blocks all i can do is make an add block and then use conditionals to show it in each forums etc

add blocks should be able to use the catogorie system aswell as banners

that should make sense if not i will draw you a picture :)

The Geek
01-09-2006, 10:24 AM
Think I got you now :)

Currently, there isnt a way - however next update should have one :)