News:

Wondering if this will always be free?  See why free is better.

Main Menu

SMF Trader System

Started by SMFHacks.com Team, July 12, 2006, 12:35:09 AM

Previous topic - Next topic

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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Skaty

exactly how, from here ?

      SendTraderPMByID($id);


vbgamer45

The code below will give you the area to change

Change


$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");


To



$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);
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Skaty

One more thing.  How can i do this option ''required''.


hcfwesker

Just a guess.

Sources/Trader2.php

Find
// Check if comment posted
$shortcomment = htmlspecialchars(substr($_REQUEST['shortcomment'], 0, 100),ENT_QUOTES);

if ($shortcomment == '')
fatal_error($txt['smftrader_errshortcoment'],false);

$ID_LISTING = 0;
$topicurl = htmlspecialchars($_REQUEST['topicurl'],ENT_QUOTES);
$salevalue = (int) $_REQUEST['salevalue'];
$saletype = (int) $_REQUEST['saletype'];
$longcomment = htmlspecialchars($_REQUEST['longcomment'],ENT_QUOTES);



Replace with
// Check if comment posted
$shortcomment = htmlspecialchars(substr($_REQUEST['shortcomment'], 0, 100),ENT_QUOTES);

if ($shortcomment == '')
fatal_error($txt['smftrader_errshortcoment'],false);

// Check if URL posted
$topicurl = htmlspecialchars($_REQUEST['topicurl'],ENT_QUOTES);

if ($topicurl == '')
fatal_error($txt['smftrader_errtopicurl'],false);

$ID_LISTING = 0;
$salevalue = (int) $_REQUEST['salevalue'];
$saletype = (int) $_REQUEST['saletype'];
$longcomment = htmlspecialchars($_REQUEST['longcomment'],ENT_QUOTES);


You'll need to goto the Trader language files and add this, or reword it

$txt['smftrader_errtopicurl'] = 'URL references must be added';

Skaty


Skaty

Quote from: vbgamer45 on December 22, 2012, 11:42:19 AM
The code below will give you the area to change

Change


$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");


To



$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);


One more thing again. Pm for notification is okay. But there is another pm for approval and that is still coming from admin (ID:1).


Skaty

How can i change the pm sender for approval trade ?

vbgamer45

Quick check scan the code for the sendpm function there should be a member id that you can change to the other. Like i did for the other one.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Skaty

Quote from: vbgamer45 on January 04, 2013, 02:58:27 PM
Quick check scan the code for the sendpm function there should be a member id that you can change to the other. Like i did for the other one.

i did something like this but it didn't work like before.

$pm_register_recipients = array(
'to' => array($row['FeedBackMEMBER_ID']),
'bcc' => array(),
);


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

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

$finaltime = timeformat(forum_time(false));
$finaltime = strip_tags($finaltime);

sendpm($pm_register_recipients, sprintf($txt['smftrader_commenter_subject'],$row['MainName']),
sprintf($txt['smftrader_commenter_body'],$row['MainName'],$finaltime));

vbgamer45

Change
sendpm($pm_register_recipients, sprintf($txt['smftrader_commenter_subject'],$row['MainName']),
To
sendpm($pm_register_recipients, sprintf($txt['smftrader_commenter_subject'],$row['MainName']),
   sprintf($txt['smftrader_commenter_body'],$row['MainName'],$finaltime),$pm_from);
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Skaty

Quote from: vbgamer45 on January 06, 2013, 11:35:43 PM
Change
sendpm($pm_register_recipients, sprintf($txt['smftrader_commenter_subject'],$row['MainName']),
To
sendpm($pm_register_recipients, sprintf($txt['smftrader_commenter_subject'],$row['MainName']),
   sprintf($txt['smftrader_commenter_body'],$row['MainName'],$finaltime),$pm_from);

done. but when i approove a feedback, pm is still sending from admin.


Skaty


vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Skaty


hcfwesker

Skaty, This MOD doies not add to ultimate profile, it's a custom add-in you added from the ultimate profile support topic.  So, it would be best if you pasted the code you're using from that file to help others see what you're using and can tell you more specifically what to do.  just keep in mind to add every detail possible when you ask for support, especially when it's something done custom.  ;)

My best guess would be top remove the line of code just below where you added the call to that image button. ;)  But won't know exactly for sure unless I can see the exact code.

Skaty

i find it :)  i add this image from modification.php file, just replaced it with the words :)

to delete the member name find this code and replace it from profile template or ultim.prof.temp.

find
<dt class="clear"><a href="' . $scripturl .  '?action=trader&sa=submit&id=' . $context['member']['id'] . '">' . $txt['smftrader_submitfeedback'] . $context['member']['name'] . '</a></dt>

replace
<dt class="clear"><a href="' . $scripturl .  '?action=trader&sa=submit&id=' . $context['member']['id'] . '">' . $txt['smftrader_submitfeedback'] . $context['name'] . '</a></dt>

Advertisement: