2017 © Pedro Peláez
 

silverstripe-module dev-tools

Development tools for SilverStripe

image

plasticstudio/dev-tools

Development tools for SilverStripe

  • Thursday, February 15, 2018
  • by plasticstudio
  • Repository
  • 2 Watchers
  • 0 Stars
  • 834 Installations
  • Scheme
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 21 Versions
  • 25 % Grown

The README.md

Description

Adds additional functionality to assist in developing SilverStripe websites., (*1)

Dependencies

  • SilverStripe 3.1+
  • Betterbuttons

Features

  • Performance of page loads
  • Visualisation of current site state (DEV/TEST/LIVE)
  • Admins can emulate any other user
  • IconSelectField to use icon libraries within the CMS
  • Automatic redirection from development domains, when in LIVE mode
  • LogJam logging to append system error log
  • BugHerd integration

Installation

  1. Add to your composer requirements composer require jaedb/dev-tools
  2. Edit your theme's templates/Page.ss template and add $DebugTools immediately before the </body> tag
  3. Run /dev/build?flush=1
  4. Toggle debug tools by turning your site to DEV or TEST modes (disabled on LIVE sites for obvious reasons)
  5. Set the site's BugHerd project key in config.yml. See config/dev-tools.yml for an example.

Usage

Primary domain redirection

When you set your SS_PRIMARY_DOMAIN property on a live website, we automatically redirect to this primary domain. This avoids the need for bloated .htaccess redirections and allows control at the environment level., (*2)

  • Set your preferred domain in _ss_environment.php
  • Consider whether you want http vs https, and include this in your domain (but exclude trailing slash!).
  • Example: define('SS_PRIMARY_DOMAIN', 'https://plasticstudio.co.nz'); will redirect http://www.plasticstudio.co.nz/some-section/subpage to https://plasticstudio.co.nz/some-section/subpage.
  • To completely disable this functionality set disable_primary_domain_redirection: true in your project's config.yml

Debug Tools

Debug tools, (*3)

  • Manage the visibility of the Debug Tools from within the CMS, under Settings
  • Manage ability to Emulate users, also under Settings

IconSelectField

IconSelectField, (*4)

  • Set your $db field to type Icon (eg 'PageIcon' => 'Icon')
  • IconSelectField::create($name, $title, $iconFolder)
  • $name is the database field as defined in your class
  • $title is the label for this field
  • $iconFolder (optional) defines the directory where your icons can be found. Defaults to /site/icons.
  • Use your icon in templates as you would any other property (eg $PageIcon). If your icon is an SVG, the SVG image data will be injected into the template. To prevent this, you can call $PageIcon.IMG instead to enforce use of <img> tags.

LogJam

  • LogJam::Log($message, $environment)
  • $message a string that you'd like to log
  • $environment (optional) the type of environment that should log this message (ie test, dev, live). Defaults to dev.
  1. Enable LogJam in _config.php by adding LogJam::EnableLog();
  2. Check your log file location. Set this in _ss_environment.php with the following:
ini_set('log_errors','on');
ini_set('error_log','/home/mywebsite/logs/php.log');

The Versions

15/02 2018

1.3.x-dev

1.3.9999999.9999999-dev http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

15/02 2018

1.3.2

1.3.2.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

12/02 2018

dev-master

9999999-dev http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

12/02 2018

2.x-dev

2.9999999.9999999.9999999-dev http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

12/02 2018

dev-develop

dev-develop http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

05/02 2018

dev-feature/ss3-ssphotfix

dev-feature/ss3-ssphotfix http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

12/01 2018

2.0.0

2.0.0.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

18/12 2017

dev-feature/ss4

dev-feature/ss4 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

24/11 2017

1.3.1

1.3.1.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

24/11 2017

1.x-dev

1.9999999.9999999.9999999-dev http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

02/11 2017

1.3.0

1.3.0.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

01/11 2017

1.2.2

1.2.2.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

01/11 2017

1.2.1

1.2.1.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

30/10 2017

1.2.0

1.2.0.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

13/09 2017

1.1.3

1.1.3.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

11/09 2017

dev-feature/cms_bugherd

dev-feature/cms_bugherd http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

03/09 2017

1.1.2

1.1.2.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

22/08 2017

1.1.1

1.1.1.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

31/07 2017

1.1.0

1.1.0.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

20/04 2017

1.0.1

1.0.1.0 http://plasticstudio.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe

15/02 2017

1.0.0

1.0.0.0 http://jamesbarnsley.co.nz

Development tools for SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe