I would say inside of topics or in between replies on a forum topic, but it might cause some of your members to leave since ads inside of forum topics and mix with content can be annoying.
Placing ads and affiliate links on the top, bottum, left, right on forum might also work better.
This depends on the website. For example, I'm sure the quick reply at FP is used quite a lot, so having ads where the featured forums is, may be a good place to put ads.
The banner ad at the top (Frog Host) is a great place to put an ad, as the header is used to go back to the home page.
Analysing your website's impressions for certain areas is vital and can be done with Google Analytics site overlay.