for modding smf 2.1 add 'call_integration_hook...' in the function timeformat()

Started by Pipke, May 07, 2019, 02:45:03 PM

Previous topic - Next topic

Pipke

For smf 2.1: as the title says, can you developers add this hook into this function so modders can easily manipulate the timeformat (to lets say relative formats) output instead of changing about 138 hits for calling function timeformat.
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

Arantor

Bad idea for performance for one of the most intensely time sensitive functions.

Better idea, have the function not change, but instead output a <time> tag around the result, with the time stamp in it, and do relative dates in the client in JS.

albertlast

Like arantor mention,
the timeformat function is very likly to get called multiple hundred time per page view.

So you should solve this issue on js/client side.

Pipke

"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

Advertisement: