Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Dwev on April 29, 2018, 10:14:56 AM

Title: How can get Recent Posts/Topics to display also older posts?
Post by: Dwev on April 29, 2018, 10:14:56 AM
I'm using SimplePortal to display Recent Posts/Topics and it turns out that it the 'recent' is very strictly defined, so on slower forums it doesn't function at all (so we had to resort to RSS, not exactly ideal).

I asked about this in the support thread of SimplePortal, and I was told that this is actually a function within SMF itself, so I'm turning to you all with the following question:

Is it possible to make 'recent' posts and topics less strict, so that these would show up from slow forums/boards as well?
And if yes, how?
(I can dabble a bit in PHP, but only when told what to do)

Any help would be appreciated, since it's the only thing that isn't functioning right on out forum, all other qualms remaining since the switch to SMF are all minor.
Title: Re: How can get Recent Posts/Topics to display also older posts?
Post by: Sir Osis of Liver on April 29, 2018, 04:00:57 PM
Don't know what you mean by 'strict'?  I have a test forum that's displaying recent posts from Oct 2017 in board index Info Center.  I believe Subs-Recent.php orders posts by id_msg, so it displays last 10 posts regardless of age.
Title: Re: How can get Recent Posts/Topics to display also older posts?
Post by: Dwev on April 29, 2018, 05:14:35 PM
Strict means that definitely nothing like October 2017, posts and topics disappear after a few weeks.

Would it be possible to let me know the code that could be used for this?

SimplePortal can also use PHP-code in it's blocks, so with a bit of luck I can just use that...
Title: Re: How can get Recent Posts/Topics to display also older posts?
Post by: Sir Osis of Liver on April 29, 2018, 05:31:25 PM
The test install is running 2.0.15 Curve, it's core code.  Recent posts are put together in Recent.php and Subs-Recent.php.  If it's not working in the portal, it's a portal problem, or possibly a portal setting.  Can you disable SP and see if posts are displayed in info center?


Title: Re: How can get Recent Posts/Topics to display also older posts?
Post by: Dwev on April 29, 2018, 06:46:36 PM
Just to make sure we're talking about the same thing: this is about a list of recent posts and topics of the forum as a whole, not the links you find in your profile.

Is this what we're talking about?
And if yes, where do I find the output of Recent.php and Subs-Recent.php?
Title: Re: How can get Recent Posts/Topics to display also older posts?
Post by: Sir Osis of Liver on April 29, 2018, 06:50:45 PM
If you look at the info center at bottom of main index of this forum, you'll see 5 recent posts.  Number of posts displayed is set in Admin -> Current Theme.

Title: Re: How can get Recent Posts/Topics to display also older posts?
Post by: Dwev on April 30, 2018, 09:16:13 AM
Thank you, found it.

And if I would want to display that information elsewhere, what code would I use?
Title: Re: How can get Recent Posts/Topics to display also older posts?
Post by: Kindred on April 30, 2018, 11:23:29 AM
what do you mean by "elsewhere"?

On another page?
Use
SSI

ssi_recentPosts