From the rules:
24. Advertisements (including signatures within the post area) in posts aren't allowed unless the post is in a thread you started and is really substantial and useful.
I thought this needed custom permission from Admin:
~did you get permission from theymos to advertise there as you need to get the go-ahead from an admin to do that and it's rarely granted?
I do think hilariousandco's interpretation is better than the one in the official unofficial rules.
Here is the actual rule:
[...]
Ads are typically not allowed in posts (outside of the signature area) because they are annoying and off-topic. It is especially disallowed to put ads or signatures at the bottom of all of your posts. Except for traditional valedictions, which are tolerated but discouraged, signatures are for the signature area only.
However, if you are using the forum as a publishing platform to host something really substantial and useful, selling ads in that substantial work is allowed. To be eligible for this, your post must be in a topic that you started, and your post must be substantial and long enough to make the ad seem entirely insignificant. If in doubt, ask me.