Customizing SMF > Modifications and Packages

SMF Trader System (1.6 Released) Now Supports SMF 2.0!

<< < (129/135) > >>

Skaty:
Hi,  how can i change the pm sender. it always send from admin (user id:1) can i change it ?

thanks

vbgamer45:
You would have to modify the calls to sendpm in Sources/Trader.php and change the member id.

Skaty:
exactly how, from here ?

      SendTraderPMByID($id);

vbgamer45:
The code below will give you the area to change

Change

--- Code: ---
$pm_register_recipients = array(
'to' => array($row['ID_MEMBER']),
'bcc' => array(),
);

require_once($sourcedir . '/Subs-Post.php');

sendpm($pm_register_recipients, $txt['smftrader_newrating'], $row['comment_short'] .  "\n\n" . $txt['smftrader_commentmadeby'] . $row['real_name'] . "\n" . "{$scripturl}?action=profile");

--- End code ---

To


--- Code: ---
$pm_register_recipients = array(
'to' => array($row['ID_MEMBER']),
'bcc' => array(),
);


$pm_from = array(
'id' => 0,
'username' => 'usernamehere',
'name' =>'displaynamehere',
);

require_once($sourcedir . '/Subs-Post.php');

sendpm($pm_register_recipients, $txt['smftrader_newrating'], $row['comment_short'] .  "\n\n" . $txt['smftrader_commentmadeby'] . $row['real_name'] . "\n" . "{$scripturl}?action=profile",false,$pm_from);

--- End code ---

Skaty:
thank you so much :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version