Skip to content

davec/radiant-ad_banners-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

= Ad Banners

An ad banner extension for Radiant, inspired by the banner_rotator extension
but targeted at a different use case.

Note: This version of the ad_banners extension is compatible with Radiant 0.9.
If you are using Radiant 0.8.x, please pull from the radiant-0.8.1 branch.
If you are using Radiant 0.7.1, please pull from the radiant-0.7.1 branch.

== Installation

This extension relies on the paperclipped extension, so install it first if you
are not already using it:

  git submodule add git://github.com/kbingman/paperclipped.git vendor/extensions/paperclipped

Install the ad_banners extension:

  git submodule add git://github.com/davec/radiant-ad_banners-extension.git vendor/extensions/ad_banners

Note: Substitute `it clone` for `git submodule add` if you do not want to
install the extensions as submodules.

Run the migration and copy the public assets:

  rake radiant:extensions:ad_banners:migrate
  rake radiant:extensions:ad_banners:update

Ad banners can be created and managed from the Ads tab in the admin UI. One or
more ad banners can be displayed on a page using the supplied Radius tag.

To associate an image with an ad banner, you need to have previously added it
to your (paperclipped) assets bucket.

== Example

To display a random ad banner, use

  <r:ad_banner />

Multiple <r:ad_banner/> tags can be placed on a page and each one will generate
the HTML code to display a unique ad banner. If there are more <r:ad_banner/>
tags on a page than there are defined ad banners, the excess <r:ad_banner/>
tags will be ignored (actually, they'll generate an empty string).

A name attribute can also be specified to show a specific ad banner

  <r:ad_banner name="Ad Banner Name" />

When an ad banner is specified by name it is removed from the list of eligible
banners to display with a bare <r:ad_banner/> tag. If, for some reason, you want
to display the same banner multiple times on a page you must use the name
attribute to do so.

== Dependencies

This extension depends on the paperclipped extension and incorporates modified
copies of some of paperclipped's view templates.

About

Display random ad banners in Radiant pages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published