Customization > Custom Coding

Is it possible to make Recent Posts/Topics a little less Recent?

(1/4) > >>

Dwev:
I'm using SimplePortal 2.3.7 on SMF 2.0.15 and I'm very happy with the combination.

But there's is one big but: the Recent Posts/Topics block only shows things that really, really recent, and that doesn't work for all of the forums/boards. Because some are much 'slower' than others, so I can't use Recent Posts/Topics for this.

Is there a way to make Recent Posts/Topics a little less Recent?

By the way, this question has come up multiple times in the support thread for SimplePortal on the SMF forum, but has never been answered there, as far as I can see.

emanuele:
Well, you can change the number of posts/topics to display? (It's among the settings of the block.)
Apart from that, I think the only reliable alternative is to have two different blocks.

Dwev:
@ emanuele: I know that I can adjust the number of posts/topics to display.

But that doesn't help of the code behind it just deems the posts and topics too old and doesn't display them anymore because of that.

I don't understand how two different blocks would help, the code behind them is the same and they both wouldn't display anything.

I think my question is really about adapting some of the code used in this SimplePortal block, and I hope that the coders of SimplePortal are here to answer it (like I wrote before, the support thread on the SMF forum doesn't yield an answer to this problem).

Chen Zhen:

Simple Portal actually uses recent posts or recent topics from SSI.php.
The only allowance with the current coding is the total number of posts or topics to display in descending order from all selected boards.
Due to other mods or functions possibly using those same SSI.php functions it will be necessary to create specific functions for this purpose.

I can do that for you in the form of a plug-in so you do not have to do any editing/coding.
Perhaps it will be best to include 2 additional inputs to include oldest date to query and how many from each board.
This way the list will not be too lengthy in some circumstances.

Does that sound correct?
Am I understanding what you are requesting properly?

Dwev:
@ Chen Zhen: thank you, very, very much for this offer!

To make sure that it's clear what the problem is: when I use the current option for Recent Posts/Topics in SimplePortal it works like a charm, but only of the boards that are included that have very often new posts.

But we would love to have some blocks for 'slow' boards as well, in one of those the latest posts were on the following dates:

7th of May 2018
14th of April 2018
17th of March 2018
17th of March 2018
1st of March 2018
23rd of April 2017
21st of April 2017
26th of October 2016

If I make a new Recent Posts/Topics block for this board it says that there isn't any recent to display, none at all. I would love to have the option to set the period that it should collects posts and topics from, so that it would display posts from the last months, half year of even a bit longer.

I'm sure more people would like this.

Navigation

[0] Message Index

[#] Next page

Go to full version