Upgrades - Appendix v5.3

Below are the template changes in v5.3. You will need to deploy the changes manually if you made template changes and are using a different theme. Note that the details will reference data in the original theme, so you'll need to find the corresponding information in your own templates. Language files should be copied to all language folders and template files to all themes.

New files should be added to your setup from the latest download zip file and where it states to update something, you should refer to the corresponding file in the zip file.
New Files / Folders
content/gallery
content/*theme*/custom-templates/box_related_categories.tpl.php
content/*theme*/fonts/Comfortaa-Light.ttf
content/*theme*/fonts/oswald-cyrillic-400.woff2
content/*theme*/fonts/oswald-cyrillic-ext-400.woff2
content/*theme*/fonts/oswald-latin-400.woff2
content/*theme*/fonts/oswald-latin-ext-400.woff2
content/*theme*/fonts/oswald-vietnamese-400.woff2
content/*theme*/html/captcha.htm
content/*theme*/html/security.htm
content/*theme*/html/staff-link.htm
content/*theme*/html/comments/*
content/*theme*/html/expandable-js.htm
content/*theme*/html/js/plugins/jquery.expandable.js
content/language/english/5.3.php
content/*theme*/html/social/social-meta-google.htm (obsolete, can be deleted)
content/*theme*/html/disqus.htm (obsolete, can be deleted)
content/*theme*/html/social/social-meta-google.html (obsolete, can be deleted)
content/*theme*/images/swipe/* (obsolete, can be deleted)
content/*theme*/images/social-google.png (obsolete, can be deleted)
Stylesheets (CSS)
Note: If the msw.css file doesn't exist, add code to the 'theme.css' file or your main stylesheet.
1 Add the following to 'content/*theme*/css/msw.css':

.msw-box-spinner-left {
  background: #fff url(../images/animated/spin-small.gif) no-repeat 2% 50% !important;
}
.msw-box-spinner-right {
  background: #fff url(../images/animated/spin-small.gif) no-repeat 95% 50% !important;
}
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
}
.video-container iframe, .video-container object, .video-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border:0 !important;
}
2 Add the following to 'content/*theme*/css/plugins.css':

All .expandable directives.
Javascript (JS)
1 Replace the following files:

content/*theme*/js/functions.js
content/*theme*/js/ops.js
If you added any custom functions, these should be copied back to these files.
Template Files
If you are unsure of where to add code, look at the current template set:
1 Open the 'journal.tpl.php' file:

Change:

if ($this->JOURNAL['encomms'] == 'yes') {
to:

if ($this->JOURNAL['encomms'] == 'yes' && $this->JDATA['comments_system']) {
2 In the same file:

Change:

echo $this->JDATA['disqus']
to:

echo $this->JDATA['comments_system']
3 Again, in the same file add the following AFTER the tags if statement:

if ($this->SETTINGS['jcount'] == 'yes') {
?>
<div class="text-right viewcount">
  <?php echo $this->TEXT[2][12]; ?>: <?php echo $this->COUNTER; ?>
</div>
<?php
}
4 Open the 'html/journal.htm' and 'html/private-journal.htm' template files and wrap the {user} variable in 'a' tags:

<a href="{user_url}">{user}</a>
5 Open the 'footer.tpl.php' template file and add the following BEFORE the closing </body> tag:

<?php
echo $this->SEC_TOKEN;
?>
6 Open the 'login.tpl.php' template file and add the following BEFORE the last form-group class:

<?php
echo $this->CAPTCHA;
?>
Language (Update for all language folders)
In versions older than 5.3 you should scan your existing language .php files and change any instances of '$msg_' to '$msw_'. If you don't do this you will see undefined language errors in your installation. There are many free batch update utilities to make this easier. Many text editors can batch find/replace.
IMPORTANT Code Changes
Template changes related to the comments system must be updated in your themes or else the comments will break. If you run into difficulties you might need to copy the default theme and start again.

Also note that the token addition MUST be added to your footer file.
BB Code v WYSIWYG
5.3 sees the introduction of a WYSIWYG editor for better formatting. The system will attempt to identify posts where BB code was used and still parse correctly. If a post contains any WYSIWYG code it will ignore the BB Code option, so if you are editing an old post, you should reformat the whole post for the WYSIWYG option.
Something Missing?
Was a template update not shown here that caused something to break? Please let us know, thank you.
Back to Appendix
Back to Upgrades