The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#2
|
||||
|
||||
![]()
I ended up pulling some code from a plugin to get this done by directly dumping the info into the database, then updating the unread vm count for the users. Quick and it works fairly well.
Here is the code if anybody else runs into this. Code:
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "visitormessage (userid, postuserid, dateline, state, pagetext, allowsmilie) VALUES ('" . $uid . "','" .$reviewerid . "','" . TIMENOW . "','visible','" . $vm_text. "','1') "); list($unread) = $vbulletin->db->query_first(" SELECT COUNT(*) AS unread FROM " . TABLE_PREFIX . "visitormessage WHERE userid = $authoruid AND state = 'visible' AND messageread = 0", DBARRAY_NUM ); $vbulletin->db->query_write(" UPDATE " . TABLE_PREFIX . "user SET vmunreadcount = " . intval($unread) . " WHERE userid = $authoruid "); |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|