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

Subscribe to our RSS feeds

Upgrading custom coding standards to support version 1.3.0

PHP_CodeSniffer version 1.3.0 is currently in alpha, but it contains an important backwards compatibility break that all coding standard authors need to be aware of. Upgrading your coding standard to make use of the new ruleset.xml files is an easy process and this guide will show you how to get it done.

Please note that if you have not created your own coding standard, you do not need to follow this guide. Users of PHP_CodeSniffer that use one of the built-in standards can continue to check their code as normal.

This guide assumes your coding standard has the following directory structure, which is based off the coding standard tutorial in the PHP_CodeSniffer documentation:

MyStandard
|_ MyStandardCodingStandard.php
|_ Sniffs
   |_ Commenting
      |_ DisallowHashCommentsSniff.php

In this sample coding standard, we have a single sniff being included directly within the standard's sniff directory. But it doesn't matter how many sniffs you have as they are automatically included into the standard in all versions of PHP_CodeSniffer. Your standard may not even have any directly included sniffs, preferring to include sniffs from other standards via the CodingStandard.php class.

So the only thing we need to do to upgrade a custom coding standard is convert the CodingStandard.php class to a ruleset.xml file. We can leave all directly included sniffs alone and we don't have to change our directory structure.

The Basics

The first thing you need to do is create a ruleset.xml file directly under your top-level directory. The name of the file must be ruleset.xml

touch MyStandard/ruleset.xml

The contents of this file will be minimal if you are not including any sniffs from other standards. So the file content would look like this:

<?xml version="1.0"?>
<ruleset name="My Standard">
 <description>My custom coding standard</description>
</ruleset>

A simple ruleset.xml file like this tells PHP_CodeSniffer that this directory contains a coding standard, the name of the standard is My Standard and the sniffs in the standard are sourced directly from the default Sniffs directory.

Once you've created your ruleset.xml file, you can go ahead and delete the CodingStandard.php class file as it is no longer required. However, you can keep both files in the coding standard if you want to use your standard in both old and new versions of PHP_CodeSniffer. But be aware that you will need to make changes to both files and any advanced ruleset features you add to your ruleset.xml file can not be replicated in your CodingStandard.php class file.

A Simple Coding Standard Class

You can build on a coding standard by including sniffs from other standards. A sample CodingStandard.php class from the PHP_CodeSniffer documentation contains this:

public function getIncludedSniffs()
{
  return array(
          'PEAR',
          'Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php',
          'Generic/Sniffs/Functions',
         );

}//end getIncludedSniffs()

The example above includes the MultipleStatementAlignment sniff from the Generic coding standard, all sniffs in the Functions category of the Generic coding standard and all sniffs defined in the PEAR coding standard.

These rules would be replicated in a ruleset.xml file like this:

<?xml version="1.0"?>
 <ruleset name="My Standard">
 <description>My custom coding standard</description>
 <rule ref="PEAR"/>
 <rule ref="Generic.Formatting.MultipleStatementAlignment"/>
 <rule ref="Generic/Sniffs/Functions"/>
</ruleset>

The two changes here are the use of the rule tag to include sniffs and standards and also the way we reference an individual sniff. Instead of specifying the path to the sniff we instead specify the internal code that PHP_CodeSniffer gives it, which is based on the path. It's actually a pretty easy conversion. Just just drop the Sniffs directory, convert the slashes to periods and remove Sniff.php from the end. Here are some more examples to make sure it is clear.

BEFORE: Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php
AFTER: Generic.VersionControl.SubversionProperties

BEFORE: PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php
AFTER: PEAR.ControlStructures.ControlSignature

BEFORE: Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php
AFTER: Squiz.Strings.DoubleQuoteUsage

Coding Standards with Exclusions

Some coding standards include a set of sniffs from an external standard but then exclude some specific sniffs. A sample CodingStandard.php class with exclusions from the PHP_CodeSniffer documentation contains this:

public function getIncludedSniffs()
{
  return array(
          'PEAR',
         );

}//end getIncludedSniffs()

public function getExcludedSniffs()
{
  return array(
          'PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php',
         );

}//end getExcludedSniffs()

The example above includes the whole PEAR coding standard except for the ControlSignature sniff.

These rules would be replicated in a ruleset.xml file like this:

<?xml version="1.0"?>
<ruleset name="My Standard">
 <description>My custom coding standard</description>
 <rule ref="PEAR">
  <exclude name="PEAR.ControlStructures.ControlSignature"/>
 </rule>
</ruleset>

Notice how the exclusions are grouped with the standard they are being excluded from and how they again use the internal sniff codes instead of full paths to sniff files.

A Practical Example

PHP_CodeSniffer comes with a coding standard called PHPCS, which is the entire PEAR standard as well as some Squiz sniffs thrown in. In version 1.2.2, the PHPCSCodingStandard.php file contains these two functions:

public function getIncludedSniffs()
{
  return array(
          'PEAR',
          'Squiz',
         );

}//end getIncludedSniffs()

public function getExcludedSniffs()
{
  return array(
          'Squiz/Sniffs/Classes/ClassFileNameSniff.php',
          'Squiz/Sniffs/Classes/ValidClassNameSniff.php',
          'Squiz/Sniffs/Commenting/ClassCommentSniff.php',
          'Squiz/Sniffs/Commenting/FileCommentSniff.php',
          'Squiz/Sniffs/Commenting/FunctionCommentSniff.php',
          'Squiz/Sniffs/Commenting/VariableCommentSniff.php',
          'Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php',
          'Squiz/Sniffs/Files/FileExtensionSniff.php',
          'Squiz/Sniffs/NamingConventions/ConstantCaseSniff.php',
          'Squiz/Sniffs/WhiteSpace/ScopeIndentSniff.php',
         );

}//end getExcludedSniffs()

To support version 1.3.0, the ruleset.xml file was created with this content:

<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
 <description>The coding standard for PHP_CodeSniffer.</description>

 <!-- Include the whole PEAR standard -->
 <rule ref="PEAR"/>

 <!-- Include most of the Squiz standard -->
 <rule ref="Squiz">
  <exclude name="Squiz.Classes.ClassFileName"/>
  <exclude name="Squiz.Classes.ValidClassName"/>
  <exclude name="Squiz.Commenting.ClassComment"/>
  <exclude name="Squiz.Commenting.FileComment"/>
  <exclude name="Squiz.Commenting.FunctionComment"/>
  <exclude name="Squiz.Commenting.VariableComment"/>
  <exclude name="Squiz.ControlStructures.SwitchDeclaration"/>
  <exclude name="Squiz.Files.FileExtension"/>
  <exclude name="Squiz.NamingConventions.ConstantCase"/>
  <exclude name="Squiz.WhiteSpace.ScopeIndent"/>
 </rule>
</ruleset>

Questions?

This guide has hopefully provided you without enough information and examples to help you convert your custom coding standards to support PHP_CodeSniffer 1.3.0. If you have any questions, please ask them in the comments section below or contact Greg Sherwood directly via the PEAR website.


,    Permalink for 'Upgrading custom coding standards to support version 1.3.0'

Squiz Analytics sneak peek - the Dashboard

Welcome to the first of our sneak peeks at Squiz Analytics; a new product currently in development to provide powerful analytics tools to the Squiz Suite. All images in this sneak peek are live product screenshots, so they may change before release and they will be missing some features.

A bit about Squiz Analytics

Squiz Analytics is based on Google Analytics and uses the Google Analytics API to retrieve your site's traffic and usage information. But Squiz Analytics is not just another view of Google Analytics. Our goal is to both improve the presentation of information that is important to you and fill some gaps in the functionality of Google Analytics.

It's important to note that Squiz Analytics does not require a Squiz CMS or Squiz Matrix system to use. All it requires is a Google Analytics account that is tracking usage on one or more sites. It can also connect to multiple accounts if you wish. Although Squiz Analytics has a powerful goal tracking feature, it does not require you to have any goals configured in Google Analytics. You can add goals through Squiz Analytics and, unlike Google Analytics, historical goal conversions will be calculated immediately. However, Squiz CMS will be required to utilise the A/B/C testing feature of Squiz Analytics, although we have plans to allow this feature to be used with any site in the future, including Squiz Matrix powered sites.

An Overview of the Dashboard

Squiz Analytics can track multiple sites. We call each site a project as it contains all the site's traffic data, as well as goal and testing data. Each project has its own Dashboard where users can get a quick overview of the most important analytics and goal conversion data for a site.

Dashboard

The Dashboard shows all the common vital signs that you would be used to seeing in Google Analytics, but also presents a number of graphs to allow you to quickly track those vital signs over time. The screenshot above shows a one month graph, but we also have three and six month graphs available via a (yet to be developed) calendar picker. We've also got a live screenshot of the site you are tracking just to keep you in context while you are looking at your reports.

