• Welcome to Simple Machines Community Forum. Please login or sign up.
January 19, 2022, 04:12:30 AM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


SMF Trader System

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

Previous topic - Next topic

vbgamer45

You might be missing a language string $txt['smftrader_buyer']

Or it could be wrong line that is mentioned make sure you disable temp eval to find true error line in case
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

hcfwesker

I'm trying to find what column, or table, the member info for this gets saved under, in phpMyadmin.  I couldn't find "Trader" or anything like that.  Can you help, please.

EDIT:

my bad, 1 minute after posting this i found smf_feedback

srgsng25

the elevated template fixed my errors looks like

MiY4Gi

Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

vbgamer45

Open display.template.php
Find the trader code
Then remove the <b> or <strong> tags in the trade count display
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

MiY4Gi

Thanks. That did the trick. Also, you might want to move the trade count below the post count, because where it is at the moment, it's in a rather awkward position above the avatar, between the membergroup title and the postcount title (or at least I think it was there - I can't remember since I moved it myself to the position below the post count).
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

jshamm

Has anyone been able to incorporate this with a profile mod like Ultimate Profile?  I'd really love to use both and have gone over and over again through the code (admittedly unfamiliar with php) and I cannot find a way to have both.  any tips at all would be really appreciated.

SN95Forums

Hey all,

Im having an issue, I exported my database with this deactivated but not un-installed.

What I need to know is what does this modify in my database so I can MANUALLY erase it?

Thanks in advance,
Matt

Shorti25

Hello,
how can i increase/decrease the values of the trade count ?

Before using trader system we used the karma to give point to users.
If an users karma is 30 positiv i want to make the start in trader system with 30.

Where can i do this ?

vbgamer45

No way to do that. It is based upon the number of feedback entries.
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

Shorti25


MoreBloodWine

September 21, 2011, 04:43:18 AM #611 Last Edit: September 21, 2011, 04:50:14 AM by MoreBloodWine
Hey VB, two things I'd like to bring up... the first is a suggestion and the other is a bug in the profile edit that's been here for as long as I can remember this mod existed.

Suggestion
I was wondering if you would consider taking the following bit of code from the Display.template.php edit...
// Show the trader info
echo '<li>
<b>' . $txt['smftrader_profile'] . ' </b>
(<a href="' . $scripturl .  '?action=trader&id=' . $message['member']['id'] . '">', $modSettings['trader_use_pos_neg'] ? ($tradecount > 0 ? '+' . $tradecount : $tradecount)  : $tradecount  , '</a>)</li>';


and changing it to this...
// Show the trader info
echo '<li>
Feedback:
', $modSettings['trader_use_pos_neg'] ? ($tradecount > 0 ? '+' . $tradecount : $tradecount)  : $tradecount  , '
<br />
(<a href="' . $scripturl .  '?action=trader&id=' . $message['member']['id'] . '">View</a> l <a href="' . $scripturl .  '?action=trader;sa=submit&id=' . $message['member']['id'] . '">Add</a>)
</li>';


That makes it output like this...

Feedback: 0
(View l Add)

I find it to be easier for people to navigate / use the trader system, that and I think it looks better but that's just my opinion.

Bug ?
Ok, this has been here a number of years but the profile edit breaks the layout of the profile by not adding in an <hr> or something.

Ok, I tried to find and fix the code for proof but soemthins weird... I can't, the cloest I came is figuring out that it's with the <dl></dl>'s or something.

In any event, the profile edit is bugged in the following two ways.

1) In 2.0 the Profile.template.php edit needs to be added after this / before the show signature stuff...

// Are there any custom profile fields for the summary?
if (!empty($context['custom_fields']))
{
$shown = false;
foreach ($context['custom_fields'] as $field)
{
if ($field['placement'] != 2 || empty($field['output_html']))
continue;
if (empty($shown))
{
$shown = true;
echo '
<div class="custom_fields_above_signature">
<ul class="reset nolist">';
}
echo '
<li>', $field['output_html'], '</li>';
}
if ($shown)
echo '
</ul>
</div>';
}


If not, the way it works now is that Last Active and the custom fields will be added after the SMF Trader display stuff.

2) There's no <hr> above the Trader stuff to break it apart from Last Active / custom field stuff.

Here's what it looks like on my fresh 2.0 install site.


Here's what it should look like (edited via PS)...


-------

Oh, and for what it's worth... on 2.0 which this whole post is about, the Display.template.php edit fails on the core theme. Don't see a need for the core edit but thought I'd toss it out there.

Haven't been able to test it on other themes because I'm playing with a new site.

and while I'm at it...

The site bugs on uninstall because of the feedback thing you got in there.

Edit:

Quote from: MiY4Gi on July 08, 2011, 11:51:51 PM
Also, you might want to move the trade count below the post count, because where it is at the moment, it's in a rather awkward position above the avatar, between the membergroup title and the postcount title (or at least I think it was there - I can't remember since I moved it myself to the position below the post count).

I alo can confirm this and would like to suggest it be placed above the pos count / below the avatar since if it's below the post count it can still look out of place if you have stuff like show gender, karma etc showing.
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


hcfwesker

March 11, 2012, 04:47:30 AM #612 Last Edit: March 11, 2012, 04:52:53 AM by hcfwesker
smf 2.0.2

I'm trying to make one addition to this.  when viewing the trader Details, it shows the long comment, and who posted it.  I'd also like to add the members name of who it belongs to , up in the title. 

the only thing I can get close to is displayng the members id using the code below, but have tried every angle and possible i can think of but cant get the actual name to show.

', $context['trading_detail']['ID_MEMBER'], '

this is what shows the person who sent the long comment

