Focus on 4.2.0

With the recent release of Textpattern CMS 4.2.0 a number of significant enhancements have been made. Since we love to share, we thought we’d give a rundown of the main features and what they mean for you and your sites.

Admin-side themes

You may now alter the look and feel of the admin side and ‘skin’ it to you or your clients’ tastes without having to resort to core hacks. This gives your clients a much more personal experience when using Textpattern.

An admin-side theme is a self-contained folder in the new core theme directory. It can be made up of CSS, images, Javascript/jQuery, and even PHP code if you wish to take advantage of the ability to programmatically alter the admin side.

There are plenty of themes to download and try. Simply unzip the package and upload the folder to your theme directory. Choose a theme from the select list on the ‘Advanced preferences’ panel to apply it site-wide for all your authors to enjoy.

Of course you can tweak those or make your own. There is more detail on creating themes at the user documentation site. If you wish to create and share themes in a more graphical manner, you may install the smd_admin_themes plugin which was developed side by side with the new theme engine to help you manage themes for your authors.

Multi-site support

Out of the box, Textpattern CMS can now be installed once and configured to host any number of websites from that same installation. This may help ease your upgrade workload as you can apply the new version once in order to simultaneously update all sites. Each site continues to have its own database.

Besides the ability to host multiple sites, there are other benefits of a multi-site installation. It is possible to improve Textpattern’s security (as if it wasn’t high enough already!) by moving the admin files out of the standard web root directory and/or protect the admin area with SSL.

There is a detailed README.txt file in the sites directory of your Textpattern install that shows how to set up for multi-site operation.

Enhanced role-based permissions

Textpattern has long since had article permissions so you can permit authors to only modify their own articles. From 4.2.0 onward, this is extended to images, files and links too for additional protection against accidental deletion of key items.

This feature brings about the concept of ‘ownership’ of a set of resources — something we’ll be capitalising on more in future — and thus adds one extra step during the deletion process. When removing any author, all resources that person ‘owned’ must be reassigned to another existing author. You will notice this when you try to delete one or more users from the Users panel; a select list of authors appears for you to choose the new owner.

Toggle states remembered

In prior Textpattern versions, each visit to one of the various admin tabs reset its view to a default. In 4.2.0 each user can have their own preference settings. This applies to plugins as well so the admin side experience can become more customisable and personalised from now on.

One of the benefits of per-user preferences is that Textpattern now remembers key state information in each panel; the sort order you have chosen, and whether you have opened or closed the ‘twisties’ such as the More or Advanced segments of the Write panel.

Previously, a plugin was required for this (the most popular being rss_admin_show_adv_opts). This plugin had a good innings but is now retired and should be removed from your installations in order for Textpattern to function correctly. Other plugins may also try to alter the state of the toggle panes (for example glz_custom_fields and sed_section_fields) so if your pane states are not being memorised, check whether these plugins are activated.

Plugin authors in for a treat

If you’re a plugin developer, the Textpattern platform continues to grow to help you write more efficient, leaner and powerful code:

  • Larger plugins — up to 16Mb — means you have even greater scope
  • Plugins may now react to installation, activation, deactivation, and deletion events, so you can automatically install or remove tables/preferences, for example
  • Plugins can optionally offer a link to their plugin prefs directly from the Plugins panel
  • A slew of new callbacks make up the pluggable UI system. These allow you to alter, extend or replace admin-side widgets with greater ease than ever before. And other callbacks have been introduced to enable you to hook into a large number of places during the execution of both the public and admin sides
  • Better AJAX support through the use of the app_mode URL parameter. Adding app_mode=async to any admin-side event will not output any default admin side markup, allowing you to write your own AJAX-style callbacks in your plugins. The new sendAsyncEvent() javascript function packages this up for you so all you need to supply is the data name-val pairs and an optional callback function to execute when the request has completed

Time handling

Textpattern’s time zone and DST handling has been given a make-over if you have a recent version of PHP (5.2+). DST can now be automatically detected and applied, saving you the hassle of remembering. Time handling has also been made more robust with respect to time zone calculations.

And some more tags

<txp:link_id /> allows you to output a link’s ID, which is incredibly handy for sorting or as a tag-in-tag.

The other change is to allow <txp:output form> to be a container tag and permit parameterized output via the new <txp:yield /> tag. With this feature you can reuse a form and pass different information into it each time it is called. The contents of the <txp:output_form> container is plugged into the given form wherever the yield tag is placed.

Here’s an example for building a crumbtrail. In your form ‘crumbline’:

<ul id="crumbtrail">
  <li><a href="/" rel="home">Home</a></li>
  <txp:yield />
</ul>

Then in each Page template you can construct the elements that are added to the end of the crumbtrail and display them using the same form.

So, on a ‘competitions’ page:

<txp:output_form form="crumbline">
  <txp:if_article_list>
    <li class="last">Competitions</li>
  <txp:else />
    <li><a href="/competitions">Competitions</a></li>
    <li class="last"><txp:title /></li>
  </txp:if_article_list>
</txp:output_form>

The possibilities are immense for reuse and simplification of your Page/Form template interactions.

That’s all folks!

We hope you enjoy this release and the new features enable you to continue creating the dynamic, cutting edge sites that make Textpattern the best choice CMS for site designers.

Comments

  1. the new TXP site design is as HOT as the new TXP 4.2.0.
    thank you for the wonderful updates and sexy site update!!! This really shows what TXP can handle.

    cheers to the team!

  2. I haven’t been to textpattern.com in a while, it definitely was a shock seeing the redesigned site. That plus the new version of textpattern has peaked my interest again!

  3. Finally got around to reading this.

    Boy, I am SO impressed and grateful to all connected with TXP.

    Themes — I knew they were there, just didn’t realise they were so easily implemented and flexible.

    Multi-site — wOw!

    Thanks!

  4. New website looks great and it’s good to see Textpattern continually improving! Thanks!

  5. The new TXP website design is beautiful guys ! I hope a future next release will integrate this theme design for default install, admin, forum and extensions page…it will be sooo…great ! TXP is awesome, many Thx !

Commenting has expired for this article.