# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Can you tell us your URL to look at it? Are you sure you are modifying the right entries.tpl file? The code looks proper to me...
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
I just tried the code you posted, and this works here for me. So my guess is that you are not editing the right file.
Try to replace "++adsense code++" with "!!adsense code!!" and see if that displays in your blog then?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
{if $smarty.foreach.dategroup.first AND $smarty.foreach.outerdategroup.first}
++adsense code++
{/if}
The file is then the right one, sorry for my misuse. I believe it will be printed if each of your entries is on a seperate day. I only tested for entries that were posted the same day.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
This is much harder to solve, as there is no running index currently that you can check. "First" is a hardcoded value, third will not work because of nested loops.
You will need to assign a smarty {counter} value in the innermost loop and then check on that counter variable to see if it contains a "3". This is more advanced, so you will need to consult the Smarty documentation for more details. Or maybe some other helping soul here on the forums can lay it out for you.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Fila did you get this working? I have a working sample that I used to use on my own blog that placed adsense after the first, third and fifth entry, but my entries.tpl was heavily customised for my purposes so posting it here for you to download wouldn't help you, let me know if you want yours changed to do this.
Now that carl mentions it: Did you have a look at the serendipity 'serendipity_event_includeentry' plugin ("Include entry blocks" or something like that). This actually allows you to post/use specific "blocks" after X entries.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/