Skip to main content
8 of 10
edited tags; edited title
Brock Adams
  • 13k
  • 5
  • 39
  • 64

OBSOLETE - StackAd - An Easy Way to Display Open-Source Ads on Your Site/Blog

##Note: This page is due for an update but until then you can add StackAd to your site by adding:

<script type='text/javascript'
        src='http://files.quickmediasolutions.com/stackad/stackad.min.js'>
</script>

to the <head> section of your page and sticking the following <div> on the page where you want the ads to appear:

<div class='stackad' data-site='stackoverflow.com'></div>

...where data-site is the parent site of the Stack Exchange site whose ads you want to display.

##Screenshot / Code Snippet

http://stackoverflow.quickmediasolutions.com/images/stackad.png StackAd demo available [here](http://stackoverflow.quickmediasolutions.com/stackad/test.html).

##About

StackAd pulls the answers from this question that have 6 or more upvotes and displays a random ad in the box. The code is provided as a .js file you can embed in your pages. The instructions are here.

###License

As is common with all of my open-source apps, I am going with the MIT license.

###Download

http://stackoverflow.quickmediasolutions.com/stackad/stackad.js <- This file can be hotlinked and has been minified to save bandwidth
http://stackoverflow.quickmediasolutions.com/stackad/stackad-source.js <- This is the source
http://stackoverflow.quickmediasolutions.com/stackad/test.html <- to see a demo
http://stackoverflow.quickmediasolutions.com/stackad/fancy.html <- to see an even better demo

###Platform

The code should work with any JavaScript enabled browser.


##Contact

I can be reached at [email protected]


##Code

The code is written in JavaScript and uses the Soapi.js wrapper for interfacing with the API.

Nathan Osman
  • 23.3k
  • 11
  • 61
  • 107