EllisLab text mark

Developer Preview Expanding

The Developer Preview program is expanding today to allow more developers to work directly with Ellislab, with these three basic changes:

  1. ExpressionEngine Reactor is officially closed
  2. The Developer Preview is now open to anyone with a publicly available add-on and an ExpressionEngine license
  3. Security reporters with a valid security report will be admitted to the developer preview

About two and a half years ago, we added ExpressionEngine Reactor as a supplement to our five year old Developer

Continue Reading

ExpressionEngine 2.9.0 Released

ExpressionEngine 2.9.0 has been released and includes new features and bug fixes. Discussion Forum 3.1.16 and Multiple Site Manager 2.1.7 are also available as maintenance releases. Here’s a look at what’s new.

New Conditionals Parser

Template Routes, advanced.

The main story for 2.9.0 is the new conditionals parser. With this new parser, we’ve been able to boost performance, ensure conditionals behave more consistently when written in different ways, and added more power. Here’s a quick summary:

  • Conditionals

Continue Reading

Better Edit Entry Links

{if logged_in_group_id == 1}
    
<a href="{cp_url}?/cp/content_publish/entry_form?channel_id={channel_id}&entry_id={entry_id}">Edit Me</a>
{/if} 

This little codeblock is probably familiar to anyone who has built an ExpressionEngine site and wanted a quick link on the front end to edit a published entry in the control panel. Simple enough if a little clunky.

When you’re running MSM, however, you may have seen this when clicking an edit link if the last visit to your control panel was in a different Site:

An Error Was Encountered

You are not authorized to access this page

Remembering which site you were using last is a convenience feature that 80% of the time is very helpful, but not in this case since the entry may not exist in that site. Workarounds exist, such as hitting refresh on that error page, or using JavaScript to set the last Site ID cookie before clicking through.

We thought this would be better:

{if logged_in_group_id == 1}
    
<a href="{cp_edit_entry_url}">Edit Me</a>
{/if} 

Starting in version 2.9.0, the {cp_edit_entry_url} variable will be available to the Channel Entries tag to build these handy links, and it will play nice with MSM to boot, switching you to the correct site to edit that entry.

Continue Reading

New Conditionals Parser in 2.9

In 2.9 we rewrote the conditional parser. It is more performant, more consistent, and has new operators.

Performance
{if segment_3 == 'books'}
    {exp
:channel:entries channel="book_reviews" limit="5"}
        {title}
    {
/exp:channel:entries}
{if
:elseif segment_3 == 'games'}
    {exp
:channel:entries channel="game_reviews" limit="5"}
        {title}
    {
/exp:channel:entries}
{if
:else}
    {exp
:channel:entries channel="misc_reviews" limit="5"}
        {title}
    {
/exp:channel:entries}
{
/if} 

Starting with 2.9 conditionals evaluate when ready. When a conditional statement’s variables are known the statement will be evaluated as either TRUE or FALSE. In the above example, when segment_3 is “games” we will remove the other two channel entries tags from the template. Instead of processing 3 channel entries tags and then deciding which one to show, we now determine which tag to process.

Consistency

The distinction between “simple” and “advanced” conditionals is gone. Write your conditionals anyway you want. Put the variable first ({if my_snippet == "awesome"}) or put it last ({if "awesome" == my_snippet}). Use as many if:elseif statements as you desire. Use boolean operators. They are now all evaluated when ready.

New Operators

We have added mathematical operators to our conditionals. In addition to the modulus operator (%) you can now add (+), subtract (-), multiply (*), divide (/), and compute exponents (^) on your numbers. We’ve also added a string concatenation operator (.):

