MyBB Community Forums

Full Version: Variable inside settings?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Question.
Is it possible to use, for example, $mybb->user['theme_hexcolor'] in the settings?

[Image: ocrjyq.png]

This will turn into:

<style>
.forum_on {
   color: #$mybb->user['theme_hexcolor'];
}
</style>

(I've tried with brackets and it doesn't make a difference).

Thanks.
Its parsed as text from what I remember. What you can do is put some kind of placeholder there. Then have a plugin hook to preoutput_page and then use a string replacement function.
(2017-02-17, 03:02 PM)dragonexpert Wrote: [ -> ]Its parsed as text from what I remember. What you can do is put some kind of placeholder there. Then have a plugin hook to preoutput_page and then use a string replacement function.

Alright, thanks! Smile

Edit: fixed it now, again, thank you!