Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
267 views
in Q2A Core by
I want questions to show the time they were created and not when they were moderated (so that all questions don't show being created at the same time in the morning). I see this was a change made in the last version, but I'm having a heck of a time figuring out the convoluted way that posting is done.

Where would I find the code that changes the create date when moderation is done?
Q2A version: 1.5.4
by
As a note, I think it would be a good idea to have a time field in posts that is updated whenever anything related to the post is done so that you can easily sort based on the latest  answer, comment or edit. It's way too messy without such a field, and usually you want the newest stuff to float to the top, particularly if you have a latest activity box in a sidebar or something similar.

3 Answers

0 votes
by
Version 1.6 introduces an option to set this either way.
by
Are there separate options for questions and answers? Personally I would prefer to keep answers with their original time but questions with their approval time so they show up first on the list.
0 votes
by

If you want to change this in Q2A 1.5.4, look for qa_db_post_set_created(...) in qa-app-post-update.php and comment it out where it appears.

by
Thanks. That's what I needed. Who would have thought to look in the set_hidden routine?
+1 vote
by
Just to update what I ended up doing with this, if anyone else is interested.

I wanted to sort questions based on the last answer or comment made on the original question. So I added a last_activity field to qa_posts, and whenever an answer or comment is posted I update the field. Then I can sort questions in the sidebar based on the newness of the entire thread.

Something that would be helpful for this would be an original_postid field. As it is, I have climb the parentids to find the original question

It saves from having to do a complicated query to find the latest something. Just made more sense to add a field to posts.

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.

April 20, 2021: Q2A 1.8.6 released!

Categories

...