TODO
- Need to modify find method to include the specified page for each ad and only pull ads assigned to that page
- Allows you to create Ad Sets in Radiant and randomly display on a page.
- Banner naming
- Assign Ad Set to a page
- Providing a click-through url
- Upload Ad Banners to the Ad Set complete with drag-and-drop order sorting.
- Included is index.rxml to provide an xml feed of all banner data in the database if you need it, or individual banners using image.rxml
Imagemagick
http://www.imagemagick.org/script/index.php
Gems/Plugins
Paperclip, http://github.com/thoughtbot/paperclip/tree/master
Rmagick, http://rmagick.rubyforge.org
Place the banner extension in vendor/extensions/
git://github.com/scullygroup/radiant-banner.git vendor/extensions/banners
Run the migration of the Banner extension
rake radiant:extensions:banners:migrate
rake radiant:extensions:banners:update
Be sure to vendor Paperclip in environment.rb
config.gem 'thoughtbot-paperclip',
:lib => 'paperclip',
:source => 'http://gems.github.com'
By default, the tool picks an Ad Set and their associated Ad Banners at random, based on the page assigned.
There are 2 choices for displaying an Ad Set: Static Ad Banners, or Ad Banners rotated in a Flash Slideshow.
Please note that portions of this code may be cutoff in by the GitHub parser. Please read the README file for complete info.
To insert a static Ad Set on a page, use radius tags like so:
<r:banners:each [placement="header || sidebar"]> <r:ads:each> <r:ad />
This will randomly pick an assigned Ad Set and display the Ad Banner with it’s associated URL.
The iteration through each tag may seem verbose, but this allows you to access all attributes within the Banner and BannerImage models if you would like to display them on the page.
To insert a Flash Slideshow rotation of the Ad Banners use this simple radius tag:
<r:slideshow [placement="header || sidebar"] />
This will randomly pick an assigned Ad Set and will display ALL the Ad Banners in that set with the associated URL for each in a dissolving Flash slideshow.
NOTE:
The placement attribute is required and declares if the banner placed should be a header (wide) banner or a sidebar (skyscraper) banner.
See the tags file banner_tags.rb
in the app/models directory to customize.
Copyright © 2009 Scully Group, released under the MIT License