How to disable the update teaser?
-
@Fastidious Thank you, I have not noticed this item settings.
But there is a small problem: timeago also displays the first message. We need to do so that it displays the latest.
-
@Xen said:
@Fastidious Thank you, I have not noticed this item settings.
But there is a small problem: timeago also displays the first message. We need to do so that it displays the latest.
So you want the timeago to state the last post, but the actual snippet to show the first?
Can't say I'd recommend confusing your readers.
-
Okay. I changed the line:
NodeBB/src/topics/teaser.js at 3c6333606379021917688bac216370a204c1b798 · NodeBB/NodeBB
Node.js based forum software built for the modern web - NodeBB/src/topics/teaser.js at 3c6333606379021917688bac216370a204c1b798 · NodeBB/NodeBB
GitHub (github.com)
on
tidToPost[topic.tid].index = meta.config.teaserPost === 'last' ? 1 : counts[index];
Now when you click the teaser is the last message.
BUT
He shows the time first message. -
@Fastidious said:
@Xen really do not recommend messing with files that will be overwritten with the next update.
This, if you want to edit this sort of thing, I'd definitely incorporate it into a plugin or it will break every time you pull an update.
-
You do not know what to do?
Topics.updateTeaser = function(tid, callback) { Topics.getLatestUndeletedReply(tid, function(err, pid) { if (err) { return callback(err); } pid = pid || null; Topics.setTopicField(tid, 'teaserPid', pid, callback); }); };
As I understand it, this function is responsible for updating the content and time.
I do not know how to disable the update content - {topics.teaser.content} (in the teaser to show only the first post)
...but to {topics.teaser.timestamp} updated and shows the last post.
How do such a thing?