Recent Topics

1 Jul 03, 2005 23:08    

My site is skinned with two different layouts and I wanted b2evo to be viewed in both, I only use one blog (Blog A) and I just want to template it with the main blog, the comments, the author, and the other basics. I have upgraded from the basic b2 and I would like to know how to upgrade the basic b2's template so that I can use it with b2evolution. Thanks.

2 Jul 04, 2005 00:03

Gotta love that manual. http://b2evolution.net/man/2004/06/16/upgrading_from_b2

I'm not sure if there are any errors on it, but if you copy the appropriate bits from the included skins, you should be ok.

Actually, I've spotted one error. For step 2, you should use the following code instead of the code in the manual. I think someone was a bit over zealous with the textile renderer.

Anyway, here's the code


<?php
/**
 * This file will display a blog, WITHOUT using skins.
 *
 * This file will set some display parameters and then display the blog in a template.
 *
 * Note: You only need to use this file for advanced use/customization of b2evolution.
 * Most of the time, calling your blog through index.php with a skin will be enough.
 * You should try to customize a skin before thrying to use this fle.
 *
 * Same display without using skins: a_stub.php
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
 * @copyright (c)2003-2004 by Francois PLANQUE - {@link http://fplanque.net/}
 *
 * @package evoskins
 * @subpackage noskin
 */

# First, select which blog you want to display here!
# You can find these numbers in the back-office under the Blogs section.
# You can also create new blogs over there. If you do, you may duplicate this file for the new blog.
$blog = 2;		// 2 is for "demo blog A" or your upgraded blog (depends on your install)

# Tell b2evolution you don't want to use evoSkins for this template:
$skin = '';

# This setting retricts posts to those published, thus hiding drafts.
# You should not have to change this.
$show_statuses = array();

# You could *force* a specific link blog here with this setting: (otherwise, default will be used)
# $linkblog = 4;

# This is the list of categories to restrict the linkblog to (cats will be displayed recursively)
# Example: $linkblog_cat = '4,6,7';
$linkblog_cat = '';

# This is the array if categories to restrict the linkblog to (non recursive)
# Example: $linkblog_catsel = array( 4, 6, 7 );
$linkblog_catsel = array( );

# Here you can set a limit before which posts will be ignored
# You can use a unix timestamp value or 'now' which will hide all posts in the past
$timestamp_min = '';

# Here you can set a limit after which posts will be ignored
# You can use a unix timestamp value or 'now' which will hide all posts in the future
$timestamp_max = 'now';

# Additionnaly, you can set other values (see URL params in the manual)...
# $order = 'ASC'; // This for example would display the blog in chronological order...

/**
 * Let b2evolution handle the query string and load the blog data:
 */
require(dirname(__FILE__).'/b2evocore/_blog_main.php');


# Now, below you'll find the main template...

?>

3 Jul 04, 2005 01:00

thanks, but it doesn't give me the link for the comments, and also, it gives me this error message when i click the "read more"

Fatal error: Call to a member function on a non-object in /home3/simplie/public_html/skins/_feedback.php on line 52

4 Jul 04, 2005 08:00

Like I said, look at the other skins included with b2evolution. The custom skin is a good place to start off with. I'd make a skin rather than a template, so read the manual page for that. I've not made a template for a year or so now, so if you follow the instructions for making your template into a skin, copy all the files from the custom skin into your new one, the error should disappear.

5 Jul 04, 2005 23:00

Okay, I've spent the past hour trying to figure out everything and it's still not working, I've looked at the _main.php file and copied everything that has something to do with comments, but it still ends up in an error:

(After each post:)
Warning: array_pop(): The argument should be an array in /home3/simplie/public_html/b2evocore/_functions_locale.php on line 139

(After post when you click on the comments link:)
Fatal error: Call to a member function on a non-object in /home3/simplie/public_html/skins/_feedback.php on line 52

Umm, can I just have the code for viewing the comments link and to include the comments(with the form) in when requested? Thanks.

6 Jul 05, 2005 08:11

I don't have any code infront of me, so I can't give it to you.

To be honest, they both look like you're missing files from your installation. You need to include _feedback.php as a case just after the main loop, and the link code is only what it is commented as. I'd check all the files are in the right folders. Make a copy of your skin's folder and re-download and re-upload the files making sure you preserve the directory structure.


Form is loading...