You mean MediaWiki? I'm pretty sure there's text modifiable (the one that says "From <site>"). There must be a way to insert PHP. For the moment you could allow <script />s, put the JavaScript ad on a page (let's say "Advertising"), and transclude it using
. Be sure to turn off IP editing or they're going to put malicious scripts on your site.