Upgrade Skin from 0.9.2 to 1.8 Head LineByLine

This page shows a line by line description of the changes to the head generating portion of your _main.php file, and what you need to change to upgrade your skin from 0.9.2 to 1.8. If you do not have any custom tags in your personalized skin you can follow the all in one instructions instead of this page.

The first thing to do is change the line that stops people from accessing your _main.php page directly. In your existing skin find this bit immediately after the initial comments:

You can replace that line with the line that will include plugins for your head section. You should include this bit even if you’re not currently planning on using any head section plugins because you might want to later.

PHP

<?php $Plugins->trigger_event( 'SkinBeginHtmlHead' ); ?>

b2evolution has changed the way your "title" tag is generated, so you will need to change your skin to keep up with the times. In your existing skin find this section:

PHP

<title><?php

$Blog->disp('name', 'htmlhead');

single_cat_title( ' - ', 'htmlhead' );

single_month_title( ' - ', 'htmlhead' );

single_post_title( ' - ', 'htmlhead' );

arcdir_title( ' - ', 'htmlhead' );

last_comments_title( ' - ', 'htmlhead' );

?>

</title>

Now replace it with this section:

PHP

<title><?php

$Blog->disp('name', 'htmlhead');

request_title( ' - ', '', ' - ', 'htmlhead' );

?></title>

Next change the line that makes the base href tag. You need this to make relative links within b2evolution work properly. It is NOT used in the traditional way (to make linking to internal pages easier). Find the following line: