
09-01-2008, 10:57 PM
|
|
|
Join Date: Aug 2005
Posts: 355
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by VBDev
Here you go :
Edit the mgc_chatbox_ajax.php file and search in the code contained into the condition $_POST['do'] == 'ajax_refresh_chat' :
You must modify the sql request :
PHP Code:
$chats = $vbulletin->db->query_read(" SELECT c.*,fromu.userid AS fromuserid,fromu.username AS fromusername,fromu.usergroupid AS fromusergroupid,fromu.displaygroupid AS fromdisplaygroupid, tou.userid AS touserid,tou.username AS tousername,tou.usergroupid AS tousergroupid,tou.displaygroupid AS todisplaygroupid FROM " . TABLE_PREFIX . "mgc_cb_evo_chat AS c LEFT JOIN " . TABLE_PREFIX . "user AS fromu ON (c.fromuid=fromu.userid) LEFT JOIN " . TABLE_PREFIX . "user AS tou ON (c.touid=tou.userid) WHERE $where_clause ORDER BY sticky DESC,c.dateline DESC LIMIT $limit ");
By adding after :
PHP Code:
LEFT JOIN " . TABLE_PREFIX . "user AS tou ON (c.touid=tou.userid)
This:
PHP Code:
LEFT JOIN " . TABLE_PREFIX . "userfield AS uf ON(fromu.userid = uf.userid)
And after :
PHP Code:
,tou.displaygroupid AS todisplaygroupid
You should add field8.
Then you can use $chat[field8] in the mgc_cb_evo_chatbit template.
|
Thank you!
|