WebDev

EhPortal => EhPortal Support => Topic started by: Missy on July 30, 2018, 06:29:42 AM

Title: Recent Post block problem
Post by: Missy on July 30, 2018, 06:29:42 AM
Sorry for disturbing you again but I found a problem with Recent Post block. If I set it to show posts it works fine, but if the set is show topics it's just a mess, it doesn't order them by date, honestly I can't even figure out what is the system for it. Here is a screen shot about the dates.

http://i66.tinypic.com/15iaij5.jpg
Title: Re: Recent Post block problem
Post by: Chen Zhen on July 30, 2018, 06:57:57 PM

Perhaps you have it set to topics?
If you want the most recent to appear then set the block to posts.
You can also select the specific boards you want it to display posts from.
Title: Re: Recent Post block problem
Post by: Missy on July 31, 2018, 09:34:06 AM
Yes, I set it to topics and selected which boards to show. But on my live forum (smf 2.015 with Simple Portal) it works fine also if I set it to topics, not only with posts.

http://i63.tinypic.com/34t4uu8.jpg
Title: Re: Recent Post block problem
Post by: Chen Zhen on July 31, 2018, 09:02:38 PM

For Eh Portal I did not change how it gathers data for recent posts or topics.
Both use the ssi_recentPosts & ssi_recentTopics functions from ./SSI.php.
Unless those were changed, which atm they do not appear to be altered.

If you choose posts from your block settings it should show by data in descending order.

If you choose topics it will show the topic (thread) link but will order it by a topic's last post.
What I mean is it may look out of order because it shows a link to the topic/thread which may have been created in the past but the last post in that topic is recent.

It sounds to me that you should be opting post in the block setting to have it behave the way you want but you are opting topic.
Change the display drop-down to POST.

I put the front page back on this forum to show you an example.
Look at the recent posts block on the right side... it is working properly.

[attach name=sample.png type=image/png]259[/attach]





Title: Re: Recent Post block problem
Post by: Missy on August 01, 2018, 05:44:41 AM
Yes, I know all that but as I said it worked earlier the same way with topic settings, only new replies appeard once in the list (always the last one) no matter how many replies the topic had, beside it didn't show the Re: prefix.

But you are right, there were some changes in the SSI.php which cause the problem. Thanks for your time.
Title: Re: Recent Post block problem
Post by: Chen Zhen on August 01, 2018, 09:45:26 PM

There are some mods that rely on SSI.php functions.
Whenever you want to adjust one of its existing functions, it is best to copy that function and rename it.
From that point you can adjust the renamed function all you want without affecting other mods.
 
EhPortal 1.39.6 © 2024, WebDev