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 Skin from 1.6 to 1.8

Upgrade Skin from 1.6 to 1.8

If you already have a personalized skin that works with b2evolution 1.6 and you now want to upgrade it to work with 1.8, then this guide shows you how. Luckily, there’s not much to it.

Head plugin hook

There’s a new plugin hook that allows plugins to add code to the head of the skin (for adding css or javascript). Add the line right after the opening head tag:

PHP

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

Permalinks

Permalinks work differently than they used to. You now have some more choices on how to create the links. This is how it used to be done:

PHP

<a href="<?php $Item->permalink() ?>" title="<?php echo T_('Permanent link to full entry') ?>">
<img src="img/icon_minipost.gif" alt="Permalink" width="12" height="9" class="middle" /></a>

The easiest way to upgrade it is just to change $Item->permalink() to $Item->permanent_url(). But, if you’re using the standard icon and you want your code to look more clean, then change it to look like this:

PHP
$Item->permanent_link( '#icon#' );

That one little function replaces the whole block of code from before.

Author name

The function to output the author name has changed. It used to be like this:

PHP
$Item->Author->preferred_name()

And now it’s like this:

PHP
$Item->author()

View count

When the view count feature was added in 1.6, it looked like this:

PHP

$Item->views();
echo ' '.T_('views');

That didn’t look so good when the post had been viewed once and it read "1 views." So, the views method now outputs the number and the word (with proper pluralization):

PHP
$Item->views();

_feedback.php

There are a lot of changes to the _feedback.php file (too many to list here). If you’re still dragging along a customized _feedback.php file from an earlier version, then it’s probably time to just grab the stock 1.8 file and recustomize it.

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

No feedback yet

On this page

  • Head plugin hook
  • Permalinks
  • Author name
  • View count
  • _feedback.php

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