MyBB Community Forums

Full Version: Mod Options / {$modoptions} in Postbit?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,

So I just wondered if {$modoptions} which are used in Profile, can be used in postbit too?

I've tweaked $modoptions to simply display ban user, warn user & edit user. So would be handy to have 1 less step away when reading a post.

Thanks,
D
You can't move variables around different templates, unless they're defined in the same file. Postbit (inc/function_post.php) and profile (member.php) aren't. So you need to add buttons manually.
Aww that's sad! I'll have to make some edits then, as without a plugin I don't believe you can use if statements based on usergroups to only display the manual buttons to mods?
No. Easiest way would be writing own plugin/core edit or using Template Conditionals - http://mybbhacks.zingaburga.com/showthread.php?tid=464 like this:
<if $mybb->usegroup['cancp'] || $mybb->usegroup['canmodcp'] then>
button code
</if>