News:

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

Main Menu

Changing the order in which posts are listed in a thread?

Started by Dwev, February 19, 2018, 06:53:00 AM

Previous topic - Next topic

Dwev

I want to change the order of posts in a thread on our forum (SMF 2.0.15), and I thought I found the solution in this thread:

QuoteSMF does sort the posts based on their ID because in most cases, older posts will have lower IDs. The only way to change this is to physically change the IDs of the posts in the database, or, if you only want them sorted that way for a specific topic or two, change the code that pulls the details to sort them by date for those specific topics.

But I did this, and there was no effect visible, while it clearly worked. Because when I tried to delete my test message at the bottom after swapping ID's with the first message, I got a warning that it isn't possible to delete the first post. So the post at the bottom had become the first post in the thread, but still wasn't showing on top.

Any ideas?

SaltedWeb

Have you tried searching for a mod, I thought I recalled seeing one that did that not sure what it was called though.

I think I when reading I was not quite sure exactly where you want new posts to show up?
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Kindred

Given th there are frequently multiple tables involved in the display of threads, changing the id in the messages table is not sufficient and is not a good idea.

There really is no way to do what you are asking, easily, within smf
Сл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."

Dwev

So not a mod either?

And what tables are involved?
I changed the ID's in smf_topics, but not in smf_log_topics, guess I should have done both.
But maybe there are more?

And maybe there's a way when you merge topics to give one topic precedence over the other?
I didn't see that option, but maybe I overlooked something?

Kindred

No, there is no such mod and no such option.    Thread order is purely based on id.
  At the very least, smf_topics, smf_messages and possibly other tables...    as I said, it is not a simple thing, and was never designed to be changed, other than oldest first or newest first.
Сл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."

Dwev

Ill explain why I need it, maybe that will lead to a solution (you never know, right?  ;)).

I write daily news on our website, forum members als contribute news, sometimes by messaging me, but much more often by posting it on the forum themselves.

This morning someone did this on our brand new SMF site/forum and people wrote in reply to what he wrote.
But what he posted was just a few lines, not enough for a real news item.

So I wrote a news item about this (with a credit for the member that wrote the first message, not trying to steal his thunder) and I wanted to merge the two threads in a way that my message came first. This didn't work, so the news ended up under his name, with a credit about him at the end of the text.

So a pretty weird situation right now.

One thing I'm thinking right now: would it be possible to change the date and/or the time of a topic?
If I could alter my topic so that SMF thinks that I posted it before, my post would end up on top...

Aleksi "Lex" Kilpinen

Easiest way to do that for a single use case:
Install this http://custom.simplemachines.org/mods/index.php?mod=2626

Edit the posts, including the author, so that they appear correct. :P

( Edit: This wouldn't change the timestamps though... )
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

SaltedWeb

Cool was wondering if there was one...... gonna save it for later in case I ever need that mod.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Aleksi "Lex" Kilpinen

I use that mod to post as an alternate without having to log out/ log in all the time. Pretty handy.
( But dangerous too, it does not limit in any way who you can post as - so strictly Admin stuff. )
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Kindred

Also...  time stamps are not relevant as far as ordering goes. Smf uses postid... not time stamp.

The two are normally directly related
Сл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."

Dwev

Quote from: Aleksi "Lex" Kilpinen on February 19, 2018, 12:00:04 PM
Easiest way to do that for a single use case:
Install this http://custom.simplemachines.org/mods/index.php?mod=2626

Edit the posts, including the author, so that they appear correct. :P

Thanks a lot, totally different approach instead of what I was looking for, but does exactly what I was looking for..!  :D

Quote( Edit: This wouldn't change the timestamps though... )

True, but since I change the author of the first post the change of timestamp isn't needed anymore.

Aleksi "Lex" Kilpinen

Nice to hear :)
Quote from: Dwev on February 19, 2018, 04:55:53 PM
Quote from: Aleksi "Lex" Kilpinen on February 19, 2018, 12:00:04 PM
( Edit: This wouldn't change the timestamps though... )
True, but since I change the author of the first post the change of timestamp isn't needed anymore.
I mentioned that just in case, because sometimes the actual time something was posted may be meaningful too. :)
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Dwev

@ Aleksi: I agree completely, but beggars can't be choosers...    ;)

Advertisement: