Extension:CentralNotice/Banner mixins (deprecated)

A banner mixin is a piece of supporting javascript, stylesheets, or PHP which can be reused by many banners. At the moment, there are three ways the banner and mixin can be integrated:


 * Preload rule : a javascript snippet that is executed to determine whether to continue loading the banner.
 * Calculated variables : PHP functions which return a value for "" . These functions can take arguments, given like "".
 * JS and CSS : a bundle of code loaded using MediaWiki's Resource Loader.

An example of each would be, respectively: banner diet; daily and cumulative amount thermometer; and dropdown donation form logic. A single mixin may use all three methods.

When HTML is reused in many banners, it is a good candidate to convert into a template. Templates use a double-curly brace syntax for variables, and if a default is provided, the variable is optional. For example, "price of a ". For other reused resources, consider creating a new banner mixin. Mixins are deployed along with CentralNotice source code&mdash;since they can affect many banners, we publish new changes in a controlled fashion. Since source deployments are a rather large hammer to swat flies with, it is important that mixins can be overriden where this would make sense.