Skip to main content
recent posts in info center Started by Jorin · · Read 31738 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

recent posts in info center

Is it possbile to modify ElkArte so there are not recent posts in the info center but recent topics?

Re: recent posts in info center

Reply #1

Sure its possible ...

I believe the reason it shows only teh posts is that is easy to generate.   Recent topics is bit more of a complex task,  taking more db queries and CPU to generate the list.  Thats fine for occasional views, but on your main page it may eat up resources depending on how busy your site is and what server resources you have available. 

Maybe @emanuele has some thoughts on this, we could add it or perhaps a quick addon.

Re: recent posts in info center

Reply #2

An addon would be great!

Re: recent posts in info center

Reply #3

I frequently feel that the "recent posts" is a bit useless, especially when several replies to the same topic are listed.
Bugs creator.
Features destroyer.
Template killer.

Re: recent posts in info center

Reply #4

Exactly. Plus: You have a link in info center to the latest posts which makes the recent posts list a bit more useless.  ;)

Re: recent posts in info center

Reply #5


I agree with him. I would also prefer the recent topics listing. :)

Re: recent posts in info center

Reply #6

Not tested much, it should mostly work.
I know it says "recent posts" and not "recent topics", but I didn't care to add a language file to tweak the string for the moment, maybe later.

In terms of performance it may even be slightly faster if I didn't mess up with EXPLAIN.
screen_289 is the topics query, while screen_290 is the posts query.
At least the filesort in this case is done on 100 rows and not thousands. Am I wrong?

ETA: package removed, latest version is here
Last Edit: February 24, 2015, 05:42:24 pm by emanuele
Bugs creator.
Features destroyer.
Template killer.

Re: recent posts in info center

Reply #7

Makes me think there is something wrong with the current query, but maybe it is also a pig!

Re: recent posts in info center

Reply #8

I think it sort of make sense: in the current one it has to check every single message, in the other one it gets only the topics on which I LEFT JOIN'ed the messages table on id_last_msg.

I uploaded the code and the query is here:
https://github.com/emanuele45/RecentTopics/blob/master/RecentTopics.class.php#L62 (basically a copy of getLastPosts LOL)
Bugs creator.
Features destroyer.
Template killer.

Re: recent posts in info center

Reply #9

Well more useful and less overhead, seems like that should be the 1.01 default and the current the addon (or just have both in the core)

Re: recent posts in info center

Reply #10

I guess adding it to the core is not that difficult, a bit of testing before would be nice, though.

We can save that for 1.0.2 around December. O:-)
Bugs creator.
Features destroyer.
Template killer.


Re: recent posts in info center

Reply #12

I think we forgot to add this to 1.0.2 ... I don't think it was in github tracker  :'(

Re: recent posts in info center

Reply #13

Oh no! My users love to see the recent topics on top of the board not the recent posts at the bottom.  :(

 

Re: recent posts in info center

Reply #14

Well, there is a package over there. :P

Actually the package places the list at the bottom, not at the top...
Bugs creator.
Features destroyer.
Template killer.