by IWR Consultancy
 

Upgrading Hyperframe

Hyperframe has a compartmentalized directory structure, so as to allow easy replacement of individual code sections without having to replace the whole. This makes version upgrades a relatively straightforward task. 

Naturally, before any upgrade job, take a full backup of your website.

Hyperframe is supplied as a zip archive. Expand this into a suitable temporary location.

Important: Do NOT expand the archive into the same location as your existing website.

Rename the codebase directory in your existing site, for example to oldcodebase.

Copy or upload the codebase from the new version.

Replace the .htaccess file in the new codebase with the one from oldcodebase, so as to preserve any server-specific settings.

If you test at this stage, you will probably find that the site works.

Now, examine the plugin directories of the new and old versions, and copy over any plugins which you are using, and which need upgrading. If you have customized any plugins, you might want to retain the configuration files and any custom code from these.

In sitecfg, it is not necessary to replace anything specific, but you might want to add to the existing siteini.php any new settings in the latest version. Don't worry about this if the new settings are not needed, since the defaults will apply for any absent values.

You might then need to check your frame php and css files for old and incompatible code, and for slight styling differences. But, these effects are usually quite small.

If all does not go well, then  renaming oldcodebase back to codebase will in most cases fix that. That really is one of the excellent features of a file-based system - If it breaks, you replace the broken bits and it works again. No domino effect of missing database classes or the like to complicate and confuse matters, just files and files alone.

Version 4

The 4v upgrade process is a little more involved owing to the changes in core code. The above instructions still apply, however the following additional points need to be noted:

You site's frame needs to be relocated, into a subdirectory of frame/, eg  frame/default The siteini.php reference to this should be the subdirectory name only, in this case 'default' instead of 'frame'

The frame.php head section must contain a call to the menu plugin, if standard menus are used:
  <?php include_once plugin('menu') ?>
Without this call, if system menus are used the page will fail to load partway through. It is best placed as the last line in the head section.

Needless to say, if the call is present then the menu plugin must also be copied to the plugin directory.

Optionally, the references to system.js, system.css, frame.js and frame.css can be removed from the frame.php head section, as these calls are now automated. Leaving them in will not prevent the site from loading, but will waste a small amount of server resources. The web icon reference is still required, if one is used.

At this stage the site should work OK, and the majority of the styling should be OK. The area likely to need some restyling is the menus.These now uses a common stylesheet for for top and side menus, plus one or two additions for dropdown styling. The old topmenu stylesheet section can be deleted from frame.css as it no longer has a function. To understand how the new menu styling works it is best to look at one of the example frames in the downloaded package. This change may involve some overhead in upgrading, but it unifies the menu styles and gives you a much wider scope for customization. It also means that you are not obliged to use the supplied menu system at all, if you don't want to. 

Earlier versions

When upgrading from v2 to v3, a point to note is that individual pages may contain outdated methods of centering, captioning or aligning images. For example, placing an image inside a paragraph (or div or table) so that the paragraph's alignment applies to the image, is now a deprecated approach and any such instances should preferably be edited out.

Upgrading CKEditor

New versions of Hyperframe will typically include CKEditor upgrades. However, you might wish to upgrade your copy of CK in-between Hyperframe releases, to take advantage of any new features. This is also a fairly straightforward process.

Download the latest CKEditor from ckeditor.com -If you are not sure which to choose, get the version with all plugins.

On your website, rename codebase/ck to codebase/ckold (or whatever you like)

Create a new ck directory, and place the entire contents of the download in here.

In the new ck, navigate to codebase/ck/plugins.

Copy over the hyperframe plugin in its entirety from the old ck installation. (This is essential as Hyperframe will not run correctly without this plugin)

To retain the special image and link manipulation features of Hyperframe, rename or delete the image and link plugins, and copy the image and link plugins in their entirety, from codebase/ckold/plugins.

That should be all you need to get the new CKEditor running. You will not initially have any toolbar buttons for new features, since these need to be added to the Hyperframe toobar definition in the codebase/ck_config.js file. I'll just repeat that: The configuration file to be modified is in Hyperframe's codebase, not in the one in codebase/ck, which is unused and has no effect. It's done like this so that you can replace your CKEditor without having to worry about any internal config files.

Be careful when modifying ck_config.js, since the syntax is not quite like standard javascript, and locating trivial syntax errors such as a missing comma can be extremely hard without specialist tools. Best to back up your changes progressively as you proceed, then you can roll back to the last good version if an intractable problem arises. 

 

Powered by Hyperframe