Earl
Well-known member
Is it possible to replace the text between open and close tags using a php callback?
I'm trying to make this feature work with an add-on: https://xenforo.com/community/threads/bbcode-that-render-time.189865/
Let's say,
A user posts
I need to check the post $owner's timezone and convert this string
Then I can use the BBCode callback option to return the HTML and i can also use custom template like
in the callback function
Or is there an easier way to do this?
I'm trying to make this feature work with an add-on: https://xenforo.com/community/threads/bbcode-that-render-time.189865/
Let's say,
A user posts
2020-12-25;12:30
within a BbCode like [timedate]2020-12-25;12:30[/timedate]
I need to check the post $owner's timezone and convert this string
2020-12-25;12:30
into the Unix timestamp and replace it back to the post.Then I can use the BBCode callback option to return the HTML and i can also use custom template like
HTML:
<xf:date time="{$time}" />
Or is there an easier way to do this?
Last edited: