MyBB Community Forums

Full Version: What variables work in what templates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

I never asked this before, but I was wondering if there was or will be documentation for determining what variables will work in what templates.

Not sure if this makes sense, but for example, in the postbit_warninglevel template, I'd like to use {$current_level} as opposed to {$warning_level}. Warning level will put the level out of 100, but when it is over (I think) 50/100, it will add a span with the class of high_warning or something, and I just simply want the number still. Is there a way of determining if this variable exists for this template?

A resource like this would really help me in development.

Thanks,
Mike
You can edit the global css to get them all the same style. What it does is take the number of warning points a user has and divide them by the number of warning points to reach 100%. {$warning_level} is the variable that has the calculation done. If you'd like to just have it show the warning points you'd be able to change {$warning_level} to {$post['warningpoints']}.