The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
PM Data Manager - Parsing BB Code
I'm trying to automatically create a Private Message and need to formate it. I'm fine doing this with BB Code or HTML but I can't get either to work. I was referred to this two threads:
https://vborg.vbsupport.ru/showthread.php?t=82786 https://vborg.vbsupport.ru/showthread.php?t=82693 And understand what they seem to be saying and have come up with the following code:[PHP]$botpermissions['adminpermissions'] = 2; $parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); $parsed_text = $parser->do_parse("This is a test of parsing text!\n\n[b]Russell[\b]", false, true, true, false, false); echo($parsed_text); // create the DM to do error checking and insert the new PM $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY); $pmdm->set('fromuserid', 1); $pmdm->set('fromusername', 'Admin'); $pmdm->set('title', 'This is a test'); $pmdm->set('message', $parsed_text); $pmdm->set_recipients('Russell', $botpermissions); $pmdm->set('dateline', TIMENOW); $pmdm->set('iconid', 52); $pmdm->save(); [\PHP]But instead of getting my parsed message formated correctly, this is what the private message looks like: Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|