Recent Topics

1 Feb 13, 2006 18:58    

I'm using multiblogs.php as my index on my site, and for the most part I've gotten it working the way I want. One thing I couldn't figure out was how to get each blog in the multiblogs layout to display a specific number of posts. I noticed at the top there was a global setting for this, but I couldn't customize it for each blog. The main reason I want to do this is to display all the links in my linkblog, without increasing the number of posts I'm showing from my other two blogs.

Any help is much appreciated!

2 Feb 16, 2006 15:49

Finally figured it out on my own; multiblogs could bear with a bit more commenting. ;)

Here's the code worth paying attention to, in case anybody else gets stuck like I did:

For the first blog on in multiblogs.php, which is by default laid out normally, the settings are declared in the first part of the file. At the end of these settings are some commented-out lines that say:



# Additionnaly, you can set other values (see URL params in the manual)...

# $order = 'ASC'; // This for example would display the blog in chronological order...

(Unfortunately, the manual, which would have probably saved me much experimentation, is down for me, but that's another story.)

Immediately after, I added the $posts setting, as follows:



# Additionnaly, you can set other values (see URL params in the manual)...

# $order = 'ASC'; // This for example would display the blog in chronological order...

$posts = *NUMBER OF POSTS HERE*;

For the other two (or more) blogs - the "auxiliary blogs," if you will - there's a bit of code for each of them that goes sort of as follows:

$BlogBList = & new ItemList( $blog,	 $show_statuses, '', $m, $w, '', array(), $author, $order, $orderby, $posts, '', '', '', '', '', '', '', $unit, $timestamp_min, $timestamp_max );

As you can see, there's a $posts in there, too... You can simply add a =*NUMBER OF POSTS*, with NO semicolon since its one in a series of settings. For instance, for one of my auxiliary blogs for which I wanted to display 10 posts, I changed the above code to this:

$BlogBList = & new ItemList( $blog,	 $show_statuses, '', $m, $w, '', array(), $author, $order, $orderby, $posts=10, '', '', '', '', '', '', '', $unit, $timestamp_min, $timestamp_max );

Hopefully when the docs are working again the rest of the many settings will be easy to figure out.

3 Oct 26, 2008 16:03

Two years later I just find this article. Thank you very much. I couldnĀ“t figure out how to show up in the multiblogs.php page one article per blog. And the question was already answered.


Form is loading...