1 tejaaa Nov 28, 2005 06:01
3 tejaaa Dec 19, 2005 12:49
Thanks for your help, that does help. Well appreciated.
So we know it's can be done easily. I wonder if someone can tweak this code to include ads after two posts on the blog?
Tejaaa
4 yabba Dec 19, 2005 13:10
At the top of your skin put :-
$show_advert = 0;
Then change the code to :-
$show_advert++;
if ( $show_advert == 2 ) {
// code to display google ads
}
¥
5 tejaaa Dec 19, 2005 23:53
¥åßßå, thanks for your help. Although would you please be able to write complete code with brackets and braces. I am no developer and so cannot figure out what is right and what is wrong. I have added "$show_advert = 0; " just below <head> section and the rest of the code is as belows and it does not seem to show the ads. Can you please comment?
<?php
if ( $show_advert == 2 )
{
?>
*Google Ads Script*
<?php
$show_advert++;
}
}
Regards,
Tejaaa
6 yabba Dec 20, 2005 01:21
Hi Tejaaa,
Based on the code you posted, the only mistake you have is that $show_advert++; is within the braces, it should read more like this
$show_advert++;
if ($show_advert == 2 ) {
// google ads stuff here
}
¥
7 tejaaa Dec 20, 2005 02:38
Thanks mate, please check your PM.
tejaaa
I had been wondering about this too, and I asked a friend, and he came up with this:
Before the
line in your skin's _main.php, put the following:
The ads will show up between the first and second posts. For an example of what it looks like, see my blog at http://blog.giantpachinkomachineofdoom.com/
fyi, I used 3 of their 300x250 ad blocks in a row (More ads, and doesn't break resizing.)
I really know nothing about this stuff, but that's what's in my file...so if it doesn't work, I'm not in much of a position to help... ^^;
I'm just totally floored that I have information to offer ;P