Powered by MediaWiki
Personal tools

Upgrade Skin from 0.9.2 to 1.8 Support Files

From b2evolution manual

Jump to: navigation, search

This page shows changes you need to make, files you can delete, and files you need to add in order to upgrade your personalized skin from 0.9.2 to the 1.8 version of b2evolution. These changes are only part of the whole! You must also upgrade your skins/skinname/_main.php file according to the information on this page.

All of the other files in your skins/skinname folder have changed! You will need to make the following change to every one of them. Find this line:

Code: OLD core loaded validation
if( !defined('DB_USER') ) die( 'Please, do not access this page directly.' );

Replace it with this line:

Code: NEW core loaded validation
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );


Contents

[edit] _arcdir.php

skins/skinname/_arcdir.php has changed. Replace EVERTHING after the 'core loaded validation' line with this:

Code: NEW _arcdir.php file
/** * We now call the default arcdir handler... * However you can replace this file with the full handler (in /blogs) and customize it! */ require get_path('skins').'_arcdir.php'; ?>

Note that there is no space or return after the closing ?>!!!


[edit] _archives.php

skins/skinname/_archives.php no longer exists. Delete it!


[edit] _bloglist.php

The "require" path has changed. In your skins/skinname/_bloglist.php file find this line:

Code: OLD _bloglist.php require statement
require get_path('skins').'/_bloglist.php';

Replace it with this line:

Code: NEW _bloglist.php require statement
require get_path('skins').'_bloglist.php';


[edit] _calendar.php

skins/skinname/_calendar.php no longer exists. Delete it!


[edit] _categories.php

skins/skinname/_categories.php no longer exists. Delete it!


[edit] _feedback.php

The "require" path has changed. In your skins/skinname/_feedback.php file find this line:

Code: OLD _feedback.php require statement
require get_path('skins').'/_feedback.php';

Replace it with this line:

Code: NEW _feedback.php require statement
require get_path('skins').'_feedback.php';

If you do not require the "common _feedback.php" as above, you'll have to change the names of the comment form fields:

  • comment is now named p
  • author is now named u
  • email is now named i
  • url is now named o

So, e.g. find

<textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea>

in your _feedback.php file and replace it with

<textarea name="p" id="comment" cols="70" rows="4" tabindex="4"></textarea>

Not changing the fieldnames as stated above will result in error messages like "Please fill in your name." and/or "Please do not send empty comments."

[edit] _lastcomments.php

The "require" path has changed. In your skins/skinname/_lastcomments.php file find this line:

Code: OLD _lastcomments.php require statement
require get_path('skins').'/_lastcomments.php';

Replace it with this line:

Code: NEW _lastcomments.php require statement
require get_path('skins').'_lastcomments.php';


[edit] _linkblog.php

The "require" path has changed. In your skins/skinname/_linkblog.php file find this line:

Code: OLD _linkblog.php require statement
require get_path('skins').'/_linkblog.php';

Replace it with this line:

Code: NEW _linkblog.php require statement
require get_path('skins').'_linkblog.php';


[edit] _msgform.php

This is a file that did not exist in 0.9.2, so you will have to add it if you want to allow visitors to send email (without revealing email IDs) via the message form feature. Create and add the following as skins/skinname/_msgform.php:

Code: GROOVY TEXT HERE
<?php /* * This is the template that displays the message email form * * This file is not meant to be called directly. * It is meant to be called by an include in the _main.php template. * To display a feedback, you should call a stub AND pass the right parameters * For example: /blogs/index.php?p=1&more=1&c=1&tb=1&pb=1 * Note: don't code this URL by hand, use the template functions to generate it! * * b2evolution - {@link http://b2evolution.net/} * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html} * @copyright (c)2003-2006 by Francois PLANQUE - {@link http://fplanque.net/} * * @package evoskins * @subpackage custom */ if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); /* * We now call the default message email handler... * However you can replace this file with the full handler (in /blogs) and customize it! */ require get_path('skins').'_msgform.php'; ?>

Note that there is no space or return after the closing ?>!!!


[edit] _profile.php

The "require" path has changed. In your skins/skinname/_profile.php file find this line:

Code: OLD _profile.php require statement
require get_path('skins').'/_profile.php';

Replace it with this line:

Code: NEW _profile.php require statement
require get_path('skins').'_profile.php';


[edit] _subscriptions.php

This is a file that did not exist in 0.9.2, so you will have to add it if you want to enable bloggers to easily manage their subscriptions. Create and add the following as skins/skinname/_subscriptions.php:

Code: GROOVY TEXT HERE
<?php /** * This is the template that displays the user subscriptions editing form * * This file is not meant to be called directly. * It is meant to be called by an include in the _main.php template. * To display a feedback, you should call a stub AND pass the right parameters * For example: /blogs/index.php?disp=profile * * b2evolution - {@link http://b2evolution.net/} * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html} * @copyright (c)2003-2006 by Francois PLANQUE - {@link http://fplanque.net/} * * @package evoskins * @subpackage custom */ if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); /** * We now call the default user profile form handler... * However you can replace this file with the full handler (in /blogs) and customize it! */ require get_path('skins').'_subscriptions.php'; ?>

Note that there is no space or return after the closing ?>!!!

Now back to the page that cover the rest of upgrading _main.php from 0.9.2 to 1.8!