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 1.6.x to 1.8.x

Upgrading from 1.6.x to 1.8.x

Skins

Most skin files are the same, however there are small differences in _main.php.

If you only have small customizations to your 1.6 skin, it may be easier to just take a default 1.8 skin and apply the modifications again. Otherwise, if you want to evolve your 1.6 skin into an 1.8 skin, here are the changes you will need to apply to _main.php:

Content Type

At the beginning of the file, locate this:

if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
?>

and replace with this:

if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
skin_content_header();	// Sets charset!
?>

Also locate this:


<head>
  <meta http-equiv="Content-Type" content="text/html; charset=<?php locale_charset() ?>" />
  <title>

and replace with this:

<head>
  <?php skin_content_meta(); /* Charset for static pages */ ?>
  <?php $Plugins->trigger_event( 'SkinBeginHtmlHead' ); ?>
  <title>

More info: skin_content_header(), skin_content_meta()

Base tag

In the HEAD section, locate this:

<base href="<?php skinbase(); /* Base URL for this skin. You need this to fix relative links! */ ?>" />

and replace with this:

<?php skin_base_tag(); /* Base URL for this skin. You need this to fix relative links! */ ?>

Messages

B2evo 1.8 can display messages like "Your comment has been posted but it will only appear once it has been approved by a moderator". For these messages to appear, you will need to add this code somewhere on your page (presumably at the top, near the call to request_title()):

<?php
  // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
  if( empty( $preview ) ) $Messages->disp( );
  // --------------------------------- END OF MESSAGES ---------------------------------
?>

You might want to look for request_title( ... ) and put the Messages code just before request_title()

Permalinks

Locate all occurences of:

$Item->permalink()

and replace them with:

$Item->permanent_url()

For more information see the technical document for permanent_url(). Alternatively, you may want to use permanent_link() which can create a whole link, not just an URL, in a single call.

Author name

Locate:

$Item->Author->preferred_name();

and replace by:

$Item->author( '', '' );

More info: $Item->author()

Excluding stuff for static pages

Locate:

<?php if( !isset($generating_static) ) { ?>

and replace by:

<?php
  if( empty($generating_static) && ! $Plugins->trigger_event_first_true('CacheIsCollectingContent') )
  { // We're not generating static pages nor is a caching plugin collecting the content, so we can display this block
    ?>

CSS

Optionally, you may want to add the following styles to your custom CSS file:

Style for the messages:

div.action_messages {
margin: 0 2ex;
}

Style for the comment preview button: input.preview. You probably already have a style for submit and reset like this:

input.submit,
input.reset {

If you want to apply the same style to the preview button, just insert it like this:

input.submit,
input.preview,
input.reset {

Same for input.preview: hover

Created by mayhawaii • Last edit by fplanque on 2020-06-09 00:25 • •

No feedback yet

On this page

  • Skins
  • Content Type
  • Base tag
  • Messages
  • Permalinks
  • Author name
  • Excluding stuff for static pages
  • CSS
  • Style for the messages:

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
Secure CMS

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