Screenshot please?
Also:
1. You should not use iif(). It's deprecated.

Use (COND ? DO_ON_TRUE : DO_ON_FALSE) clause instead.
2. Why make new phrases? The phrases are already in the database. Take the ones that you see in advanced reply form

3. $bbuserinfo['userid']??? That's not a variable in vBulletin 3.5.0 (unless it's in a template).
4. The only thing you need to have in your conditional is "can_moderate($threadinfo['forumid'], 'canopenclose')". Everything is not required.
5. You can do your decisions in template, no need for extra variables.