Recent Topics

1 May 01, 2009 05:53    

I've used 'em ever since I've been using b2evo because I thought that was "the way". I think maybe three times I've actually put something in them other than a blog ID. So I'm kinda curious about how much actually can be done with a stub file. Does anyone maybe have a comprehensive list of all the cool stuff one can do with a stub file? Or can we build one here?

# First, select which blog you want to display here!
$blog = 1;

# You could *force* a specific skin here with this setting: (otherwise, default will be used)
$skin = 'custom';

# This setting retricts posts to those published, thus hiding drafts.
$show_statuses = array();

# Here you can set a limit before which posts will be ignored
$timestamp_min = '';

# Here you can set a limit after which posts will be ignored
$timestamp_max = 'now';

# Additionnaly, you can set other values (see URL params in the manual)...
$order = 'ASC';


$blog and $skin seem fairly easy to understand.

Does $show_statuses mean I could do something like

$show_statuses = array(draft,deprected,protected);

then aggregate everything into that one blog so I could quickly see all the non-published posts? I'm figuring it is there for a reason, so does anyone know how to take advantage of that bit?

$timestamp_min and $timestamp_max are for limiting how far back and how far into the future posts get shown from, but since I've never actually used them does anyone have a good example of it? I could see for example saying "after 3 years it doesn't show anymore". That would be changing $timestamp_min to something - right? $timstamp_max is for people who want to put future-dated events out there, but what do you actually put into that variable?

Just curious is all. I'm busy figuring out how to renumber *everything* and I just killed a blog because I forgot all about my stub file ;)

3 May 01, 2009 16:27

$show_statuses is an array. If it is empty, it defaults to:

array( 'published', 'protected', 'private' )

Possible values are:

  • published

  • deprecated

  • protected

  • private

  • draft

  • redirected

  • [/list:u] For example, to show only protected posts:
    $show_statuses = array( 'protected' );

4 May 01, 2009 18:17

$posts, $cat, $catsel ... sure there's one for an array of post_ID's as well ;)

¥


Form is loading...