XThreads-MyBB-Plugin icon indicating copy to clipboard operation
XThreads-MyBB-Plugin copied to clipboard

Possibility to save DATE (DD/MM/YYYY regex) in unix?

Open Eldenroot opened this issue 1 year ago • 4 comments

@zingaburga - hi, please is that somehow possible? I need to mark all threads with set "date older" (custom field in xthreads)... thank you

Eldenroot avatar Dec 20 '24 20:12 Eldenroot

Sorry, I don't understand your question.

If you're looking to convert what the user enters into something else, you can use Input Formatter, Display Format and Input Field HTML to achieve that.

zingaburga avatar Dec 21 '24 11:12 zingaburga

Hi, ok, first of all thank you for your reply.

Just to clarify my question:

  • I have a box where you can select number of days (0, 3, 7, 14 etc.) I need to somehow store into the DB that 3 days is 259 200 seconds BUT user could see in the thread 3 days...

image

I know the last part, but I am struggling with input format - cannot find any documentation or an example.

Thank you

Eldenroot avatar Dec 22 '24 19:12 Eldenroot

Should be like the other settings - set it to something like

<?=intval({VALUE})*86400?>

zingaburga avatar Dec 24 '24 10:12 zingaburga

You could also use formatting map list too, so users see "3 days" while the value is its seconds equivalent.

Sama34 avatar Jan 13 '25 22:01 Sama34