Oh I see ... this is quite more complicated !
For this you would need to edit the mgc_chatbox.php file to retrieved in the
$_POST['do'] == 'ajax_refresh_chat' part
You must modify the sql request :
PHP Code:
$chat_messages = $vbulletin->db->query_read("
SELECT id,username,usergroupid,date,chat,user.userid AS userid
FROM " . TABLE_PREFIX . "mgc_chatbox AS mgc_cb
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = mgc_cb.userid)
$where
ORDER BY date DESC
LIMIT " . ($cb_status == "open" ? $vbulletin->options['mgc_cb_nbchats']:$vbulletin->
options['mgc_cb_nbchats_fermee']));
Here you should add after:
PHP Code:
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = mgc_cb.userid)
This:
PHP Code:
LEFT JOIN " . TABLE_PREFIX . "userfield AS uf ON(u.userid = uf.userid)
And at the end of:
PHP Code:
SELECT id,username,usergroupid,date,chat,user.userid AS userid
You should add
field8.
Then you can use $val[field8] in the mgc_chatbox_bit template.