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. Upgrade from 2.x to 3.x

Upgrade from 2.x to 3.x

Skins Upgrade

b2evolution 2.x skins should work in b2evolution 3.x without modification. (see below if you have issues with the menu bar)

However, if you want to take advantage of all the new features in b2evolution 3.0 you may need to add a few skin tags to your skin.

Note: as of b2evo 3.1.0-beta, not all skins that are packaged with b2evo include the following. This will be fixed in the stable release.

Featured/Intro post

See posts.main.php in the evopress skin for an example.

Note: The following procedure requires a lot of code. We will try to package that into smaller code for the stable release. The following is valid code though.

Locate this section in your *.main.php skin file:


  <?php
  // Display message if no post:
  display_if_empty();

  while( $Item = & mainlist_get_item() )
  {	// For each blog post, do everything below up to the closing curly brace "}"
  ?>

This is where the loop of posts starts.

In order to display featured or intro posts, you need to add the following before the code above, like this:


<?php
// -------------------------- BEGIN FEATURED/INTRO POST ---------------------------
// Go Grab the featured post:
if( $Item = & get_featured_Item() )
{
	?>
	<div class="featured_post">

		<?php
			$Item->edit_link( array( // Link to backoffice for editing
						'before'    => '<div class="floatright">',
						'after'     => '</div>',
					) );
		?>

		<h2><?php $Item->title(); ?></h2>

		<?php
			if( $Item->is_featured() )
			{	// Featured post, display extra info: (as opposed to intro posts which are also displayed here):
				?>
				<small>
					<?php
						$Item->issue_time( array(
								'time_format' => 'F jS, Y',
							) );
					?>
				</small>
				<?php
			}
		?>

		<?php
			// ---------------------- POST CONTENT INCLUDED HERE ----------------------
			skin_include( '_item_content.inc.php', array(
					'image_size' => 'fit-400x320',
					'force_more' => true,
				) );
			// Note: You can customize the default item feedback by copying the generic
			// /skins/_item_feedback.inc.php file into the current skin folder.
			// -------------------------- END OF POST CONTENT -------------------------
		?>

		<?php
			// List all tags attached to this post:
			$Item->tags( array(
					'before' =>         '<div class="posttags">'.T_('Tags').': ',
					'after' =>          '</div>',
					'separator' =>      ', ',
				) );
		?>


		<?php
			if( $Item->is_featured() )
			{	// Featured post, display extra info: (as opposed to intro posts which are also displayed here):
				?>
				<p class="postmetadata">
				<?php
					$Item->categories( array(
						'before'          => T_('Posted in').' ',
						'after'           => ' ',
						'include_main'    => true,
						'include_other'   => true,
						'include_external'=> true,
						'link_categories' => true,
					) );
				?>

				<?php
					$Item->edit_link( array( // Link to backoffice for editing
							'before'    => ' | ',
							'after'     => '',
						) );
				?>

				<?php
					// Link to comments, trackbacks, etc.:
					$Item->feedback_link( array(
							'type' => 'feedbacks',
							'link_before' => ' | ',
							'link_after' => '',
							'link_text_zero' => '#',
							'link_text_one' => '#',
							'link_text_more' => '#',
							'link_title' => '#',
							'use_popup' => false,
						) );
				?>
				</p>
				<?php
			}
		?>

	</div>
	<?php
}
// ---------------------------- END FEATURED/INTRO POST ----------------------------
?>

<?php
// Display message if no post:
display_if_empty();

while( $Item = & mainlist_get_item() )
{	// For each blog post, do everything below up to the closing curly brace "}"
?>

What if the new menu bar doesn’t work?

The menu bar is not typically part of the skin so it should work with any skin, including third party skins.

CSS for the menu

The first thing to try is to reload the page several times (until the cache clears) or try on another browser. Most issues only appear the first time you try to load the menu after you upgrade.

If that doesn’t work, it is very likely that the skin you are using is using some dirty CSS tricks (like !important) that tamper with the menu styles.

The CSS styles for the menu are located in /rsc/css/basic.css

Javascript for the menu

The menu is included through the _html_header.inc.php file. Again, this file is not typically part of a skin. However if your skin requires to have this file, here is what you need to know:

In version 2.x you had this:


global $xmlsrv_url;

require_js( 'functions.js' );
require_js( 'rollovers.js' );

skin_content_header();	// Sets charset!

In version 3.x you should now have:


global $xmlsrv_url;

add_js_for_toolbar();		// Registers all the javascripts needed by the toolbar menu

header_content_type();	// Sets charset!

Note that the menu can work without javascript on most modern browsers. It will just be a little less fancy. So you can try to remove add_js_for_toolbar(); and see what happens.

Removing the menu

If for some reason you decide you’re better off without the evobar menu, comment out add_js_for_toolbar(); as said above and also comment out the following line:


// ---------------------------- TOOLBAR INCLUDED HERE ----------------------------
require $skins_path.'_toolbar.inc.php';
// ------------------------------- END OF TOOLBAR --------------------------------
Created by fatimahnasra • Last edit by fplanque on 2020-06-09 00:24 • •

No feedback yet

On this page

  • Skins Upgrade
  • Featured/Intro post
  • What if the new menu bar doesn’t work?
  • CSS for the menu
  • Javascript for the menu
  • Removing the menu

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
powered by b2evolution

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