ProcessWire core updates (2.5.10)

Introducing the ProcessWire Config Admin Module

This week a new configuration method was added that enables you to modify most of ProcessWire's configuration settings directly in the admin, rather than manually editing the /site/config.php file. This includes more than 30 configuration properties. The module that does this is called ProcessWireConfig. The core has been updated to support it with version 2.5.10.

There are a lot of situations where this module could be useful. Quickly enabling (or disabling) debug mode for example, or modifying your admin thumbnail image settings as another. But you can modify nearly any configuration setting. Further, you can also use the tool to define your own (more on that later).

The actual ProcessWireConfig module has not yet been merged into the core, though likely will be soon (if ProcessWire users think it will be useful on most sites). If you'd like to give it a try now, just grab ProcessWire 2.5.10 and install the module directly from the ZIP. Your feedback is appreciated.

The module works by parsing the /wire/config.php file directly to determine what properties are configurable. As a result, if a new configurable property is added to /wire/config.php, then ProcessWireConfig will also pick it up as editable.

Define custom config properties

The module also parses your site's custom /site/config.php file looking for configurable properties. If it finds any, then you'll have a new "Site" tab appear when using this module. Each $config property has to be commented in phpdoc format in order to be recognized (with at least a @var line). There are also several custom attributes that can be added to provide more information about the configuration property to ProcessWireConfig. See the current /wire/config.php for several examples. Most of the custom attributes identified by ProcessWireConfig start with a # within the phpdoc.

However, you don't have to use your /site/config.php file to define custom properties if you don't want to. You can actually define them right on the ProcessWireConfig module configuration screen. Currently it's just limited to defining basic text and checkbox fields here, but we'll add more options if there's interest.

Comments

  • NorbertH

    NorbertH

    • 10 years ago
    • 32

    Simply great work!

    Not sure if this need to be in basic core but i really like the concept of parsing and editing the config file. It fits perfectly into the concept of having a CMF that offers a nice interface in addition to an interface independent core functionality.

    Feels like Linux , feels like home :-)

  • Adrian

    Adrian

    • 10 years ago
    • 42

    I really like what you did for updating the config.php file. Te addition for custom properties it's a huge plus. Keep up the good work !!!

 

Latest news

  • ProcessWire Weekly #552
    In the 552nd issue of ProcessWire Weekly we'll check out the latest weekly update from Ryan, take a quick look at a new e-commerce solution for ProcessWire, and more. Read on!
    Weekly.pw / 7 December 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK