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 to b2evolution version 7.x

Upgrading to b2evolution version 7.x

You can upgrade normally but if you are using custom skins, you will need to take care of a few things in order to take full advantage of b2evolution v7.x.

DB upgrade

Many things will be upgraded and optimized, including charsets. Rewriting your whole DB to UTF-8 MB4 (and ASCII where UTF-8 is not needed) may take several minutes.

Therefore, it may be necessary to click "Continue…" during the upgrade process:

Upgrading to b2evolution version 7.x

Custom Site Skin

Note: The default site skins have many configuration options. Try them before deciding whether or not you need to keep a custom site skin.

In v7 the site skin is a skin "almost like any other". b2evolution ships with 4 different Site Skins and you can select any of them for your site in Back-Office > Site > Skin. If you had Site Skin enabled in v6, you will get the default site skin in v7 and if you had a custom site skin, the customizations will be ignored until you upgrade them (see below).

The site skins reside in the /skins/ folder like normal skins (because a skin could be both a Site Skin and a Collection Skin – more evolutions to come along these lines).

Conversely:

  • If you want to make a custom site skin, you should duplicate an existing site-skin in the /skins/ folder and modify it.
  • The files in /skins_site/custom/ are ignored by b2evolution v7.
  • You should delete the complete /skins_site/ folder from your server.

Custom skins

Note: The default skins have many configuration options. Try them before deciding whether or not you need to keep a custom skin.

Your custom skins from b2evolution v6 should generally work in v7 but you will not be able to use the Customizer Mode. If you try it on one of your skins, you will see error messages like this:

Upgrading to b2evolution version 7.x

The cleanest way to proceed with the upgrade is like this:

When you had a container like:

<div class="evo_container evo_container__sidebar">
<?php
	// ------------------------- "Sidebar" CONTAINER EMBEDDED HERE --------------------------
	// Display container contents:
	skin_container( NT_('Sidebar 2'), array(
			// The following (optional) params will be used as defaults for widgets included in this container:

...

	// ----------------------------- END OF "Sidebar" CONTAINER -----------------------------
?>
</div>

Change it to:

<?php
	// ------------------------- "Sidebar" CONTAINER EMBEDDED HERE --------------------------
	// Display container contents:
	widget_container( 'sidebar_2', array(
			// The following (optional) params will be used as defaults for widgets included in this container:
			'container_display_if_empty' => false, // If no widget, don't display container at all

...

	// ----------------------------- END OF "Sidebar" CONTAINER -----------------------------
?>

Custom Containers

If you pay close attention, you may have noticed above that we changed names like NT_('Sidebar 2') to codes like 'sidebar_2'

The common containers, such as sidebar, sidebar_2, menu, etc. will be defined by default but if you have more exotic containers, you need to declare them in _skin.class.php like this:

/**
 * Get the container codes of the skin main containers
 *
 * This should NOT be protected. It should be used INSTEAD of file parsing.
 * File parsing should only be used if this function is not defined
 *
 * @return array Array which overrides default containers; Empty array means to use all default containers.
 */
function get_declared_containers()
{
	// Array to override default containers from function get_skin_default_containers():
	// - Key is widget container code;
	// - Value: array( 0 - container name, 1 - container order ),
	//          NULL - means don't use the container, WARNING: it(only empty/without widgets) will be deleted from DB on changing of collection skin or on reload container definitions.
	return array(
			'front_page_secondary_area' => NULL,
			'item_single_header'        => NULL,
			'chapter_main_area'         => array( NT_('Chapter Main Area'), 46 ),
			'sidebar_single'            => array( NT_('Sidebar Single'), 95 ),
		);
}

API version

Once your skin is upgraded to v7, signal it here:

/**
 * What evoSkins API does has this skin been designed with?
 *
 * This determines where we get the fallback templates from (skins_fallback_v*)
 * (allows to use new markup in new b2evolution versions)
 */
function get_api_version()
{
	return 7;
}

Created by fplanque • Last edit by fplanque on 2020-01-10 02:00 • •

No feedback yet

On this page

  • DB upgrade
  • Custom Site Skin
  • Custom skins
  • Custom Containers
  • API version

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