2017 © Pedro Peláez
 

silverstripe-module silverstripe-infoboxes

Conditional CMS info boxes.

image

stnvh/silverstripe-infoboxes

Conditional CMS info boxes.

  • Friday, December 5, 2014
  • by stnvh
  • Repository
  • 2 Watchers
  • 9 Stars
  • 1,763 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 4 Open issues
  • 12 Versions
  • 1 % Grown

The README.md

Silverstripe Info Boxes

Build Status Latest Stable Version License, (*1)

Conditional CMS info boxes., (*2)

Info Boxes, (*3)

By Stan Hutcheon - Bigfork Ltd, (*4)

Installation:

Composer:

composer require stnvh/silverstripe-infoboxes ~1

Download:

Clone this repo into a folder called infoboxes in your silverstripe installation folder., (*5)

Usage:

It currently has 5 built in checks:, (*6)

  • Dev mode
  • Favicon existance
  • Google analytics code
  • Default password
  • if www is used

To add a check, create a file in /mysite/code/ called InfoBox_[your_check_name].php with the following functions:, (*7)

example:, (*8)

<?php

class InfoBox_example implements InfoBox {

    public function show() {
        return Director::isLive(); // Our conditional code, this can be anything as long as it returns true or false
    }

    public function message() {
        return 'Live Mode'; // Message to be displayed
    }

    public function severity() {
        return 2; // 0 = severe, 1 = warning, 2 = info
    }

    public function link() {
        // Can be any internal or external URL, or false if none
        return 'http://doc.silverstripe.org/framework/en/topics/debugging/#environment-types';
    }

}

You can now programmatically disable specific checks via the config API. Either via config.yml:, (*9)

InfoBoxes:
  disabled:
    - example
    - dev
    - www

or via _config.php:, (*10)

<?php

InfoBoxes::set_disabled('example');
// or
InfoBoxes::set_disabled(array('www', 'dev'));

You can either use the concatenated classname (e.g InfoBox_www -> www) or the full class name., (*11)

After installing via composer, or after adding a new InfoBox, you must /dev/build, (*12)

The Versions

05/12 2014

dev-master

9999999-dev https://github.com/stnvh/silverstripe-infoboxes

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes

05/12 2014

1.2.1

1.2.1.0 https://github.com/stnvh/silverstripe-infoboxes

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes

25/11 2014

1.2.0

1.2.0.0 https://github.com/stnvh/silverstripe-infoboxes

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes

24/11 2014

1.1.7

1.1.7.0 https://github.com/stnvh/silverstripe-infoboxes

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes

24/11 2014

1.1.6

1.1.6.0 https://github.com/stnvh/silverstripe-infoboxes

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes

05/09 2014

1.1.5

1.1.5.0 https://github.com/stnvh/silverstripe-infoboxes

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes

04/09 2014

1.1.4

1.1.4.0 https://github.com/stnvh/silverstripe-infoboxes

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes

23/07 2014

1.1.3

1.1.3.0 https://github.com/stnvh/silverstripe-infoboxes

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes

23/07 2014

1.1.2

1.1.2.0 https://github.com/stnvh/silverstripe-infoboxes

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes

23/07 2014

1.1.1

1.1.1.0 https://github.com/stnvh/silverstripe-devchecks

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes

22/07 2014

1.1.0

1.1.0.0 https://github.com/stnvh/silverstripe-devchecks

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes

22/07 2014

1.0.0

1.0.0.0 https://github.com/stnvh/silverstripe-devchecks

Conditional CMS info boxes.

  Sources   Download

BSD-3-Clause

The Requires

 

cms silverstripe info conditional boxes