Recent Topics

1 Jan 26, 2007 04:54    

Does anyone know where I can specify the number of post to be displayed on a page. I looked everywhere in 1.9.2 and could not find it.

2 Jan 26, 2007 05:16

Under "App Settings" and the "General" sub-tab. The default is 5 posts per page.

3 Jan 26, 2007 05:23

Thanks, somehow I missed that. But if have several blogs how can you specify that for a specific blog?

4 Jan 26, 2007 13:27

You can create a stufile for all of them and then put this as parameter in the stubfile
$posts=5;

5 Jan 26, 2007 15:29

I there a away also to show the first article as full page using the above mether which solve 1/2 my problem and the second and third page..etc more article, like thsi

If $page =1 {; // or 0
$post =1;
} else {
$post = 6;
}

6 Jan 26, 2007 18:07

I put $post = 1; and it did not work.

7 Jan 26, 2007 18:23

You probably need the "s" added to $post to make it say $posts.

8 Jan 26, 2007 18:34

Assuming you're on about using that code in a stub you'll have the problem that $page isn't defined.

You should be able to create a /conf/_hacks.php that looks something like this but it'd apply to all blogs (as is)

<?php
// if not defind stuff to stop hackers should go here but I'll leave you to look it up

if( $disp == 'posts' && !$page > 1 ) $posts = 1;
?>

¥

9 Jan 26, 2007 18:51

I could put a condition for the blog I want to display one page at a time like this:


<?php
if ($blog == 2) {

// if not defind stuff to stop hackers should go here but I'll leave you to look it up

if( $disp == 'posts' && !$page > 1 ) $posts = 1;
}
?>

But that could be easily accomplished by what Nate suggested above by inserting

$posts = 2;

in the stub file.

I think my problem is solved.

Thank you all.

10 Jan 27, 2007 05:38

Will, I would like to improve on this and make the blog display only one post in the first page and 5 posts on other pages if there are more than post on the blog.

I think if you can give me a hint on which variable or function returns the number of page in a blog, I guess I then could do it in the skin _main.php like this:

If ( $page == 1) {
   $posts = 1;
} else {
   $posts = 5;
}

Would that work?


Form is loading...