SupportArea

BoltWire is a FREE content management system written in PHP.

Its innovative architecture combined with best-in-class forms processing makes it ideal for creating complex, interactive, web applications fast...


Welcome Tour

Installing BoltWire
Working with Pages
Changing Site Layout
Formatting Content
Advanced Features
Forms and Actions
Extending the Core

BoltWire 5.0 to 6.0 Transition

While we try to make most upgrades in BoltWire painless, major jumps in version numbers, such as the jump from 5 to 6 often involve some complications. We use these opportunities to create deep changes to the core of the code, and not all plugins or custom scripts will transition automatically. This page documents some of the things you will need to consider before switching a site from BoltWire 5.0 to 6.0.

The changes in this jump are relatively small, but they will cause disruptions if you are not careful. And it is complicated by the fact I've gone more than a year without a release. During that time I've been using BoltWire virtually every day and probably made hundreds of trivial fixes and tweaks that did not get documented. So there could be surprizes.

Still, BoltWire 6 is a big improvement, and it will be worth the upgrade. And other than the inevitable minor patches that happen immediately after a big release like this, this version should last you a good long while.

Upgrade Steps

1) Make sure you are caught up on the BoltWire 5 releases. The instructions below don't cover any of the changes leading up to 5.11. For the release history of our entire 5.xx series, click here. You will also want to check out the features flagged as deprecated in version 5. Those have all been expired in 6.0 and should be fixed before upgrading.

2) One of the biggest changes in this release is the elimination of the /e flag in preg_replace calls. That required reworking the entire Markup Table. Which means you will need to update any custom defined markup rules in your plugins and scripts.

If you have a rule without the /e parameter, simply insert the word 'replace' as a new 4th parameter. Here's an example from the markups.php file. Easy enough.

     5.xx   MarkUp('symbols', 'indent1', '/\-\>/', '<blockquote>');
     6.xx   MarkUp('symbols', 'indent1', '/\-\>/', 'replace', '<blockquote>');

If there is a /e parameter, you will want to insert the name of the function called (as a string) into the new 4th parameter, remove the /e, and then rewrite your function to accept the array of matches in your pattern as your input. In some cases, it may be easier to created new helper functions to assign matches to the right input fields of your existing function. Here's another example from the markups.php file.

     5.xx   MarkUp('vars', 'var', '/\{([^~{}()+=*:$ ]+)\}/e', "BOLTvars('$1')");
     6.xx   MarkUp('vars', 'var', '/\{([^~{}()+=*:$ ]+)\}/', 'BOLTMvars');
               function BOLTMvars($m) { return BOLTvars($m[1]); }

If you have trouble with a specific markup rule, consult my examples in the markups.php script or ask for help on the Support Area. And if by chance you have custom plugins that make a direct call to one of BoltWire's markup functions, you should check to make sure those functions are unchanged.

3) Functions are no longer passed the $zone variable as a parameter. Instead, functions that use it should tap into the global $BOLTzone variable. This could throw an error if your custom function is expecting the second paramter.

4) I renamed the global $pageArray variable setup in engine.php for {p1}, {p2}, {p3} etc to $pa. I noticed I was using the same variable name locally in various search functions, and wanted to avoid confusion. So scan your plugins and rework any calls to this variable.

5) Review all your skin html and css files for skin vars. The format needs to change from {var} to {+var+} to work properly. This does not apply to vars in snippets of executable markup in your skin between == and ==. Those are treated as markup and not as skin vars, and should NOT be changed.

These are the only real changes I can think of. Not bad, but enough to cause disruptions if you don't plan your upgrade carefully. Fortunately, they only involve BoltWire scripts, custom plugins, and skin pages, so doing a backup is trivial. Here's my recommend upgrade steps:

1) Download BoltWire 6 and overwrite BoltWire 5 on your local server.
2) Check each of your sites out and make any necessary changes
3) Create a temp folder for each site and download all server scripts, plugins, and skin pages
4) Upload the new scripts, and corrected plugins and skin files
5) Check out each site. If there's a problem, reload the backups you made and revert to 5.xx

If you have multiple sites, put a BoltWire 5 and 6 installation on your server and switch your sites back and forth one at a time by changing index.php. This allows you to focus on one upgrade at a time, and get it right before moving on.

Last, don't hesitate to contact us on the Support Area if you have any questions about any aspect of the upgrade process.