{if segment_1."/".segment_2 == "site/index"

We didn’t stop there. We’ve also added three special comparison operators, inspired by CSS attribute selectors: begins with (^=), ends with ($=), and contains (*=). Using a snippet of “Conditionals in ExpressionEngine 2.9 Rock!” named my_snippet these all evaluate to true:

{if my_snippet ^= "Conditionals"}
{if my_snippet 
$= "Rock!"}
{if my_snippet 
*= "ExpressionEngine 2.9"

We also added a regular expression operator (~) so now you can do this:

{if segment_3 "/^P\d+/"}
    I
'm paginated!
{/if} 

And for good measure we added a boolean not operator (!) so this works:

{if ! (segment_3 "/^P\d+/")}
    No pagination here
.
{/if} 

Or if you prefer:

{if ! (the_droids *= looking_for)

And if you want to ponder a philosophical point:

{if 2B || ! 2B} 

These are some of the major new features of the new conditional parser in ExpressionEngine 2.9. We can’t wait to see what you do with it.

Continue Reading

Kanban Board

Managing a team is hard work made even harder when you work remotely and only know what people are working on when you ask or when they tell you. We’ve used numerous tools that attempt to organize and communicate what each of us is working on: JIRA, Pivotal Tracker, Sprint.ly, Trello, and—currently—GitHub Issues.

Each of these tools has done something different that worked for us at the time with the people we had. I can look back on them and say that while I had frustrations with each and

Continue Reading

Improved License Management

For many years we have heard from agencies about the difficulties they have in keeping track of client licenses for ExpressionEngine. Good record keeping is a necessity, and can be as simple as a spreadsheet with the client’s name and license numbers for ExpressionEngine and any third-party add-ons used for their build. On our end we’ve provided a few things to assist, such as a “Notes” field in the Manage Purchases page with each license that can be used for the client’s name or other identifying information.

Even with these things in place, it’s easy after a few years of ExpressionEngine work to have accumulated so many licenses that some fall through the cracks. Many factors are at play: sheer volume, using a base install and forgetting to update the license, transferring some licenses to clients while maintaining others, etc. A far too common result of these many branching pathways and points for potential license confusion are conversations like this one:

End user: Hi EllisLab, we’d like to upgrade to the latest version, but we don’t know how to access the software on your site.

EllisLab: No problem, what is your license number in Admin > General Configuration? We can help you locate your account.

End user: It’s blank / It says <insert license number that is for a third-party add-on> / <insert valid license number that is not owned by the end user>

EllisLab: No problem, do you know who built your site for you?

End user: Yes but we haven’t been able to contact them / no, nobody still working here remembers who set it up.

At that point we try to help the client track down the developer, sometimes with success, sometimes not. Ultimately the developer simply neglected to key in the license number, forgot to purchase a license before taking the site live, or meant to transfer the license to their client but didn’t. To give a sense of scale to the problem, in just the last year clients have collectively experienced almost three years of waiting (25,394 hours) while sorting out their license ownership with all parties involved.

To try to address these challenges more directly, starting in ExpressionEngine 2.9, the Software License number has been moved to its own section of the control panel, and we’ve added a field to help clients (and EllisLab) know who to contact if they have questions about their license.

software license page

Note that this contact email address doesn’t have to be associated with your EllisLab.com account, as this is more for your client’s benefit down the road. In the example above, we’re taking advantage of plus addressing in the email address to use one account but still readily identify the client. If the information on this page is for some reason blank (due to using a base install, or removed from config), the control panel will prompt you to fill in that information to properly register your software. This registration information gets sent to EllisLab1 and when you are logged in, is displayed for you next to the license and your existing notes.

license use info

You will be able to see where the license is in use, as well as the last time the ping occurred. Using this information, you can monitor your clients’ sites by taking a quick glance at your Manage Purchases page and ensure none of your clients have a site that’s been down for months. E.g.: if you see a client site that hasn’t sent a ping in six months, it could be a sign that they need you for some services.

EllisLab has always taken a soft approach to license registration so we treaded very lightly here. You will never be locked out of your software nor will the behavior and output of your site be impacted by this in any way. But now agencies, freelancers, and clients are assured to have reliable information keyed in prior to launching their site, and readily on hand for managing their ExpressionEngine licenses down the road.


  1. We also include the server IP, domain name, ExpressionEngine version, and PHP version. Having that version information allows us to make more informed development decisions, and rather than have a separate ping, we are piggybacking this one for performance. Further, this ping only occurs in the control panel on select pages and with a two week cache, so it will never interrupt the use of your site, your content authors, or your site visitors. 

Continue Reading

“View All” Pagination, Part 2

A while back, [we showed you a way][1] to display your paginated entries on one page in addition to the paginated pages. It was pretty simple: if the correct segment is set to all, show all of the entries using the same embedded template we use to show one entry.

{if segment_2 == 'all'}
    {embed
='quotations/_entry' limit='30' paginate=''}
{if
:else}
    {embed
='quotations/_entry' limit='1' paginate='bottom'}
{
/if} 

It’s a handy tip and it’s still viable. However, what if you wanted to display those pages slightly differently?

Continue Reading

ExpressionEngine 2.8.2 Developer Preview

Late last week we released a Developer Preview for ExpressionEngine 2.8.2. Being that it’s a maintenance release, there should not be any changes required to update add-ons for compatibility.

However, since a few add-ons are still catching up to 2.8, we thought it would be best to open up another Developer Preview to provide an additional opportunity for third-party developers to get help from us and to communicate any issues impeding their add-ons from being compatible.

We are constantly looking at how we can improve how we work with third-party developers to enable their add-ons to be ready simultaneous with an ExpressionEngine feature release. We’ve noticed that some developers are having difficulty being ready on time, and we want to ensure that the pathway for them to communicate with our engineers is clear. So we thought we would create a page in our user guide to make it easier for folks to know about the existing Developer Preview Program, enjoy.

Continue Reading

2.8 User Guide Additions: Advanced Templates

We thought it would be helpful to point out some of the additions and changes to the user guide that came with the release of ExpressionEngine 2.8. Today’s topic: advanced templates.

Relative Dates

Relative date formatting gives even greater control on how you present time-based information. There is a great deal of variety and control at your disposal with the relative date formatting parameters that you may not be aware of. For instance, did you know that the format= and timezone= parameters will take over when your stop= parameter kicks in? Or perhaps you even missed that all of your date variables can now be displayed in any timezone.

Modulus Operator for Conditionals

The modulus operator for conditionals was added in ExpressionEngine 2.7.1 last September, and we blogged about it but whoops! We neglected to add it to the user guide until December.

Multiple search:field= Parameter Clarification

In the example of using multiple search parameters in the Channel Entries tag:

{exp:channel:entries search:style="=ale" search:region="germany|belgium" search:rating="=3|4|5"}

We added the following explanation to help clarify how they will interact:

When using multiple search parameters, all search parameters must be matched in order for an entry to be included. The above example would pull back only those entries where the style is ‘ale’, the region is ‘germany’ or ‘belgium’ and the rating is 3, 4 or 5.

Relationship Namespaced Variables

Did you know that inside a Relationship tag pair that you can namespace and use any variable available to the Channel Entries tag, including switch?

Continue Reading

2.8 User Guide Additions: Developer Interest

We thought it would be helpful to point out some of the additions and changes to the user guide that came with the release of ExpressionEngine 2.8. Today’s topic: advanced items of interest for developers.

System Configuration Overrides

Many of the system and site settings that are stored in the database can be overriden in config files. For power users, this can be handy to modify settings in different contexts. They are now fully documented with the config setting, allowed values, and an explanation of what they are for. This type of configuration is an advanced area of ExpressionEngine that you certainly don’t have to understand or use in order to build a site, but some people like tinkering under the hood and for those people we now have all of these parts documented.

RSS Parser Class

Developers, have you seen how simple it is to create SimplePie objects for working with Atom and RSS feeds? The new RSS Parser class allows you to do that. Say goodbye to Magpie.

Pages Module Warning

As a result of things we have encountered while providing support, we have added a warning against excessive use of the Pages module, to help alert site builders before they head down a long dark path that is difficult to maintain and untangle.

Caching Drivers

ExpressionEngine 2.8 added memory-based caching options, but if you haven’t changed your cache storage settings, you are still using files and disk I/O for caching. Are you up to speed on these new drivers, and what you need to ask your host to enable to take full advantage of them?

If you are an add-on developer, have you updated your add-ons to take advantage of the new Cache Class so that your users are able to benefit fully from utilizing memory-based caching?

Pagination Class

Third-party developers historically were left to their own devices to add pagination to their add-ons, often copying/pasting from first-party modules to do so. This worked okay, but each of our modules had collected slightly different ways of handling pagination, with slightly different featuresets.

So we took our first steps to abstract things out to a useful Pagination library in version 2.4.0. That was refined and improved while it was in use on Channel Entries, Comments, and the Search module. In 2.8.0, we moved all first-party add-ons to the unified Pagination library, and simultaneously released final developer documentation as it is now stabilized and recommended for all developers to use.

Continue Reading