A Taste of MasterChef hits Squiz Labs
03 Sep
With a number of us being MasterChef fans, we had to try Adriano Zumbo’s V8 cake. For those of you who didn't follow this year's MasterChef Australia competition, the V8 cake is an 8 layer cake comprised of the following layers:
- Vanilla water gel
- Vanilla macaroon
- Toasted vanilla brulee
- Vanilla chiffone cake
- Vanilla ganache
- Brown sugar crumble
- Vanilla almond crunch
- Vanilla dacquoise
And all wrapped in a vanilla crème chantilly!
We looked at the recipe a number of times after ordering the cake 2 weeks ago, noting that it would include titanium dioxide (to give the outside of the cake that white colour) and at least 9 vanilla beans - yes 9!!
And the verdict? Fantastic! Well worth the money if you wanted that special cake for a special occasion. Our hats go off for those MasterChef contestants who made this cake in such a short time. It’s easier to eat this master creation than to make it.
Twitter OAuth Authentication Supported in Matrix
03 SepTwitter announced this week that, as of August 31, all applications using the Twitter API will be required to use OAuth authentication to access a Twitter account. OAuth authentication allows users to approve an application to access their Twitter account without it storing their password. Authorised applications are then listed in the user's Twitter account's client settings. Twitter has stated that this move has been implemented to increase security and provide a better experience for users.

MySource Matrix introduced the Update Twitter Status trigger action earlier this year (v3.28.0). This trigger action posts asset information to a Twitter account and was developed from the outset with OAuth authentication in mind. We believed that the OAuth authentication method provided the best security for our users and Twitter's announcement this week further solidifies this approach.
As this trigger action is already OAuth compliant, Matrix systems using the Update Twitter Status trigger action will not be affected by Twitter's new authentication rules.
MySource Matrix Newsletter Issue #293
03 SepOn Monday (September 6th), versions 3.26.8 and 3.28.4 of MySource Matrix will be released and the developers at Squiz Labs have been gearing up this week in preparation. Some of the exciting new features that will be included are a new setContentofEditableFileAsset function for the JavaScript API and an asset URL keyword replacement for Workflow custom messages. Both releases also contain a number of bug fixes and will be available for download from the MySource Matrix Download Page on Monday.
We also have some exciting new developments this week, most notably the implementation of Mollom's spam prevention service within Matrix. See below for more information on this feature as well as this week's other new developments.
Mollom Spam Prevention Service
Due for release in version 4.0.0 (November 10th 2010)
Mollom is an advanced spam prevention service that analyses the quality of content posted to sites and automatically determines whether this content is unwanted (spam) or legitimate. Image and audio CAPTCHAs are provided for content that Mollom deems inconclusive (or 'unsure'), effectively eliminating the need for the moderation of submissions.

