b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Installation / Upgrade
  3. Upgrade
  4. Instructions for specific versions
  5. Upgrading from version 0.8.2

Upgrading from version 0.8.2

This man page refers to b2evolution version: 0.8.6

As always, it is very wise to do a backup of your current website / blog / database (depending on what you already have) before starting to install something new.

Upgrading templates or skins from 0.8.2

It is important that you understand that the following instructions apply only to upgrading skins or templates from version 0.8.2 to 0.8.6. If you use different versions, there will probably be some changes. The best technique for you to know what needs to be changed from one version to another is using a diff tool (like WinMerge) in order to see precisely what has change from a skin version to another.
Location of the default templates:

In many skins, some feature templates will actually call the default template for this feature. For example, the _archives.php template included the following statement at the bottom:

include dirname(__FILE__).'/../../_archives.php';

With this new version, the default templates have moved from the base folder to the skins folder. Thus, you should replace the above line with the following:

require get_path('skins').'/_archives.php';


The important change is get_path('skins').'/ , changing include to require is optional but makes debugging easier.

You'll need to make similar changes in the following templates: _blogroll.php, _categories.php, _feedback.php, _lastcomments.php, _stats.php.

If you are not using skins but direct templates, you will need to put this calls into your main template.

Either way, do not forget to copy the new default templates to your skins directory. You should also erase the old ones from your base directory.

Note: If you are using customized templates, please use a diff tool (like WinMerge) to check out modifications since your previous version.

New templates

Some new features require new files. You should probably copy the files _bloglist.php and _profile.php to your skin folder.

Main file (_main.php) or main template

Quite a bunch of new features:

  1. . Security improvement. Replace the following line from the search form:
<input type="text" name="s" size="30" value="<?php echo $s ?>" class="SearchField" />

with:

<input type="text" name="s" size="30" value="<?php echo htmlspecialchars($s) ?>" class="SearchField" />
  1. . Security improvement again. Replace the lines:
<meta name="description" content="<?php bloginfo('shortdesc', 'htmlhead'); ?>" />
<meta name="keywords" content="<?php bloginfo('keywords', 'htmlhead'); ?>" />

with:

<meta name="description" content="<?php bloginfo('shortdesc', 'htmlattr'); ?>" />
<meta name="keywords" content="<?php bloginfo('keywords', 'htmlattr'); ?>" />
  1. . This version now supports user profile editing from the blog page. To enable this copy the _profile.php file to your skin folder as told above and enable it by replacing the following block:
<?php // ---------------- START OF INCLUDES FOR LAST COMMENTS, STATS ETC. ----------------
.
.
.
// ------------------- END OF INCLUDES FOR LAST COMMENTS, STATS ETC. ------------------- ?>

with:

<?php // ---------------- START OF INCLUDES FOR LAST COMMENTS, STATS ETC. ----------------
switch( $disp )
{
case 'comments':
// this includes the last comments if requested:
require( dirname(FILE).'/_lastcomments.php' );
break;

case 'stats':
// this includes the statistics if requested:
require( dirname(FILE).'/_stats.php');
break;

case 'arcdir':
// this includes the archive directory if requested
require( dirname(FILE).'/_arcdir.php');
break;

case 'profile':
// this includes the profile form if requested
require( dirname(FILE).'/_profile.php');
break;
}
// ------------------- END OF INCLUDES FOR LAST COMMENTS, STATS ETC. ------------------- ?>

You will also need a link for the user to access the profile form. Actually, we have a whole set of new links. Here is how to roll them in. Replace these two old links:

<li><a href="<?php echo $pathserver?>/b2login.php">Login</a></li>
<li><a href="<?php echo $pathserver?>/b2register.php">Register</a></li>

with these five new ones:

<?php
user_login_link( '<li>', '</li>' );
user_register_link( '<li>', '</li>' );
user_admin_link( '<li>', '</li>' );
user_profile_link( '<li>', '</li>' );
user_logout_link( '<li>', '</li>' );
?>
  1. . Locales support: Replace the line:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">

with:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang() ?>" lang="<?php locale_lang() ?>">
  1. . Charset. Replace the line:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

with:

<meta http-equiv="Content-Type" content="text/html; charset=<?php locale_charset() ?>" />
  1. . The blog list that you may have at the top of your page is now handled by an external template. Replace the block:
<?php // ---------------------------------- START OF BLOG LIST ----------------------------------
.
.
.
} // --------------------------------- END OF BLOG LIST --------------------------------- ?>

with:

<?php // --------------------------- BLOG LIST INCLUDED HERE -----------------------------
require( dirname(FILE)."/_bloglist.php");
// ---------------------------------- END OF BLOG LIST --------------------------------- ?>

and don't forget to copy the _bloglist.php file to your skin folder as told above.

  1. . Localization support. If you want strings to be localized, you will need to enclose them in T_(...). For example, replace the lines:
case 'comments': echo " - Last comments"; break;
case 'stats': echo " - Statistics"; break;
case 'arcdir': echo " - Archive Directory"; break;

with:

case 'comments': echo ' - ', T_('Last comments'); break;
case 'stats': echo ' - ', T_('Statistics'); break;
case 'arcdir': echo ' - ', T_('Archive Directory'); break;

You will need to change this is several places of your template to have it fully internationalized. If needed, please use a diff tool to identify them all.

_calendar.php

You can remove the line:

$Calendar->set( headerabbrlenght, 3 ); // length of the shortened weekday

It is not used any longuer. The short forms for weekdays are now defined in the language files.

New template features

Check out the custom skin and copy out the features you want ;-)

Created by fplanque • Last edit by fplanque on 2018-11-03 21:16 • •

No feedback yet

On this page

  • Upgrading templates or skins from 0.8.2
  • New templates
  • Main file (_main.php) or main template
  • _calendar.php
  • New template features

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
    • New Installation
    • Upgrade
      • Manual Upgrade Procedure
      • Auto-Upgrade Procedure
      • After Installation / Upgrade
      • Automated Install / Upgrade
      • Upgrading Evoskins
      • Unexpected SQL Error during upgrade
      • Upgrading your database to UTF-8
      • Instructions for specific versions
        • To version 7.x
        • 2.x to 3.x
        • To version 6.x
        • Upgrade from 0.9.x to 1.8.x
        • 0.9.2 to 1.8
        • 1.6.x to 1.8.x
        • 1.8.x to 1.9.x
        • 1.6.x to 1.8.x
        • 1.10.x to 2.0.x
        • Upgrade from 0.9.x to 2.x
        • Upgrading from version 0.8.0
        • Upgrading from version 0.8.2
        • Upgrade from 0.9.x to 1.10.3 or 2.4rc2
        • Upgrade Skin from 1.6 to 1.8
        • Upgrade Skin from 0.9.2 to 1.8 Support Files
        • Upgrade Skin from 0.9.2 to 1.8 Head LineByLine
        • Upgrade Skin from 0.9.2 to 1.8 Head All
        • Upgrading from 0.9.x to 1.8.x
        • Upgrading from 0.9.x to 1.6 alpha
        • Upgrading from 0.9.0.x to 0.9.1
        • Upgrading from version 0.8.9
        • 0.9.x to 1.6-alpha
    • Configuration files
    • Advanced Setup
    • Migrating from Another System
    • Moving your b2evolution Site
    • FAQ & Troubleshooting (Installation / Upgrade)
    • Assumed User Skills
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Content Mangement System

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque