Yes, it is this plugin : https://github.com/nodebb/nodebb-plugin-global-chat
Some night, tongues are loosened, and it seems to be interesting to keep a "short history" (such as 24h) of the global chat.
How would I go about using shorter hand time ago?
Currently: 10 hours ago
Shorthand: 10h
If it's just for one NodeBB instance you coud hard-code sth. like
$.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "",
suffixFromNow: "",
seconds: "1m",
minute: "1m",
minutes: "%dm",
hour: "1h",
hours: "%dh",
day: "1d",
days: "%dd",
month: "1mo",
months: "%dmo",
year: "1yr",
years: "%dyr",
wordSeparator: " ",
numbers: []
};
within public/src/app.js before $('span.timeago').timeago();
If it's for a theme/plugin you could add the same into any client-side script that triggers on page-load (like entries within plugin.json attribute scripts).
I've taken the object from public/vendor/jquery/timeago/locales/jquery.timeago.en-short.js, there are several others that may inspire you
I've taken the method from here, maybe there exists an easier way to change the locale now since this is a 3.5a old thread... but this issue lets me assume that it's not implemented yet ^^
@frissdiegurke Thanks, I'll give it a shot!
@julian said:
Yeah, the timeago library doesn't support shorthand dates, and only treats it like a separate language file, so it replaces it site-wide. Even then, the timeago string is shorthand English, so that leaves international users out in the cold too.
Hardcoded in jquery.timeago.min.js