2011-06-28, 06:53 PM
Hello
The following code works fine within MyBB pages/templates. I have created my own personal index page and the link when highlighted to enter the chatroom shows up as the variables and not the info required.
So when people click on the link to enter the room, there nickname is {$mybb->user['username']} which is obviously wrong.
How do I get it to understand and change the variable to the correct username?
The following code works fine within MyBB pages/templates. I have created my own personal index page and the link when highlighted to enter the chatroom shows up as the variables and not the info required.
<!-- PRO CHAT ROOMS -->
<script language="JavaScript">
<!--
var userName = "{$mybb->user['username']}";
var userID = "{$mybb->user['uid']}";
var roomID = "Welcome!";
// -->
</script>
<script language="JavaScript" type="text/javascript" src="/prochatrooms/chat.js"></script>
<a href="javascript:launchChat();">Chatrooms</a>
So when people click on the link to enter the room, there nickname is {$mybb->user['username']} which is obviously wrong.
How do I get it to understand and change the variable to the correct username?