Hello all mates!

I am working with my forum trying to properly edit the html for the posts so that they will display any custom script/html of my choice. I want this to appear in ONLY the first post in every thread. I am also trying to find out how to make a bot that automatically posts another second post in every thread, with my own custom scripts/html. At the moment I am trying to add some adsense ads this way.

What I am looking for is two things:

1 - How to get the adsense ad aligned to either right or left of the text within the first post.
2 - How to get an adsense bot autopost an ad as post number 2 in any thread (including being applied to all threads already existing)

I am using IPB3. I previously used Adsense Bot for IPB2, and that worked fine, but it is not supported for IPB3. It uses the Universal Mod Installer, and in IPB3 there is a new "hook" feature to ass custom mods etc, but I do not know how to alter the code for the Adsense Bot to work with IPB3 so I am trying to get it done from scratch by adding codes directly into the templates. If anyone know how to configure / modify the old Adsense Bot to work with IPB3 that would be great of course, so I am attaching it here just in case someone wants to take a look at it and its documentation and scripts.

But primarily I am looking for the two mentioned features, one is how to get the script running in ONLY the first post of every thread - at the moment I got it running, but it is global and implements into all posts not only the first.

I also have figured out how to make a script appear, such as an ad, between posts, but not after ONLY the first post, nor how to make a bot that posts a post just like any member, which is what I am really looking for when it comes to that part.

This is the code I have entered into the topicViewTemplate in Topic View:

Code:
{parse template="aip" group="topic" params="$post"}

<div style="display:block;float:right;margin: 0px 10px 0px 0px;">

<script type="text/javascript"><!--
google_ad_client = "pub-3737464431076938";
/* forum posts large recnt */
google_ad_slot = "6548059149";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>
This works perfectly for adding my desired custom script embedded within the posts. The problem is that it gets embedded in ALL posts and not only the first as I would want. Here is a link to my forum for an example on how it looks:
http://www.conspiraciesforums.com/fo...ic/3-atlantis/

I know I have to edit/add some code regarding post counts etc to configure it to only affect the first post - my question is how to do that?

And as seen, the second post shows the ad as well, here I would want a bot to post a post containing another ad - between the first and third post of every thread (which will be standard members posts).

I have messed my brain with this for more than a week now trying different things, looking around at forums, googling, trying scripts and so on, mods etc, but as of yet have not found the solution to these things for IPB3.

Any help here would be extremely greatly appreciated and I'll buy you a beer if you're ever around my part of the world!

Thanks and bless you!

-M