2017 © Pedro Peláez
 

silverstripe-module silverstripe-advertisements

image

nyeholt/silverstripe-advertisements

  • Tuesday, July 31, 2018
  • by nyeholt
  • Repository
  • 1 Watchers
  • 12 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 16 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

SilverStripe Advertisement Management module

A simple module to manage advertisements on pages., (*1)

Maintainer Contact

Marcus Nyeholt, (*2)

, (*3)

Requirements

SilverStripe 3.1.x, (*4)

Documentation

Add, (*5)

Page:
  extensions:
    - AdvertisementExtension
SiteConfig:
  extensions:
    - AdvertisementExtension

to your project's configuration yml file., (*6)

Note that ads are inherited hierarchically, so setting ads on the Site Config will mean those ads are used across all pages unless specified for a content tree otherwise., (*7)

  • Navigate to the "Ads" section
  • Create some Advertisements
  • If you want to group the ads in a collection, create an Ad Campaign. These in turn can be associated with a client.
  • On the Advertisements tab of a page (or Site Config), you can select the individual ads (or campaign) to be displayed.
  • In your page template, use the AdList collection to actually list out the Ads to be displayed. Use the "Me" or "SetRatioSize" helpers to output an image linked as needed for proper click tracking., (*8)

    , (*9)

    $Me $SetRatioSize(120,80)

    , (*10)

  • You can have complete control over how things are output by referring to the ad's Image and Link accessors. Be aware that if you're going to manually output the link, to include a special attribute used if tracking ad views (eg Advertisement::$use_js_tracking = true). So, output something like, (*11)

<a href="$Link" class="adlink" adid="$ID"><img src="$Image.Link" /></a>
  • Reference an ad directly from a template via
$findAd(Title)

Check the Advertisement class for more., (*12)

TODO

Add extension method and include for doing a rotating ad banner across all pages. You can do these manually for now via Page_Controller if you want. Just select all Ads and iterate the collection, (*13)

The Versions

31/07 2018

dev-ss24

dev-ss24

  Sources   Download

10/02 2017

dev-feature-js-inserted

dev-feature-js-inserted https://github.com/nyeholt/silverstripe-advertisements

A simple mechanism for implementing tracked advertisements

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe advertisements ad campaign

16/02 2016

dev-master

9999999-dev https://github.com/nyeholt/silverstripe-advertisements

A simple mechanism for implementing tracked advertisements

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe advertisements ad campaign