Quote:
Originally Posted by BBR-APBT
That is what the code you linked to. That is what you need.
|
i checked both classes on vb3 and vb4 and they are identical, im gonna play around with it for a while, thanks!
--------------- Added [DATE]1264633171[/DATE] at [TIME]1264633171[/TIME] ---------------
okay i tried it out and it works nicely except for one issue, the constant TIMENOW on vb3 is not working anymore on vb4 so i need to find its equivalent
--------------- Added [DATE]1264640546[/DATE] at [TIME]1264640546[/TIME] ---------------
nevermind the timenow issue, it was a mistake on my side, the issue im having is that the internal vbulletin arrays arent working in the plugin, this is my code:
PHP Code:
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
$pmdm->set('fromuserid', 1);
$pmdm->set('fromusername', Admin);
$pmdm->set('title', 'congratulations');
$pmdm->set('message', "congratulations $vbulletin->userinfo['username'] you have made your 50th post, we're all so prod of you keep on posting");
$pmdm->set_recipients('$vbulletin->userinfo['username']', $permissions);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();
if i directly write a username on the set_recipients instead of $vbulletin->userinfo['username'] the PM works perfectly, but if i use it, the PM is not sent, as well, if i use $vbulletin->userinfo['username'] in the message, i get: Array['username'] in the output instead of the nick of the user receiving the PM
thanks again for any help