XF 2.3 I need some sort of indicator showing the first post in a thread has been edited

Wildcat Media

Well-known member
As part of a custom node I'm working on, I'm wondering if there is a way to put some sort of badge or indicator on a thread in the thread list, if the first post of a thread has been edited (preferably by its author, but I guess if it was a staff/moderator edit, it wouldn't matter). For this node, we probably will be using the article preview style, as the new threads will be articles.

Bonus points if there is a way to retrieve the date that the post was edited. (Maybe by using the post history?) Not essential though.

Yes, I've dumped XF variables before, but that doesn't necessarily mean I understand most of them. 😁 But there must be something in the thread/post info that could be extracted to make such an indicator.
 
You're trying to expose a message template variable in the post template to the thread list item template - you're going to need an addon to expose the variable to the thread template I think.
 
First thing that comes to mind is adding a thread prefix. But that would be a manual process.
There will already be a prefix in use, and yes we do need it to be automatic. It is a very active forum area and our staff is already overwhelmed.

You're trying to expose a message template variable in the post template to the thread list item template - you're going to need an addon to expose the variable to the thread template I think.
That's what I was thinking--the variables for a post are not available in the listing of threads when viewing a node. I would think it needs to get a variable indicating the thread was edited, and also extract a date for when it was last edited, so that could also be displayed.

(A more complicated add-on would either set the edited thread as being unread, or "expire" the "edited" status if the thread is viewed. And in addition, offer a sort filter that sorts threads by the last edit date or, lacking that, the date the thread was created.)

It probably isn't all that difficult, but my coding days have long passed. Even if I found something similar, I could probably dissect it and see what might work.
 
Well it has a Last edited message at the bottom, maybe move it to the top for first post? (And keep it at the bottom as well for those that look there.)
 
Well it has a Last edited message at the bottom, maybe move it to the top for first post? (And keep it at the bottom as well for those that look there.)
I need this on the forum (node) view, so that when members are looking at a list of threads, they can see which ones have been edited. We'll be using article preview mode most likely, so if I can find a way to extract the data and put in an indicator or banner in each preview pane, that would work for what we need. Members browsing the forum would then be able to see which threads have had their first post edited.

As for the individual post in the thread, yep, I can highlight that. That's easy enough to find in the template and move around if I decide to do anything with it.
 
Back
Top Bottom