Mollom's service can be configured for use on both Custom Form and Asset Builder pages within Matrix.
Check out the Matrix Fights Spam with Mollom blog post for more information on this new feature and be sure to visit the Mollom website for information on the accounts and pricing plans available.
New Keyword Modifier to Dynamically Supply Asset IDs on Keywords
Due for release in versions 3.26.8 and 3.28.4 (September 6th 2010)
A new keyword modifier has been added that allows you to dynamically supply asset IDs on keyword replacements. This keyword replacement takes the following format:
%assetid_keyword^as_asset:asset_keyword%
This effectively allows you to print the asset information of any asset (whose ID can be retrieved). For example, you may want to display the delivery address of an e-commerce order. You can use the order number keyword replacement to print this information, as follows:
%order_number^as_asset:asset_attribute_delivery_addr%
Proxy Support for the Funnelback Search Page
Due for release in version 3.28.4 (September 6th 2010)
Previously, a Funnelback Search Page would return an invalid response when trying to retrieve data from Funnelback using a proxy server:
Invalid response from the Funnelback server [FNB0002]This feature adds proxy support to the search page, allowing users on a proxy to connect to the Funnelback server.
Best Bets and Contextual Navigation Supported for Funnelback 9.1
Due for release in version 3.28.4 (September 6th 2010)
The release of Funnelback version 9.1 saw a couple of significant name changes:
- Fluster to Contextual Navigation
- Featured Pages to Best Bets
This small enhancement to Matrix updates the tag names for these features to support their functionality in version 3.28.4.
PHP_CodeSniffer 1.3.0RC1 released
03 SepPHP_CodeSniffer version 1.3.0 release candidate 1 has just been uploaded to PEAR and is now available to install. This release has been focused on bug fixing and general stabilising of the architectural changes released in 1.3.0a1, but there were also a few nice features that made it in. Some of the highlights in this release are:
- Support for exclude-pattern tags in ruleset.xml files
- A new --encoding command line argument to fix UTF-8 encoding issues in some reports
- All reported bugs are now fixed
New features have been documented and will be available on the PHP_CodeSniffer documentation page once the documentation regenerates over the weekend. This includes an updated coding standard tutorial and an annotated ruleset.xml file to take you through all the features of this new format and how to use them.
Developers who have built custom coding standards are encouraged to read the 1.3.0 upgrade guide to ensure your standards are ready for the 1.3.0 stable release. No release date is set, but it's a fairly easy upgrade process and doing it early will give you plenty of time for testing.
You can view the full changelog on the PHP_CodeSniffer download page.
Matrix Fights Spam with Mollom
02 SepIn a bid to combat the onslaught of spam that plagues so many websites, MySource Matrix currently offers a CAPTCHA based protection service on forms. When configured correctly, these CAPTCHAs are very effective, although they can often be an inconvenience to legitimate users, in some cases even deterring contributions to your site. On top of these concerns, it has become increasingly apparent that a large quantity of spam today is originating from human employees of spam agencies. In such cases, even the most sophisticated CAPTCHAs do little in the way of protecting your site.
To tackle these issues, Matrix has implemented Mollom, an advanced spam prevention service.

How Does Mollom Work?
Mollom analyses the quality of content posted to websites and automatically determines whether submitted content is spam (unwanted content) or ham (legitimate content). If Mollom is unsure of whether a submission is spam or not, a CAPTCHA will be presented for verification. Both image and audio CAPTCHAs are supported.

Providing a CAPTCHA for inconclusive content effectively eliminates the need for the moderation of submissions.
Mollom boasts a 99.93% efficiency rating and adds that only about 2% of human users are challenged with a CAPTCHA image. These statistics promise to improve the accessibility of sites and maintain a high quality experience for both users and site administrators.
For more information on how this service works, visit the Mollom website.
Mollom Within Matrix
Mollom can be activated on Matrix's External Tools Configuration screen and requires Public and Private keys from a registered Mollom user account. Matrix also offers a Test mode for the implementation process.

Once activated, Mollom protection can be configured for use on both Custom Form and Asset Builder pages. Further spam check options are available on the configuration screen of these assets, including the questions to check and the content that is expected for these questions. For example, if you have a Name question on your form, you can set it as an Author Name question. This indicates to Mollom the type of content that is expected and it will check submissions accordingly.
Below is an example of a Mollom CAPTCHA on a Custom Form.

In this example, both image and audio CAPTCHAs have been displayed and an error message is shown to the user. You can configure the layout of the CAPTCHA through keyword replacements on the bodycopy of your asset. If the user enters the correct CAPTCHA code, their form will be submitted as normal. If they do not, their form will be rejected.
While Mollom's CAPTCHA technology is impressive, it is important to note that most legitimate users will never have to enter a CAPTCHA as their posts will be automatically approved and submitted. This background operation means that your site can remain protected from spam without disrupting the user experience.
How Much Does it Cost?
Mollom offers a standard free service to its customers along with two paid subscription options, Mollom Plus and Mollom Premium.
Mollom's free service caters to sites with up to 100 legitimate posts a day, such as a personal blog or small business site. This service also provides unlimited filtering of spam posts and up to 100 correctly validated CAPTCHAs (i.e. not spam).
Mollom's payment options start from 30 euros a month and offer additional features and support. You can view all the details of Mollum's account options on the Mollom website.
When is it Available?
This feature will be available with the release of Squiz Matrix v4.0.0 due out on November 10th 2010.
The Easy Edit Suite: What's New in Phase 2?
02 SepIt's been over three months since Phase 1 of the Easy Edit Suite was first released. Dazzling us all with its shiny, Mini-esque interface, it has been easy to look past its few shortcomings, most notably the lack of an accessible asset selection function and the ability to create assets. Phase 2 promised to obliterate these limitations and with only a week to go until its release, we have an inside look on whether or not it will deliver the goods.
New Buttons Equal New Functions
When first logging into the Easy Edit Suite, you will notice the inclusion of two new buttons in the toolbar. That's right, folks! These buttons launch the much anticipated Asset Creation Wizard and Asset Finder functions.
These are core EES functions and can be accessed at any time whilst using the Easy Edit Suite. This gives you the convenience of creating assets and navigating your site at a moment's notice.
These functions are also utilised to provide many other additional features that were previously not available to users. This is most notable in the case of the Asset Finder. The absence of an asset selection method in Phase 1 of the Easy Edit Suite meant that asset map reliant operations could not be used within the Easy Edit Suite. With the inclusion of the Asset Finder, a number of these operations are now available, with the ability to support more of these additions in future releases.
A nice little addition is the ability to exit the Easy Edit Suite without logging out of MySource Matrix (In Phase 1, the logout button automatically logged you out of the system). A pop-up is now displayed when the logout button is clicked, giving you the option of exiting the Easy Edit Suite, logging out of the system completely or cancelling and returning to the page you were previously viewing.

Now... Where Did I Put That Asset?
The Easy Edit Suite's Asset Finder allows a user to navigate the assets within a site, locating and redirecting to assets they want to edit. Dynamic asset lineages and displayed child counts mean that navigating even the most complex site is an effortless experience.
In addition, the Asset Finder allows for customisable root nodes via a new option in the EES' configuration file. These assets can be listed directly under your site in the Asset Finder to provide easy access to commonly used areas of your site (for example, the Documents folder in the above screenshot). Not only are sites a breeze to navigate, you can also have the most accessed areas of your site just a few, handy clicks away.
As mentioned before, the Asset Finder not only accommodates easy navigation, but also enables several functions that were not previously available to users. One such function is the Nested Content division.

Another awesome bonus is the ability to create new location links on assets. Previously, users could only delete and change the link type of asset links.

Selecting New Location Link will pop open the Asset Finder, allowing you to select the new parent asset.
The Linking screen also has the edition of link value input fields (shown in the above image) and a new section listing the direct children of the asset.

The Direct Children section displays the details of the asset's children and allows you to re-order these assets and navigate to a child's editing interface or directly to its linking screen.
Asset Creation is a Wiz!
The Easy Edit Suite's new Asset Creation Wizard allows you to create assets anywhere in your site at virtually any time. The Asset Creation Wizard's interface is simple and easy to use, with creatable asset types listed under selectable categories.
While not all assets can be created, the Creation Wizard does cater to a large range of page and file asset types. Selecting an asset type to create will display the Create Wizard screen for that asset, where users can enter the details for their new asset.

The Create Wizard screen has some nifty features including the automatic generation of file asset titles, populated from the uploaded file name; the Show in Menu option, giving users the ability to create assets as either type 1 or type 2 linked assets, and the option of creating assets in multiple locations by selecting multiple parents (the Asset Finder comes in handy here too!).
Once all the required details have been entered, clicking Create will create the asset in the system.
Good Things Come in Threes
Three additional metadata field types have been supported in Phase 2 of the Easy Edit Suite: Date, Multiple Text and WYSIWYG.
These metadata fields work in the same manner as in the Matrix back end: The Date field allows users to enter a date and/or time; the Multiple Text fields allows users to enter a list of values; and the WYSIWYG field allows users to enter rich text via the WYSIWYG Editor.
The addition of these metadata field types means that almost all metadata fields can now be edited within the Easy Edit Suite (with the exception of the Hierarchy and Thesaurus type fields).
So When and Where Can I Get It?
Phase 2 of the Easy Edit Suite will be available for download next week from the EES download page.
New EES users should refer to the installation guide for install and configuration steps. Existing users just need to replace their existing EES directory with the new one in the EES for 3.28.3+ download. No additional configuration steps are required. Please note that you will need to clear your browser's cache to see the changes.
If you have any questions about the EES, or you would like to request a feature or report a bug, please post in the MySource Matrix Support Forum.
Upgrading custom coding standards to support version 1.3.0
31 AugPHP_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.
Squiz Analytics sneak peek - the Dashboard
27 AugWelcome 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.
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.
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.
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.
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.
MySource Matrix Newsletter Issue #292
27 AugMySource 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.

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.

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.

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.

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.

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









