News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How can get Recent Posts/Topics to display also older posts?

Started by Dwev, April 29, 2018, 10:14:56 AM

Previous topic - Next topic

Dwev

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.

Sir Osis of Liver

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Dwev

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...

Sir Osis of Liver

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?


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Dwev

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?

Sir Osis of Liver

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.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Dwev

Thank you, found it.

And if I would want to display that information elsewhere, what code would I use?

Kindred

what do you mean by "elsewhere"?

On another page?
Use
SSI

ssi_recentPosts
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: