Webcomic Banner RotatorWhile I was part of a webcomic collective, we had an old problem that needed solving:
How do we share traffic amongst each member's comics?
We built and used a banner exchange that was centrally hosted. It simplified things.
- A webhost that allows you to hotlink files
- Several gigabytes of bandwidth (potentially)
ConsiderationsIn our implementation, we took into account factors such as, where the member's comic was hosted, their particular CMS, and their ability to insert a script into a page. As some members were hosted on platforms like Tumblr, Smackjeeves, and Comicfury, we were unable to ask them to embed scripts that executed server-side (so PHP was out).
We did not consider using frames.
We also produced "colors" for the rotators, which allowed members to customize it to match their website's branding.
This script does not work on platforms like Tapas or Webtoon, and as such, we did not allow members to host their comics there.
General DisclaimerI am not responsible for how you use this code, its efficacy, or anything to do with it, should you choose to use it. If you break something on your website (or computer), know that it's not my fault or responsibilty, and I'm not liable for any of that. I cannot and will not offer technical support. (This stuff should not break your computer, though.)
This is made clearer in my Terms of Service.
You are free to modify and use this script as you want. There may be better approaches -- this is just what we developed.
CodeFor simplicity's sake, I'm only including one rotator script. Fields you need to change have been highlighted.
The Rotator (Hosted Centrally)Quick Key
TEXT - This is an optional parameter and can be changed at your leisure.
TEXT - You have to change or replace this.
What Members UsedVersion 1 (White header, for dark themes)
Version 2 (Dark header, for light themes)
Example ResultsYou can change your images up as you want -- For simplicity's sake, make sure your header image and the ad image match in dimensions. Also, to avoid being blocked by adblockers, I advise leaving dimensions OUT of the file and folder names.
If you'd like to see the example file in question, you can view or download it here: Example.js