Upgrading from early version 3
In 2011 the structure of the PHP templates was changed to make it easier for people to upgrade when needed. Always ensure you are using the latest version of the templates by downloading them from the WPG Alliance site.
Older template sets (2010 and earlier) had four files:
- page_template: used by all webpages on your site
- config_template: for configuration settings that apply across the whole website
- menu_template: creates your left-hand website menu/s
- feature_template: for features on the homepage of your website (optional)
Newer templates (2011 onwards) have a slightly different file structure
Upgrading to the new template structure
Upgrading involves copying the existing settings of your site into the new template files and then overwriting the old files with the new.
- Download the latest template (from the WPG Alliance site) set and save the files somewhere locally so you can work on them.
- Open the config file currently being used by your website. Copy the values (the bits in quote marks) from the variables in this file and paste them into your local copy of settings_site.php. If you added additional information to $head in your config file (such as a local stylesheet), copy this additional information and insert it into $Extra_Meta
- If you are not making this change in a development environment, open the settings_site.php file and change the value of the variable $BodyBanner to have a single space between the quotes. This will remove the development banner from the top of the page.
- If the config file currently on your webserver is named something other than config.php, update your local config.php file to the same name.
- [If you use features] Open the features.php file currently being used by your website. Copy each feature out of this file and paste them into your local copy of settings_features.php If the features file currently on your webserver is named something other than features.php, update your local features.php file to the same name.
- Open the menu file currently being used by your website. Copy the menu items (the ULs and LIs) from here and paste them into your local copy of menu.php.If the menu file currently on your webserver is named something other than menu.php, update your local menu.php file to the same name.
- Make a back-up copy of the config, features and menu files from your webserver in case you need to revert back to them.
- From your local files, copy config.php and settings_site.php and paste them into the folder where your current config is. Do the same for features.php and settings_features.php and for menu.php.
- [If you use features] Edit the page where the feature is to appear. You need to include the call to the PHP function which displays the feature rotator. Insert the following line after
Note that there are now different types of features you can use. Please see PHP template for features for further details.
printFeaturesOrig(); // ANU window homepage feature