Squiz Labs Blog - The latest news from the R&D division of Squiz®

Subscribe to our RSS feeds

Squiz Matrix Newsletter #508

Last week, we reported on two new events that were added to Matrix's Trigger package to allow you to fire a trigger when a form submission is created and/or completed. This week we have more new trigger events to report for user logins via the SAML and OAuth2 Account Manager assets.

Continue reading below for the low down on this great new addition as well as more information on all this week's developments.  

New Trigger Events: User Login via SAML and OAuth2

Due for release in version (TBA)  

New events have been added to the Trigger package within Squiz Matrix, to fire a trigger when a user logs into the system via SAML and Oauth2.

The User Login via SAML and User Login via OAuth2 trigger events can be selected in the Events section when creating a new trigger.

The User Login via SAML and OAuth2 Trigger Events 

These trigger events have been added to improve the overall trigger package and provide further implementation possibilities when dealing with SAML and OAuth2 users.

System Configuration/Global Preferences Screen Enhancements

Due for release in version (TBA)  

The System Configuration and Global Preferences screens within Matrix allow you to configure the settings of your system and your user preferences.

This enhancement modifies the interface of these screens to ensure a more consistent user experience and provide easier to understand information on the settings available on these screens.

These changes include consistent Yes/No drop-down options for boolean field types. Previously, a variety of boolean values were being used (True/False, On/Off etc.).

The field information for these settings has also been appended to include clear and consistent advice on the options available.

Squiz Matrix Newsletter #507

Last week, we let you know that Squiz Matrix 5.2 was not too far away and detailed one of the flagship features of the upcoming release, our new SugarCRM Token asset. We'll have more news on this release in the coming weeks, so be sure to keep checking the newsletter for all the latest on Matrix 5.2.

In the meantime, we've got two great new developments to the Trigger package, including new trigger events for form submissions. Continue reading below for more information on these great new features.

New Form Submission Trigger Events

Due for release in version (TBA)  

Two new events have been added to Matrix's Trigger package to allow you to fire a trigger when form submission is created and/or completed.

The Form Submission Created trigger event will fire the trigger when a form submission is first created, after the user's answers to the questions on the initial form page. This event will fire irrespective of whether or not the submission is logged or not.

Form Submission Trigger Events 

The Form Submission Completed event, on the other hand, will fire the trigger when the form is completed and submitted.

These trigger events have been added to aid in creating triggers that use form submission data. The commonly used Asset Created event, would fire the trigger before form data was populated, and was thus not a viable alternative.

Morph Asset Trigger Action Enhancement

Due for release in version (TBA)  

The Morph Asset trigger action allows you to morph an asset to a new asset type, for example from one user type to another. Previously, assets needed to have a status of Under Construction to be able to morphed from one asset type to another.

This enhancement adds a new option, allowing you to bypass this restriction.

Morph Asset Trigger Action Enforce Under Construction Field 

The Enforce Under Construction? field allows you to disable this setting. By default, this field will be enabled, meaning that the target asset must be in Under Construction status before it can be morphed. Disabling this option will allow you to morph assets of any status.

This option has been added to allow further implementation possibilities, for example, allowing users to perform actions on your site that will grant them a higher or lower account type.


Squiz Matrix Newsletter #506

For the past few months, we've been teasing you with some of the fantastic new features and developments available in our upcoming release of Squiz Matrix 5.2. While we're not yet ready to reveal a date for release, we can say that it's not too far away now.

In the coming weeks, we'll be making a release candidate version of 5.2 available, for upgrade testing purposes. We'll also be announcing the release date and be taking a look at the headlining features that you can look forward to in Matrix 5.2.

In this week's newsletter, we're covering two great features heading to Matrix 5.2, including a new asset within Matrix to facilitate integration with a Sugar platform. Continue reading below for more information on all this week's developments.

New SugarCRM Token Asset

Due for release in version (TBA)  

Sugar is a customer relationship management system that can integrate with your CMS, Search and Marketing Automation platforms to help you build a single-view of your customer, in order to provide a greater insight into your users.

Read more about Sugar on the Squiz website.

This feature introduces a new SugarCRM Token asset to Matrix, allowing for more streamlined integration with your Sugar platform.

Once a connection has been established, this asset can be used in conjunction with Matrix's REST web service functionality to perform authenticated API calls to Sugar. This means that the REST features on assets such as Triggers and Custom Forms can be utilised to make web service calls to Sugar. The response data of these calls can then be used for a variety of purposes, including stored as metadata against an asset, or to personalise content. 

Through the use of this new connector asset, Matrix User assets are now able to be synced to a record ID in Sugar using a new trigger action: Sync Matrix User to SugarCRM Record. This will allow for logged in users in Matrix to be synced and tracked as contacts in a Sugar system

The Sync Matrix User to SugarCRM trigger action can also create new records in Sugar automatically if the user has never logged into the Matrix system before. The next time they log in, Matrix will locate their existing record ID in Sugar and sync the record data back to the Matrix user.

Sugar record attributes can be exposed in Matrix using global keyword replacements.

The Sync User to SugarCRM Record Trigger Action 

Additionally, this new trigger action can also automatically link a Sugar record to another record. So, for example, if the trigger action is creating contacts in Sugar that represent the users in Matrix, it can also link these contacts to an account in Sugar which may be represented as a user group in Matrix.

File Attachments on Custom Form Emails and Send Email Trigger Action

Due for release in version (TBA)  