The graphs on the Dashboard have two overlays; Sources and Goals. The screenshot above shows the sources overlay, so you can get a quick picture of how your visitors are getting to your site (direct traffic, referring sites or search engines) as well as how your site is performing over time. Hovering over a column in the graph gives you a bit more information about that day. This is particularly useful when you are viewing a six month graph as the columns are too thin to show data labels.

Sources overlay

The Dashboard has a section devoted to traffic sources with a nice pie graph showing the split and how these traffic sources contributed to goal conversions. The outer ring on the pie graph shows this goal conversion percentage so you can quickly get a visual indication of the traffic sources providing you the best conversion rates, although this data is also presented in the table above the graph.

There is also a recommendation engine built into the product that will help point out patterns in your traffic and goal data, but we don't have that report available to show you yet. So for now, you'll just have to look at that light blue area under the vital signs and wonder what magic will be unveiled when you finally get to press that View Recommendations button.

A Focus on Goal Conversions

Looking at pretty graphs is always nice, but unless you have some goals defined for your site, you can't accurately measure improvements and you certainly can't determine success rates while you test new changes. Squiz Analytics makes it very easy to create goals, and we give you access to historical information so you are free to add and remove goals as quickly and easily as you think of them.

Goals can be based on a range of criteria and we plan to offer the full range of goal types that we can support (they are numerous), although we are focusing on the following for our initial release:

  • A single destination
  • Multiple destinations (e.g., visit page A and also visit page B)
  • Pages per visit
  • Time spent on the site
  • Custom events (e.g., view thank-you screen of a form; click a specific button)
  • Referring site (e.g., track your referrals from site A over time)

Squiz Analytics allows you to create as many of these goals as you'd like for a project. The Top Goals box picks out your best performers and displays them on your Dashboard, along with the conversion rates and a small bar under the goal showing the traffic sources that contributed to the conversions. We'll show you the dashboards for each goal in a future sneak peek so you can see the full range of reports available for goal tracking.

Our focus on goals extends to the graphs on the Dashboard as well. By switching from the Sources overlay to the Goals overlay, you can both track your conversions over time and get more information about the effect of both converted and abandoned goals on your site's vital signs.

Goals overlay

The screenshot above shows the Pages per Visit graph and has overlayed the percentage of goal conversions per day, indicated by the green section of the graph. The tooltip provides more information for each day, including the conversion rates, the average pages per visit for both converted and abandoned visits and a summary of the data for the day. In this case, the summary lets us know that visitors who converted a goal visited 187% more pages than those visitors who did not convert a goal.

For the Techies

Squiz Analytics makes use of the new Squiz Framework; a toolkit that allows you to build products that both look like and interact with all other Squiz Suite products. All the GUI elements you see in these screenshots will be available in the Squiz Framework, along with our standard feature-set that includes the up-to-date service, remote backup and the URL screenshot/PDF system. We're working hard on the Squiz Suite at the moment, so we wont have the framework available until after we've released Squiz Analytics and Squiz Search and got through the initial rollout period. We'll keep you updated and let you know release dates once we've got something locked in.

Something else to point out is that our GUI elements do not use Flash or other browser plugins. Our bar graphs are pure HTML and CSS and our pie graphs are SVG. We make heavy use of CSS3 throughout the interface, especially to generate rounded corners and shadows without the need for images. This allows for rapid interface development (and re-development) but does mean we fall back to a slightly less sexy interface for browsers that don't support these newer features. For example, Internet Explorer users will be looking at boxes all day (see screenshot below), although we have tried to make these boxes as sexy as boxes possibly can be.

Dashboard IE

The next Sneak Peek

While our goal system is fully functional, we are still working on implementing our goal adding/editing interfaces and reports. Our next Squiz Analytics sneak peek will bring you more information about goals and the advanced reporting we have around them. Stay tuned, and remember to subscribe to our RSS feeds for all the latest information.

We hope you've enjoyed this first sneak peek of Squiz Analytics. Changes are still being made to the Dashboard, so we encourage you to post your first impressions and suggestions in the comments below.


,    Permalink for 'Squiz Analytics sneak peek - the Dashboard'

MySource Matrix Newsletter Issue #292

MySource Matrix's E-Commerce Package has grown significantly since its inception, many aeons ago. In fact, over the past year, we have seen the introduction of some significant E-Com staples including PayPal integration, donation support and four new payment gateway options. All these features have helped Matrix build an E-commerce package that can cater to almost any needs. Our Squiz UK developers offer another addition to the package this week - the Promotional Code asset. This asset allows customers to receive discounts based on store promotion codes. These discounts are currently only based on quantity, but can offer both fixed and percentile discounts on products.

Meanwhile, our local developers in the Squiz Labs office have also been hard at work fixing reported bugs and developing new features for MySource Matrix. In addition to the Promotional Code asset, this week introduces three exciting new features. Continue reading below for more information and examples on all these features.

Promotional Code Asset for E-Commerce

Due for release in version 4.0.0 (November 10th 2010)

A new Promotional Code asset has been added to the E-Commerce Package to allow customers to receive discounts when entering store promotional codes. These discounts are based on rules, configured in the Promotional Code asset.

The Promotional Code asset can be found in the E-Commerce section of the New Child/Add menu.

The Promotional Code asset

You can set the promotional code and specify which items to apply the promotional discount to on the Details screen of the Promotional Code asset. You can also create a promotional rule, based on the quantity of assets purchased. A fixed or percentile discount can be configured for every X number of assets sold.

In the example below, we have set up our promotion to provide customers with a 15% discount for every 10 copies of the MySource Matrix User Guide they buy.

Configuration of the Promotional Asset's Details screen

On the Item listing, a field is provided for users to input the promotional code. This code is then parsed to the Ecommerce Form Page through a request variable, configured on the Details screen of the Ecommerce Form Page asset.

For example, if the Asset Promotional Code Request Variable is set as 'promotional_code', the promotional code will be sent to the e-com form as follows:

http://example.com/ecom_form_page?promotional_code=CODE  

If this request satisfies the Promotional Code configured for the purchased item, the discount will be applied to the e-commerce order.

Example of a Promotional Code in an Ecommerce Store

In the example above, the customer is purchasing fifty User Guides (at $11.50 each) and has entered the correct discount code. A 15% discount ($17.25) is applied on the total cost of every 10 copies purchased. The customer will receive a total discount of $86.25 and the revised cost of the user guides will be reduced to $488.75 from an original total cost of $575.00.

Tool to Import Assets from an XML File

Due for release in version 4.0.0 (November 10th 2010)

MySource Matrix's import_from_xml.php script performs actions passed to it from an XML file (including the creation of assets, setting metadata etc.). This new feature introduces the functionality of this script to the Matrix back end, with a new import Assets from XML tool.

The tool can be accessed from MySource Matrix's System Tools screen.

The Import from XML File tool

On the Import Assets from XML Tool screen, select the XML file to use (an example XML file structure is provided at /__data/asset_types/tool_import_assets_from_xml/files/example.xml). You can also select a root asset if one is not specified in your XML file.

The Import Assets from XML tool screen

This function has been added to provide more flexibility for MySource Matrix's integration with the Easy Edit Suite.

Enhancements to the import_from_xml.php Script

Due for release in version 3.28.4 (September 6th 2010)

Along with the new Import From XML File tool, enhancements have been made to the import_from_xml.php script to allow users to set a root node, under which to import their assets.

This script now takes the following two optional arguments:

  • --root-node: the setting of a root node.
  • [ASSET_ID]: the asset ID of the root node to import assets under.

The new structure of the import_from_xml.php script is as follows:

$ php import_from_xml.php <system_root> <Import File> --root-node [ASSET_ID]

$ php import_from_xml.php <system_root> import.xml --root-node 125
This function has been added to provide more flexibility for MySource Matrix's integration with the Easy Edit Suite.

Keyword Replacement for Asset URL in Workflow Custom Messages

Due for release in version 3.28.4 (September 6th 2010)

A new keyword replacement is now available on Workflow Custom Messages to print the URL of the asset that is in Workflow.

  • %asset_url%: The URL of this asset.

This keyword replacement can be used on all Workflow messages. An example of its usage is shown below:

Dear %user_name%,

Your approval is required on asset "<a href=%asset_url%>%asset_name%</a>".

<a href=%preview_url%>Preview this Asset</a>
<a href=%accept_url%>Accept these changes</a>
<a href=%reject_url%>Reject these changes</a>

When the custom message is sent, a link will appear to the asset, as shown below.

The Asset URL keyword replacement used on a Custom Message

If an asset has multiple URLs, this keyword replacement will return the closest to the current URL.

,    Permalink for 'MySource Matrix Newsletter Issue #292'

How usable is MySource Mini? - Revisited

Back in January we wrote an article about the usability of MySource Mini. We asked ourselves how usable is MySource Mini based on the five attributes of usability that Jakob Nielsen listed in his book Usability Engineering - Learnability, Efficiency, Memorability, Errors and Satisfaction.

At the time we could not answer whether MySource Mini was memorable as we did not have enough data. Since this article we have conducted two more rounds of usability testing and have tested this attribute. So are users able to remember how to use MySource Mini?

At the end of the session, each participant was handed a memory test - a list of questions that they needed to answer to see how much they remembered. The average score for these tests was 80%.

As most of the participants were first time users and would be deemed by Jackob Nielsen as casual users (i.e., people who use the system intermittently, such as sales people, admin staff and upper management) we are able to say that MySource Mini is memorable.

What does this mean? Well in January we stated:

For the parts of the system that have been tested, MySource Mini has a high level of usability. Users are able to complete tasks efficiently, with very little training and only a small number of errors. At the same time, they also feel satisfied when using the system.

We can now also add that MySource Mini is memorable. Users are able to remember parts of the system that they have seen and used.


,    Permalink for 'How usable is MySource Mini? - Revisited'

MySource Matrix Newsletter Issue #291

Earlier this week, Managing Director of Squiz, John-Paul Syriatowicz, announced the launch of Squiz's new open source web experience management platform: Squiz Suite. Squiz Suite utilises a suite of products to satisfy a multitude of web experience management expectations. You can find further information on the announcement here and here.

As you can imagine, much excitement ensued around the office (and the world), as a result of this terrific news. But what does it mean for our beloved MySource Matrix?

Squiz is retiring MySource Matrix. Don't be alarmed, citizens! MySource Matrix will be retired in name only. Meet Squiz Matrix.

Squiz Matrix

Squiz Matrix will remain an actively developed and fully supported product featuring all the functionality you already rely on MySource Matrix for. While the look of the product hasn't received a drastic change (in fact, the administration interface remains unaltered, apart from a smashing new logo), Squiz Matrix's main improvements lie in the enhancement of the Easy Edit Suite and its integration with the other products of the Squiz Suite.

Along with the new name, Matrix will receive a 4.0 product version number. Is this the same as MySource4? Nope! We've actually put together a handy blog post explaining all this and more, so please, feel free to have a squiz (pun intended).

Squiz Matrix is due for release in November of this year and will contain over twenty brand new features. In previous newsletters, we had been promoting several of the features for 4.0 (previously 3.30) as being released next month. While that will no longer be the case, I'm sure you will agree that it will be worth the wait! In the meantime, Squiz will still be providing releases each month for our current versions of MySource Matrix, 3.26 and 3.28 (see Release dates).

As mentioned, we do have lots of exciting features for both 4.0 and our current versions in the works. Three have been added to the pile this week, including one from our friends, Squiz UK (Allow Multiple Uses of URL Matches Trigger Condition). Continue reading for more information on these features.

setContentOfEditableFileAsset Function for Javascript API

Due for release in versions 3.28.4 (September 6th 2010)

This month's release of MySource Matrix v3.28.3 introduced the createFileAsset function for the Javascript API (see Issue #286 of the Matrix Newsletter). This function allowed users to create blank File type assets that users could then manually upload their files to. This feature introduces a new function that extends the Javascript API's functionality of File type assets by allowing you to set the content of editable File assets (CSS, XML, Text, XSL and JS Files).

The setContentOfEditableFileAssets function is enabled through a new Set File Content field on the Details screen of the Javascript API.

The Set File Content field

This function takes three parameters:

  • assetID: ID of the asset to update content for.
  • content: New content of the asset.
  • dataCallback: the custom callback function (optional).

The format of the setContentOfEditableFileAssets function is shown below:

function setContentOfEditableFileAssets (assetID, content, dataCallback);

Please note that locks need to be acquired on the asset before setting its content.

This function has been added to provide more flexibility for MySource Matrix's integration with the Easy Edit Suite.

Allow Multiple Uses of URL Matches Trigger Condition

Due for release in version 4.0.0 (November 10th 2010)

Currently, only a handful of Trigger Conditions can be used multiple times on a trigger. This feature adds the 'URL matches' condition to this select group, allowing you to use the condition more than once on a single trigger.

This can be useful in cases where you may want to match against two URL condition or match on one condition whilst not matching on another.

URL Matches Condition

This enhancement provides you with the ability to create more refined conditions for your triggers.

Caching 301 Permanent Redirects in the Remap Manager

Due for release in versions 3.28.4 (September 6th 2010)

An enhancement has been added to MySource Matrix's Remap Manager so that cache headers are sent for 301 permanent redirects. This can improve performance in the occasion that the browser does not cache the redirection, preventing the same request from being sent multiple times.

This feature was kindly contributed by MySource Matrix Forum user ndrw.


,    Permalink for 'MySource Matrix Newsletter Issue #291'

Squiz Matrix version 4.0.0 - is this MySource4?

Some eagle eyed Matrix users spotted the new 4.0.0 version number of the next stable release of MySource Matrix in our code repository. There's been a lot of speculation as to what that might mean and we've got some big news regarding MySource Matrix, so here it is straight from the mouth of our MD, John-Paul Syriatowicz:

I have some really big news for all MySource Matrix users. Squiz is retiring MySource Matrix later this year but don’t fret - we’re only retiring the name - not the product! Let me explain why. In a few months time Squiz is releasing Squiz Suite which is an exciting open source web experience management platform. As part of this major progression, Squiz is rebranding some products and services to more appropriately reflect how our offerings are aligned with each other; presenting a clearer message to the marketplace.

At a fundamental level, Squiz Suite features new products to enhance and extend your MySource Matrix system. MySource Matrix will continue to maintain the pivotal role under its new name - Squiz Matrix. Squiz Matrix will remain an actively developed and fully supported product featuring all the functionality you already rely on MySource Matrix for. Along with the new name and a 4.0 product version number, we plan to release new features and functionality to ensure Squiz Matrix stays at the forefront of web experience management.

MySource Mini also gets a new name - Squiz CMS – because with a host of new features it’s not so mini any more. We expect Squiz CMS to quickly become the tool of choice for editing and publishing content within Squiz Suite because users will be able to manage and share content in both Squiz Matrix and Squiz CMS from the one interface.

Squiz Matrix and Squiz CMS will be joined by two new products; Squiz Analytics and Squiz Search. Squiz Analytics offers innovative functionality and powerful tools to help you improve the content of your site. Squiz Analytics supports A/B or A/B/C (simple multivariate) testing of sites and allows you to create different test scenarios that can be measured to see which is the most effective. Squiz Search is a world beating search engine which utilises Funnelback technology - developed by Australia’s CSIRO - to deliver sophisticated search functionality.

These four products join together to form Squiz Suite which - far from a one point solution - offers the capability to satisfy a multitude of web experience management expectations. Each element of Squiz Suite plays a distinct function so I understand if you’re wondering how Squiz CMS and Squiz Matrix relate. Squiz CMS is all about ease of use, innovation and agility. It’s for non technical users. Squiz Matrix is about enterprise deployments requiring additional configurability and integration. It’s for more technical users. Many of our clients require both types of solutions in their organisation and Squiz Suite means you can choose a balance that best suits your needs.

There is much more to discuss about the Squiz Suite, indeed far more than can possibly be discussed in this brief message. I encourage everyone to attend the Squiz International User Conference on 20th-22nd October in Melbourne where we will dedicate much time to demonstrating what the new products can do and how they can extend your existing MySource Matrix system while saving money at the same time. I guarantee you will be suitably impressed with what you see.

So there are obviously a few things to talk about there.

Is this MySource4?

Squiz Matrix 4.0.0 is not MySource4. MySource4 was just a code-name for our next generation CMS product. Our thinking has evolved from one monolithic product that does everything to a suite of products that both integrate really well and perform one set of related tasks really well. Together, the products in the Squiz Suite form everything we ever wanted in MySource4, and a whole lot more. We have a powerful integration engine, a CMS that makes content editing a joy, an enterprise-grade search engine and a powerful analytics package with goal tracking and A/B testing.

How do I upgrade to version 4.0.0?

You'll upgrade from version 3.28.x to 4.0.0 as you normally would for any major release of Matrix. In fact, the administration interface has not changed at all besides getting a new logo. The real improvements are around the Easy Edit Suite and the integration with the rest of the Squiz Suite. Matrix now becomes your powerful integration engine that provides complex content and web applications to your suite. The EES gives Matrix a user-friendly interface for content editors and reviewers while still allowing administrators to dig into the system and tweak all the settings you are used to.

When can I get it?

We'll be releasing some sneak-peeks of our new products on this blog over the coming weeks. We'll show you some screenshots, some mockups, and give you a bit more information about how the features work and how easy the products are to use.

If you're heading to the Squiz International User Conference this October, you'll get to see pre-release versions in action. From November, you'll be able to download the Squiz Suite and try it out for yourself.

But I liked the name MySource...

If you're finding it hard to get over the fact that the MySource name is fading away, or you just can't bring yourself to remove the "MySource of inspiration" bumper sticker from your car, you'll be happy to hear that we haven't removed all references to MySource in the source code or interface. If it makes you feel better, go ahead and edit some designs using the mysource_files suffix, or print out and read the core/include/mysource.inc file when you're feeling down.

So, how are you guys feeling anyway?

Thanks for asking.

It's a particularly exciting time at Squiz Labs. If we weren't busy enough building one product, we certainly are now that we are building four of them. But even though our development team has been split, our products all work together to form the Squiz Suite and stop our development teams becoming isolated. In fact, our new products are based on a common framework that we will be releasing in the future to allow all developers to create their own products that integrate seamlessly into the Squiz Suite.


,    Permalink for 'Squiz Matrix version 4.0.0 - is this MySource4?'

MySource Matrix Newsletter Issue #290

This week newsletter delivers three exciting features from both our Squiz Labs developers and also our friends abroad, the Squiz UK development team.

First up we have a new feature from the UK devs, allowing assets to be linked as children under Link type assets. The Link asset, developed by the UK devs (v3.24.0), allows users to store both external and internal links as assets within the system. This enhancement can provide a wealth of implementation opportunities - we have included a nifty example involving listing Links and associated Images in an Asset Listing page.

We also have updates on two older features, first appearing in issues #278 and #279 of the MySource Matrix newsletter: Adding a title to images in the Insert Image WYSIWYG tool; and the new AttributesInfo parameter for the SOAP CreateAsset function. Further details and examples are now provided for both of these features.

Two minor enhancements have also been completed this week, in addition to these three features. Continue reading below for more information on all the aforementioned enhancements.

Apart from these additions, our developers have been working on the usual comings and goings around the office: bugs and unit tests. Some of the bugs fixed this week include 'Same search page results nested repeatedly when cache is on', 'Content file not regenerated for cloned snippets' and 'backup script not including db dump if you backup to an explicit location'.

Allow Assets to be Linked Under Link Assets

Due for release in versions 3.28.4 and 4.0.0 (September 6th 2010)

A small enhancement has been added to MySource Matrix's Link asset to allow other assets to be linked underneath it, as children of the asset.

An Image asset linked under a Link Asset

For example, you could create a set of Link assets that each have an associated Image as a child. This could then be useful when listing these Links on an Asset Listing, dynamically displaying the associated images alongside the links, as shown below.

An Asset Listing listing Link assets and associated Images

This feature improves the usability of the Link asset, enhancing its performance so that it is more consistent with the other assets within MySource Matrix.

New Image Title Field in the WYSIWYG's Insert Image Tool

Due for release in version 4.0.0 (September 6th 2010)

A new field has been added to the WYSIWYG' s Insert Image tool, allowing you to specify a title for an image upon insertion.

The Image Title field can be accessed on the Insert Image pop-up. Once you have selected and Image asset, enter a title or description that you wish to display for the image and click the Create Image button.

The Image Title field

This title will be displayed on the front end when a user hovers their cursor over the image, as shown below.

The Image Title displayed on the front end

SOAP: New Parameter for the CreateAsset Function to Set Attribute Values

Due for release in version 4.0.0 (September 6th 2010)

A new parameter has been added to the CreateAsset function (SOAP API Asset Service) to allow the setting of attributes. Previously, only the name of the asset could be set when creating an asset using this function. As such, there was no way to create assets with required attributes, such as a Single Calendar Event asset (Start Time attribute required).

  • AttributeInfo: the attribute information to set for the created asset. As this is a complexType parameter, it takes multiple elements: AttributeName and AttributeValue.

    For example:
    Array('AttributeName' => 'description', 'AttributeValue' => test desc)

The new format of the CreateAsset function is as follows:

<soap:Body>
<ns1:CreateAsset>
<TypeCode>AssetType</TypeCode>
<Name>string</Name>
<ParentID>string</ParentID>
<LinkType>LinkType</LinkType>
 <LinkValue>string</LinkValue>
<SortOrder>int</SortOrder>
<IsDependant>string</IsDependant>
<IsExclusive>string</IsExclusive>
<FileName>string</FileName>
<FileContentBase64>string</FileContentBase64>
<AttributeInfo>AttributeInfo</AttributeInfo>
  </ns1:CreateAsset>
</soap:Body>

No Follow Links on Calendar Pages

Due for release in versions 3.28.4 and 4.0.0 (September 6th 2010)

Web crawlers can sometimes cause sites to struggle in MySource Matrix, traversing large numbers of pages associated with event calendars. This performance reduction is mostly due to the next/previous links on week and month views.

This minor enhancement adds a 'nofollow' relation on these links. This will prevent robots from following the next/previous links, eradicating the performance problems on such calendars.

Improved Handling of Typographical Errors in Layouts

Due for release in versions 3.28.4 and 4.0.0 (September 6th 2010)

Sometimes MySource Matrix will find typos in the layout of an asset, for example, %metadat_F% (rather than %metadata_F%). Usually, in this case Matrix's asset_edit_interface would return an exception, as it could not find the appropriate metadata screen. In some situations however, the system will be stuck in an infinite loop, constructing the xml of the screen interface and flooding the error log till the system times out.

This minor enhancement improves the handling of such errors, so that these rare error loops do not occur.


,    Permalink for 'MySource Matrix Newsletter Issue #290'

MySource Matrix Newsletter Issue #289

The first Monday of each month (release day) is always hectic in the Squiz Labs office and this month was no different. Two new releases of MySource Matrix saw the light of day this week: versions 3.26.7 and 3.28.3. These releases contained 6 awesome new features as well as a hoard of bug fixes - 32 in total! If you are yet to check out these new releases, be sure to make your way to the MySource Matrix download page and have a look.

For the remainder of the week, our development team continued the laborious job of sorting through and fixing reported bugs and known issues. Despite this, we do have one new feature to bring you this week: a new global preference to filter form inputs of front end users. See below for further details on this feature.

Filter Front End User Form Inputs

Due for release in version 3.30.0 (September 6th 2010)

A new global preference has been added to filter form inputs made by users on the front end. This preference will strip script tags, strip Matrix keyword replacements and escape html from user inputs in forms such as Asset Builders and Custom Forms. Such inputs, in rare cases, can affect MySource Matrix's back end operations and may cause unexpected and potentially adverse behaviour. This preference completely eradicates this risk, improving the security of your system (and peace of mind).

This preference can be set through the new Filter Front End User Input field on the Global Preferences screen.

The Filter Front End User Input global preference

When this preference is enabled, user's form inputs on the front end will be filtered accordingly. An example of this is shown below.

The input of a user in the front end is as follows.

Hello %asset_name%.
<p>This is an example of user front end input & script
<script type="text/javascript"> dfx.noDocWriteAllowed("JavaScript example"); </script>
</p>

This input will filtered as shown below.

Hello  .  
&gt;p&lt;This is an example of user front end input &amp script
  dfx.noDocWriteAllowed("JavaScript example");  
&gt;p&lt;

As shown, the %asset_name% keyword replacement and JavaScript tags have been removed, and the special characters (&, < and >) have been converted to HTML entities.


,    Permalink for 'MySource Matrix Newsletter Issue #289'

MySource Matrix Versions 3.26.7 and 3.28.3 Released

Versions 3.26.7 and 3.28.3 of MySource Matrix have been released today, each containing a number of bug fixes and introducing some impressive new features.

Version 3.26.7 is the latest release of the 3.26.x branch (released in January) and contains 30 bug fixes and 1 new feature. Version 3.28.2 is the latest release of the 3.28.x branch (released in May) and contains 32 bug fixes and 6 new features.

The new features introduced in these releases of MySource Matrix include enhancements to Matrix's contexts system, allowing keywords on alternate contexts to inherit metadata on the system's default context (detailed in issue #285 of the MySource Matrix Newsletter).
MySource Matrix v3.28.3 also sees the addition of a new Trigger action to remove a Workflow Schema (see issue #287), a new function for the Javascript API to create File assets (see issues #286 and #287) and a number of other great features.

To upgrade your system, please follow the relevant upgrade guides on the MySource Matrix website.

You can download these releases on the MySource Matrix download page.


,    Permalink for 'MySource Matrix Versions 3.26.7 and 3.28.3 Released'

Squizlabs

Squiz Labs is the research and development arm of Squiz, the company behind the MySource Matrix and MySource Mini open source content management systems.

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.

Take a look at our product line-up:

MySource Matrix

MySource Matrix is a robust, scalable Content Management solution for the enterprise. It competes effectively with and surpasses the offerings of other CMS's such as Vignette and Interwoven.

Read Articles | Visit Website

MySource Mini

MySource Mini is the next generation CMS from Squiz boasting the first true inline editing experience. Simplicity is the key to MySource Mini with enterprise features as easy to use as common editing tools.

Read Articles | Visit Website

PHP_CodeSniffer

PHP_CodeSniffer is a tool that tokenises and sniffs PHP, JavaScript and CSS files to detect violations of a defined coding standard. It is an essential development tool that ensures your code remains clean and consistent.

Read Articles | Visit Website