It could be possible that this particular template is built in a function.
In this case, the $mgc_chatbox var won't be available in that function unless you edit the function to add the $mgc_chatbox as a global var (which I do not recommend as files editing is now vbulletin's past

).
Perhaps you should try to dig in the files to know if it's the case if you know a little about php code ?