Blogs by author "dleffler"

New Bootstrap3 Dynamic/Drag-n-Drop Form Designer

New Form DesignerThe new v2.3.8 Patch #4 contains an updated form designer for Bootstrap 3 based themes (sorry we're still running into issues on the non-Bootstrap 3 themes). This allows for much easier and quicker form creation and editing. Whereas the previous interface required going back and forth through various screens (page loads), everything now takes place on the main form designer page with updates being performed in the background. What's more...the form designer looks and operates very similar to the previous version.

To add a new control to the form: you simply select a control from the list of controls to the right (or you can change the theme style to place this list on the left if you use a left sidebar) and drag it onto the form in the location you wish to place it. This opens a dialog on the page to enter the details about that control...or you may cancel the action to add the control.

To move a control to a new location: you simply select the control and drag it either up or down and drop it into it's new place.

To remove a control from the form: you can simply select the control and drag it into the trash can above the list of available controls. You may also remove a control by clicking on the red 'delete' button on that control.

New Form Designer​To edit a control on the form: hover over the control and click on the 'edit' button to bring up the control details.

Some other new features include a button to remove the 'design grid' from the display to provide a better idea of what the form will actually look like (this feature is also available on the non-Bootstrap 3 form designer). We've also added a 'switch styles' button to switch between the two basic form styles of having the label above the control or the labels to the left of the controls

All in all this should be a great improvement for those users dealing with the form module.

About the author

Dave Leffler
Exponent CMS Developer

PHP and Exponent in 2016

PHP LogoThe primary scripting language used in Exponent CMS is PHP, just as with most other CMS packages such as W***P****, J***la, and D***pal. PHP is a scripting processor running on the web server which parses the PHP scripts to perform a task or output a page. Unlike javascript which is processed within the browser on the viewer's device. PHP development has been advancing at break-neck speed over recent months, and here's how it affects Exponent CMS.

Exponent CMS v2.0 was originally released supporting PHP version 5.2.1 or later, which at the time was v5.3.x. Support for PHP v5.4 was added in Exponent v2.0.7. Support for PHP v5.5 was added in Exponent v2.2.1. Support for PHP v5.6 was added in Exponent v2.3.1. Support for PHP version 5.2.x was DROPPED in Exponent v2.3.2 because several of the supporting libraries no longer supported such an old version of PHP. And support for PHP version 7.0, the current stable release was added in Exponent v2.3.7.

Most site administrators have little control over which version of PHP their web host server is running, but some hosts do offer a selection within their 'control panel' settings. Therefore, you have to trust your web host provider in keeping your PHP versions up to date since many of the updates remove security vulnerabilities. PHP version 5.2.x has been obsolete for quite some time. PHP version 5.3.x was termed 'end of life' meaning it was no longer updated in August 2014. PHP version 5.4.x was termed 'end of life' September 2015 and PHP version 5.5 reached 'end of life' a few months ago. With that being said, PHP versions 5.6.x and v7.0.x are the only recommended and supported versions available, both of which will be supported until at least late 2018. PHP version 7.1.x should be released before the end of 2016 and is in beta testing now.

Therefore, if you have a new enough version of Exponent to support a newer version of PHP, you should probably encourage your web host provider to move to it to prevent security attacks from harming your site or data. Furthermore, running PHP v7.0.x will give your site a tremendous speed increase because it is so much more efficient. The next version of Exponent (v2.3.9) will be released in a few days and supports PHP versions 5.3.x, 5.4.x, 5.5.x, 5.6.x, and 7.0.x and likely supports 7.1.x though testing isn't complete. You can expect Exponent to drop support for PHP v5.3.x very soon, with v5.4.x support not being provided too much longer either.

About the author

Dave Leffler
Exponent CMS Developer

Making your Custom Theme more Accessible

We're recently added better 'accessibility' support to Exponent so it may be used with a screen reader. This is mandated with some public website due to the Americans with Disabilities Act. While the code shipped with Exponent v2.4.0 includes these changes, they may need to be integrated into your custom theme. Though you can check your theme/subtheme templates and custom views with the ones we ship, here are some things to look for:

  • The theme/subtheme templates must contain a 'language' in the html tag
    • from
      <html>
      to 
      <html lang="<?php echo (substr(LOCALE,0,2)) ?>">
  • any {img ...} tag found in any template view (.tpl file), must include a 'alt=xxx' entry
  • any button or input area with NO label, or any with only an icon must include 
     aria-label="{'button label'|gettext}"

While this is not an all-encompassing list, it will get you through most of the errors that an accessibility plugin for your browser would report

About the author

Dave Leffler
Exponent CMS Developer

PHP and Exponent in 2017 (and Browsers too)

PHP LogoThis article is a follow up to PHP AND EXPONENT IN 2016. Roughly one year after that previous article, PHP development is proceeding at breakneck speeds and we have seen two minor versions pass (though v7.2 is in release candidate status). Here's how it affects Exponent CMS.

The current release of Exponent (v2.4.1) is compatible with PHP v5.3 through v7.1. However, it is not compatible with PHP v7.2 (this will be corrected in the v2.4.2 release). The next release of Exponent (v2.4.2) will be compatible with PHP v5.5 through v7.2. We'll drop support for PHP v5.3 and v5.4 in that release because they are simply too insecure and should not be used in a production environment. And even though we will support PHP v5.5 in the next release, it is no longer recommended for production use since it was marked 'end of life' over one year ago. PHP v5.6 and v7.0 will be supported by their organization through the end of 2018, at which point only PHP v7.1 or later would be recommended. Another reason to remove old PHP version support in Exponent is that many of our 3rd party libraries simply no longer support ancient versions of PHP.

While we're on the subject of obsolete software, many browser software versions have also been termed 'end of life' and it is strongly encouraged they NOT be used! This would include Internet Explorer versions less than v11 (Edge in Windows 10 is considered Internet Explorer v12/v13). A beneficial side effect to this is that recommended browser versions are all now HTML5 compliant...which means that Exponent shouldn't need to use patches/tweaks to support HTML5 non-compliant browsers.Therefore, in the near future (though not in v2.4.2), we will drop support for obsolete/ancient browsers, which in turn should speed up page loading a bit.

About the author

Dave Leffler
Exponent CMS Developer