<td align="left">' . parse_bbc($context['trading_detail']['comment_long']) . '<br />',$txt['smftrader_commentby'],'<a href="',$scripturl, '?action=profile;u=', $context['trading_detail']['FeedBackMEMBER_ID'],'">',$context['trading_detail']['real_name'],  '</a><br /></td>

I want to add the person's name that the long comment was SENT TO in this part where i have it labeled HERE

<td height="26" align="center">',$txt['smftrader_title'],' - ',$txt['smftrader_detailedfeedback'],' - HERE</td>

Any suggestion would be greatly appreciated :)


MadTogger

A few other people have mentioned about the;

'An Error Has Occurred!'

message that appears when a member submits feedback that needs approval.

This message is really deceiving as there is no error that has occurred.

I think I have found the piece of code in Trader2.php that causes this to display but I am stuck as to how to change it to something more appropriate.

Here is the code from the 'submit2' function:

else
fatal_error($txt['smftrader_form_notapproved'], false);


How can I change this so that it does show a FATAL ERROR but a more fitting title like 'Sent For Approval'?

Also I don't really like the 'back' link displayed at the bottom of this error page with the;

history.go(-1)

function, where can I change the actual link address for this so I can make the link point to somewhere more appropriate?

Regards..,

MT

hcfwesker

That's another issue that i wanted to ask about as well.  Should just have a box about with a title like "Feedback Pending approval"

MadTogger

Quote from: hcfwesker on March 11, 2012, 04:26:43 PM
That's another issue that i wanted to ask about as well.  Should just have a box about with a title like "Feedback Pending approval"

Yes, that would be great.

Just having a small popup displayed when the 'submit' button is pressed that says like you have said 'Your feedback is pending approval'

I think the 'An Error Has Occurred!'  will confuse the heck out of my forum users.

Also a better solution to the 'back' link would be that clicking the 'OK' button on a message popup would take the user back to the forum index page not back to the submit feedback page.

Regards..,

hcfwesker

Seeing as this issue was brought up almost 4 years, which the mod author said he would some kinda fix for that, but still not.  :(

I'm gonna look into this and see what I can do, and perhaps make it redirect to the user's feedback stats page, and have one of those green box displays, like when you report a post and after sending it you get redirected back to the post with the green box above saying something like   [ Report Sent ].  But instead have it says soemthing like

[ Feedback Pending Approval :  $txt['smftrader_form_notapproved']

Like in the attached pic below.

No promises, but if I get something to work, I'll post back here with the results.

and, I'm still looking for help on this issue if anyone knows how.  http://www.simplemachines.org/community/index.php?topic=98912.msg3291401#msg3291401

hcfwesker

I am very happy.  got this to work :)

This edit will remove the "Error Has Occurred" screen for members who submit feedback that needs to be approved, and instead, take the member back to the members feedback page they were submitting for, and have a highlighted green box message.  depending on what you use for $txt['smftrader_form_notapproved']

Ex.



Sources/Trader.php

Find
fatal_error($txt['smftrader_form_notapproved'], false);

Replace with
                redirectexit('action=trader&id=' . $traderid . ';added');

Themes/default/Trader2.template.php

Find
function template_main_trader()
{
global $txt, $context, $scripturl, $modSettings, $user_info;


Add After
    echo isset($_REQUEST['added']) ? '<div id="profile_success" style="border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"><strong>Feedback Pending Approval:</strong> ' . $txt['smftrader_form_notapproved'] . '</div>' : '';

^^ You can change 'Feedback Pending Approval:' to whatever you like in the above line, or remove it.  Whatever you have in your text string will appear after it.


I found a solution for this, hoping someone can come along and help me with this : http://www.simplemachines.org/community/index.php?topic=98912.msg3291401#msg3291401



MadTogger

Quote from: hcfwesker on March 11, 2012, 11:20:11 PM
I am very happy.  got this to work :)

This edit will remove the "Error Has Occurred" .....

Thank you very much hcfwesker, this is a perfect solution, very straight forward.

Now I am attempting to implement this further by using similar code to check whether the member trying to leave feedback has filled out the necessary fields in the submission form.

Following your example I have got it to work somewhat but have run in to a small issue.

Firstly, here is the code I am using:

In Trader.english.php find:
?>

Add Before:
$txt['smftrader_errnourl'] = 'You have to enter the Topic URL.';

In Trader2.php find:
if ($shortcomment == '')
fatal_error($txt['smftrader_errshortcoment'],false);


Replace with:
if ($shortcomment == '')
redirectexit('action=trader;sa=submit&id=' . $traderid . ';noshrtcomm');


Find:
$topicurl = htmlspecialchars($_REQUEST['topicurl'],ENT_QUOTES);

Add After:
if ($topicurl== '')
                redirectexit('action=trader;sa=submit&id=' . $traderid . ';notpcurl' );


In Trader2.template.php find:
function template_submit()
{
global $txt,  $context, $scripturl, $modSettings;


Add After:
echo isset($_REQUEST['noshrtcomm']) ? '<div id="profile_error" style="border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"><strong>Information Missing:</strong> ' . $txt['smftrader_errshortcoment'] . '</div>' : '';

echo isset($_REQUEST['notpcurl']) ? '<div id="profile_error" style="border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"><strong>Information Missing:</strong> ' . $txt['smftrader_errnourl'] . '</div>' : '';


Now, although this does work the problem is that the page refreshes and all previously entered information in the form's fields is lost leaving the user to have to renter all the info.

I would like to be able to just show the warning to the user without a page refresh occurring.

I have found some information on the redirectexit() function here and is does show a parameter $refresh but I cannot seem to get this to work.

Any help would be appreciated.

Regards..,  ;)


hcfwesker

Once I figure out my problem on this mod, I'll try and take a look at it.  But, for those, I was just use the fatal_error, so they have the Back key to click and all information should still be there

Advertisement: