Variables in posts body?

Hello, is it possible to use variables in the text of a post for example “post edit time limit” . This way I could indicate in the administrator announcements for example the sentence you can edit your posts during maximum “post edit time limit” minutes. Thanks.

Hello Patrick,

I don’t think you can do that natively.
If you do not update these settings often, you could use the Watched Words feature.
However, the best way would probably be to create a theme component. If no one else has an answer, I will see if I can help you.

1 Like

Hello, thank you for your reply, I don’t know if I’ve explained my request correctly. It would naturally cover all the variables accessible to the administrator and I really think that administrators would have a great interest in having this component because it’s quite common to have to explain, for example in an administrator’s announcement category or in documentation on the site, that users can do such and such a thing depending on the values of certain variables. Obviously, the whole point of my request is that, being variables, the text presented by the administrator would be dynamic and would vary according to these variables, which if I understand your proposal correctly would not be the case for watched words and their replacement functionalities?

You’re right, I think I’m confused.

From my understanding, you want to replace a setting name with its value. Is it correct?
Also, you say the text presented can vary depending on these variables – are you saying you want different text depending on a setting value?. It’s unclear what you’re looking for.

Can you give a concrete example?

Most of those variables are not sent to the browser, so even if you could include them it usury wouldn’t help. And many of those you don’t want to get sent out to the browser because they are private.

Sure this is an example that would be posted in the Admin announcement category by the admin:

Hi everyone, for your information, TL0 and TL1 users can edit their posts for [post edit time limit] minutes.

And the result displayed would be:
Hi everyone, for your information, TL0 and TL1 users can edit their posts for 60 minutes.

Changing this settings would result in a post that would reflect the setting change in the announcement.

1 Like