Recent Topics

1 Apr 15, 2007 07:28    

My b2evolution Version: 1.9.x

Hi,

Can't seem to find my old post with the solution posted... but how do you do it again to show a list of "10 Recent Posts" after the posts shown on the frontpage?

What I mean is... say I setup the frontpage to show 10 posts per page. Now what I want is to be able to show the "next 10 posts" after the main page, or to say it another way, I want to be able to show the 10 posts of the 'next page' (on a per blog basis, I mean by that, if the user is viewing Blog B, then it will only show the next page of the blog B. If AllBlog, then next page of AllBlogs).

Hope I'm not confusing. It's something similar to wordpress. That way, even if there are lots of posts for a certain day, the other posts which were pushed down to the "next page" (after the frontpage) doesn't lose attention.

Thanks!!

2 Apr 15, 2007 09:32

Here's one solution. Find this bit of your _main.php and add the new bit :-

	<?php
	$arc_temp = $Item->issue_date;
	} // ---------------------------------- END OF POSTS ------------------------------------
	?>

Then, where you want the list add this :

		<?php
		// -------------------------- ARCHIVES INCLUDED HERE -----------------------------
		// Call the Archives plugin:
		$save = $timestamp_max;
		$timestamp_max = mysql2timestamp( $arc_temp )-1;
		$Plugins->call_by_code( 'evo_Arch', array(	// Add parameters below:
			'title' => '',
			'block_start' =>'',
			'block_end' =>  '</div>'."\n",
			'mode' =>  'postbypost',
			'limit' =>  10,
		) );
		$timestamp_max = $save;
		// -------------------------------- END OF ARCHIVES ----------------------------------
	?>

¥

3 Apr 16, 2007 15:05

Hi,

Thanks thanks a bunch! Works great!! :D

4 Apr 16, 2007 17:33

Btw,

Noticed something. Sometimes it shows the previous/next 10 Posts (depending on how you look at it) correctly, sometimes the cut-off is in the middle.

I'm assuming, it is already with b2e's "post/day/page" rule?

Sample -> http://gameshogun.ws/Snow
It starts with post "Hackenslash.net Podcast 9: Interview with Mr. Jojo Anonuevo" instead of: "Pinoy Bloggers Search Engine (PBSE)" which is on the next page of b2e.

Thanks again. :D

5 Apr 18, 2007 10:46

Now that is wierd ... and I have no idea why it's doing it :P

¥

6 Apr 19, 2007 01:58

^_^ np

probably the setting post/day/page.. I noticed, the cutting is off when a single day is spread into two pages because there are many posts in that single day.

7 Jun 05, 2007 11:47

what about pages that doesnt show posts ?
it will not execute this ($arc_temp = $Item->issue_date;) code.

8 Jun 05, 2007 12:01

Just change this line of code :

$timestamp_max = ( empty( $arc_temp ) ? $timestamp_max : mysql2timestamp( $arc_temp )-1 );

¥


Form is loading...