Currently within Squiz Matrix, a Custom Form's File Upload fields can be configured to have their uploaded files attached to the form emails that are sent when the submission is made. While a handy feature, this doesn't address occasions when you require additional files to be attached that are not part of the form submission the user has made.

This feature adds the ability for the Custom Form to attach any asset as part of the form submission emails, either from a fixed or dynamic location.

The new Custom File Attachments sections on the Email Options screen of the Custom Form allow you to configure the attachments on the form submission emails.

The Custom File Attachment settings 

If selecting a non-file based asset to send, you can specify a file extension to use in the File Name field, for example, entering 'index.html' would attach the specified asset as a HTML file. If no extension is provided, the asset will be sent as a text file, by default.

You can also specify the design and/or paint layouts to apply on attached assets (non-file), as well as configure multiple attachments on an email.

This new email attachment functionality has also been extended to the system's Send Email trigger action. The Custom File Attachments settings will now be displayed when configuring the Send Email trigger action on the Trigger Manager.

Squiz Matrix Newsletter #505

We have one new feature to report this week, the ability to resize the Asset Map in Squiz Matrix's Admin Interface. Continue reading below for more information on all this week's developments. 

Resize the Asset Map

Due for release in version (TBA)

Back in 2013, we released the Modern Asset Map, a JavaScript-based alternative to Matrix's previous Java-based offering. This asset map provided a faster, more reliable and more efficient user experience when navigating the assets within your system.

With the release of Matrix 4, the Modern Asset Map became standard and, with this brand new feature out in our next major release, you'll now be able to resize the width of the asset map to suit your needs.

While you could technically alter the width of the asset map before, using the Asset Map Width global preference, this feature introduces new functionality allowing you to drag to resize the asset map, right in the Admin Interface.

To resize the asset map, users need to just hover over the bar to the right of the asset map, click and drag across to either decrease or increase the asset map's width. Can't get much more simple than that!

Resizing the Asset Map 

Dragging the asset map completely to the left of the screen will hide the asset map, in a similar manner to existing functionality (clicking the arrow).

Additionally, Matrix will store your set asset map width in your browser's local storage so that it will be retained the next time you log into your system.

The Asset Map Width global preferences will now act as the minimum allowable width for the asset map. Users will not be able to decrease the size of the asset map past this value (other than when hiding the asset map).  

This feature has been added to continue to provide our users with an intuitive, reliable and efficient asset map experience, to compliment Matrix's Administration Interface.

PHP_CodeSniffer 2.2.0 released

I've just released version 2.2.0 of PHP_CodeSniffer. This release brings the usual bug fixes, but also quite a lot of sniff changes (the PHPCS and Squiz standards have changed as a result) and some important new features as well. Thanks to all the developers who directly contributed code to this release.

PHPCS Config File

I find myself regularly running PHP_CodeSniffer over a code base using the same command line arguments each time. I could put most of these arguments into the project's ruleset.xml file, but I would still need to specify what files and directories need to be checked, and what coding standard to use.

From version 2.2.0, if PHP_CodeSniffer is not given a list of files to check and is not given a standard to use, it will look for a phpcs.xml file in the current directory to figure out what it should do. The phpcs.xml file has the exact same format as a normal ruleset.xml file, so it can also be used as your primary standard. But it should also specify some files and/or directories to process using the new ruleset <file> tags. Take a look at PHP_CodeSniffer's own phpcs.xml file for an example.

Having one of these phpcs.xml files allows you to run the phpcs or phpcbf commands without specifying any command line options and still have them check or fix an entire codebase.

If you are using the phpcs.xml file as your primary standard, the files and directories you specify in there will be ignored if any files or directories are specified on the command line. So you can run phpcs like this:

$ phpcs

Or you can use the phpcs.xml as a normal standard:

$ phpcs --standard=phpcs.xml /path/to/file

Coloured Report Output

After years of prompting, I've finally added colours to the report and progress output that PHP_CodeSniffer produces.

If you want to see colours in the output, use the --colors command line argument. Use the command phpcs --config-set colors true to turn colours on by default, or configure it in your ruleset. If you have done this, use the --no-colors command line argument to turn colours off for a single run.

Hopefully the colours are tastefully used and don't feel like using colour just for the sake of it. If you disagree, please let me know.

Auto-Sizing Reports

PHP_CodeSniffer has always allowed you to set a report width so that you can see more output in the screen-based reports. From version 2.2.0, you can tell PHP_CodeSniffer to use as much space as it can by adding --report-width=auto to the command.

When using auto width, PHP_CodeSniffer will use the entire width of your terminal window to produce report output. If the report doesn't need all that width, PHP_CodeSniffer will only use as much as it needs to print the report without wrapping. Use the command phpcs --config-set report_width auto to use auto-sizing by default, or configure it in your ruleset.

PSR2 Tab Width

The PSR2 standard now includes a tab-width setting of 4 in the ruleset.xml file. PSR2 requires 4 spaces for indenting, so running that standard over tab indented code will now detect, and optionally fix, those tab indents correctly without you needing to specify the --tab-width=4 command line argument.

View the full 2.2.0 changelog at PEAR or Github

Stay up to date on all PHP_CodeSniffer changes, including new features and releases, by subscribing to the RSS feed or following me on Twitter.

Squiz Labs

R & D division of Squiz Pty Ltd

Open source web experience management solutions

Squiz Labs is the research and development division of Squiz, the company behind the Squiz Suite of web experience management and development tools.

Our PHP and JavaScript developers are responsible for producing innovative enterprise-quality software while our interface designers and testing team ensure our products both look great and are easy to use.