It is a more attractive and less disruptive solution for adding text based ads.
I made slight alteration as I wanted the ads only shown to people not registered, ie. visitors
instead of this in your first line of new code:
if($i == 1)
if($i == 1 && $user->data['user_id'] == ANONYMOUS)
Next task, after reviewing performance, is to add another ad block, eg, after 10 posts and I hope to use the existing function to also place this. Any ideas how to modify?