CMS Airship

CSPR.NG

Indistinguishable from line-noise.

CSPR.NG Blog

Cryptographically Secure Pseudorandom Number Generator

CMS Airship Version 1.3.0 Released

The official release has been tagged and signed. This release was focused heavily on improving the user interface and user experience (commonly abbreviated to UI/UX).

Screenshot

The changelog is deceptively succinct:

Changes in Version 1.3.0

  • Significant UI/UX improvements.
    • Redesigned the Bridge UI to be more suitable for a control panel.
    • The left menu in the Bridge is now collapsable, but automatically opens the sections which indicate your current location in the cabin.
  • Update Halite to 2.2.0.
  • Added a WhiteList filter, which is a strict typed alternative to switch-case whitelisting.
  • #129: Extension developers can now make their motifs configurable by end users.
  • #114: We no longer display the database password on the databases page. This has always only been accessible to administrators, but now it is write-only from the web interface.
  • #131: If an exception is thrown by the part of code that loads the logger, and the database driver was selected, it will no longer silently produce a white screen.
  • #132: You can now control the date/time a blog post is published.
  • #133: Added the "slug" field to the "Create New Blog Post" form.

Motif Configuration

The coolest feature for version 1.3.0 is that you can now make your motifs configurable by your users, which affords them a greater degree of flexibility and customizability out-of-the-box.

This new feature comes in three pieces:

  1. The templates that use the configuration (accessed by the new MOTIF global template variable).
  2. A motif-specific form template.
  3. An input filter container.

For example, if you add a block of code like this in one of your template:

{% if MOTIF["foo"] %}
    <span>Foo is enabled! {{ MOTIF["bar"] }}</span>
{% endif %}

...you can allow users to enable/disable foo and provide input for bar by placing this in lens/config.twig of your motif:

<div class="multiline_checkbox_container">
    <div class="multiline_checkbox">
        <input
            id="motif-config-foo"
            type="checkbox"
            name="motif_config[foo]"
            value="1"
            {% if motif_config['foo'] %}
                checked="checked"
            {% endif %}
        />
        <label for="motif-config-foo">
            {{ __("Foo?") }}
        </label>
    </div>
</div>
<label for="motif-config-bar">
   {{ __("Bar") }}:
</label>
<input
    id="motif-config-bar"
    name="motif_config[bar]"
    type="text"
    value="{{ motif_config['bar']|e('html_attr') }}"
/>

Finally, you can create a file called config_filter.php in the same directory as your motif.json file, which Airship will use for validating the end user's configuration. For a trivial example, refer to how airship-classic implements it.

We used this feature to give CSPR.NG a background image and to make the blog header less plain.

About the Author

Friends of CSPR.NG

Multiple Authors

People with access to this Author profile:

  • Scott Arciszewski
  • Taylor Hornby

Leave a Comment

:
:
:
: