1 chadneu Nov 18, 2005 22:23
3 chadneu Nov 18, 2005 22:49
Okay, to use stub files I just upload it to a folder and then put it into the field right?
4 chadneu Nov 18, 2005 22:51
Woops, I upload it to THE folder of the blog and then I just put $posts=1; , is there anything else?
5 personman Nov 18, 2005 22:59
To use a stub file, put a copy of a_stub.php into your web root, or wherever your blog is and rename it to something like games.php. Add that line I gave you, then you have to change one more line. The one that tells it which blog you want this stub file to display. Also check that the path to the b2evocore that is toward the bottom of the file is accurate.
6 chadneu Nov 18, 2005 23:05
It didn't seem to work. It's still displaying 2 of the posts. (I have 3, but one of them isn't published yet).
http://chadneu.com/Games.php
or http://www.chadneu.com/index.php?blog=8
7 chadneu Nov 18, 2005 23:16
<?php
/**
* This file is a stub file for displaying a blog, using evoSkins.
*
* This file will set some display parameters and then let b2evolution handle
* the display by calling an evoSkin. (skins are in the /skins folder.)
*
* Note: You only need to use this stub file for advanced use of b2evolution.
* Most of the time, calling your blog through index.php will be enough.
*
* Same display without using skins: a_noskin.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 = 8; // 2 is for "demo blog A" or your upgraded blog (depends on your install)
# You could *force* a specific skin here with this setting: (otherwise, default will be used)
# $skin = 'basic';
# 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...
/**
* That's it, now let b2evolution do the rest! :)
*/
require(dirname(__FILE__)."/b2evocore/_blog_main.php");
$posts = 1;
?>
That's the entire Games.php file. Anything wrong?
8 chadneu Nov 18, 2005 23:17
Oh, okay, I got it now. I moved the command up.
Now is there a way I can define only 1 post to be put up there, such as this post.
http://chadneu.com/index.php/Games/2005/11/18/main_menu_games
That's the permalink, the post # is 77.
9 personman Nov 18, 2005 23:18
Hmm. Where did you put the $posts = 1; ? Try putting it right after the $blog = x; line. I just tried that on my site and it worked.
By the way, this will only work when accessing that blog through the stub file (the first url you gave). Going through the index (the second url you gave) will use the index default.
10 chadneu Nov 18, 2005 23:38
Instead of the most recent post being displayed I want a certain one to be displayed, no matter how old it is. How can I do this?
11 personman Nov 18, 2005 23:54
In that case you can take out the $posts = 1; line and replace it with this:
if (!(isset($title))) {
$title = 'main_menu_games';
}
12 chadneu Nov 18, 2005 23:58
Thank you personman!
Big thanks.
In the stub file for that blog you can add
That should do it.