OK, I'm doing it this way because I'm not a PHP guru... I'm doing it in a way I can understand.
So what I've done now is in the 'manage ads' area of the ACP, i've enabled a 'last post only' ad-spot.
While testing, it shows only to admins (once it goes live, i'll change this to show only to guests instead).
The content of this ad-code is:
Code:
<style type="text/css">
<!--
#adspot {
width: 358px;
height: 268px;
border: none;
}
-->
</style>
<table style="text-align: left; width: 100%;" border="0" cellpadding="4"
cellspacing="4">
<tbody>
<tr align="center">
<td style="vertical-align: middle; text-align: center;">
<!-- GAMETAP // UNDER 'PLAY ARCADE GAMES HERE' FORUM-->
<vb:if condition="$GLOBALS['forumid'] == 63 OR $GLOBALS['forumid'] == 54 OR $GLOBALS['forumid'] == 56">
<iframe src="/ads/gaming/rotate.php" frameborder="0" align="center" name="adspot" id="adspot" marginheight="0"><p>Your browser does not support iframes.</p></iframe>
</vb:if>
<!-- CHRISTIAN STORE random sizes // UNDER 'Religion & spirituality' FORUM-->
<vb:if condition="$GLOBALS['forumid'] == 3">
<iframe src="/ads/religion/rotate.php" frameborder="0" align="center" name="adspot" id="adspot" marginheight="0"><p>Your browser does not support iframes.</p></iframe>
</vb:if>
<!-- MUSIC STORE random sizes // UNDER 'music' FORUM-->
<vb:if condition="$GLOBALS['forumid'] == 52">
<iframe src="/ads/music/rotate.php" frameborder="0" align="center" name="adspot" id="adspot" marginheight="0"><p>Your browser does not support iframes.</p></iframe>
</vb:if>
<!-- SPORTS STORE random sizes // UNDER 'sports' FORUM-->
<vb:if condition="$GLOBALS['forumid'] == 55">
<iframe src="/ads/sports/rotate.php" frameborder="0" align="center" name="adspot" id="adspot" marginheight="0"><p>Your browser does not support iframes.</p></iframe>
</vb:if>
</td>
</tr>
<tr align="center">
<td style="vertical-align: top;"><small><small><span
style="font-weight: bold;">Please <a href="/register.php" target="_parent">register</a> or sign in to remove these
advertisements.</span></small></small><br>
</td>
</tr>
</tbody>
</table>
In each directory is a series of text files with affiliate codes and the rotator picks a random file each time a viewer reads a thread.
I'm sure I could somehow move the /rotate.php file into the parent directory and have it refer to different sub-directories according to what forumID is being viewed... I have no doubt that can be done.
But - I don't know how to. So I'm trying to keep things simple for myself.