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

Skylla

Hello Community

I have some Problems with my version 1.2 of SMF Trader systems

I Use SMF 2.0 RC1, and getting a Error on Installing the Mod.
It tolds me that he can´t write to Display.theme.php and Profile.theme.php

so i Parse it by myself and now i have a Style Problem. take a look at the Picture to see what i mean.


once you see that the Signature has been climb up to the top of the Profile View what looks really Crap and unprofessional to myself and other Users.

twice youll see that the SMF Trading system is at the Bottom and is Stretched.

so... what i want is that the "Stretch" ( well i just call it so ... ) is not to see and that the Users signature is not on the Top, cause it should be at the Bottom.

Excuse my bad english im from germany, and hope it is possible to understand what i mean.

Regards, Skylla

Kindred

yes... 2.0 RC1 does not use tables in that way...   so you can't just paste, you have to re-parse the code as dt/dd tags.   I have it working over on 40konline.com with RC1.
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Skylla

Quote from: Kindred on May 03, 2009, 09:27:02 PM
yes... 2.0 RC1 does not use tables in that way...   so you can't just paste, you have to re-parse the code as dt/dd tags.   I have it working over on hxxp:40konline.com [nonactive] with RC1.

can u paste your code or send me in a personal message ?

Kindred

in profile.template.php

(Although, tehcnically, this SQL should be moved into the Sources/profile.php instead of in the template file)


// Start SMF Trader System
// First do the query for the number of ratings
global $smcFunc;

$smcFunc['db_query']('', "SELECT feedbackid FROM {db_prefix}feedback WHERE approved = 1 AND ID_MEMBER =" . $context['member']['id']);
$tradecount = $smcFunc['db_affected_rows']();



$result = $smcFunc['db_query']('', "
SELECT
COUNT(*) AS total,salevalue
FROM {db_prefix}feedback
WHERE approved = 1 AND ID_MEMBER = " . $context['member']['id'] . " GROUP BY salevalue");
$context['neturalcount'] = 0;
$context['pcount'] = 0;
$context['ncount'] = 0;
while($row = $smcFunc['db_fetch_assoc']($result))
{
if ($row['salevalue'] == 0)
{
$context['pcount'] = $row['total'];
}
else if ($row['salevalue'] == 2)
{
$context['ncount'] = $row['total'];
}
else if ($row['salevalue'] == 1)
{
$context['neturalcount'] = $row['total'];
}

}
$smcFunc['db_free_result']($result);

$context['tradecount_nonetural'] = ($context['pcount'] +  $context['ncount']);

if ($modSettings['trader_use_pos_neg'])
$tradecount = ($context['pcount'] -$context['ncount']);

echo '<hr size="1" width="100%" class="hrcolor" />
<dl>
<dt><b>' . $txt['smftrader_title'] . '</b></dt><dd>&nbsp;</dd>
<dt><b>' . $txt['smftrader_profile'] . '</b></dt><dd><b>(<a href="' . $scripturl .  '?action=trader&id=' . $context['member']['id'] . '">' . ($modSettings['trader_use_pos_neg'] ? ($tradecount > 0 ? '+' . $tradecount : $tradecount)  : $tradecount) . '</a>)</b></dd>
<dt><b>' . $txt['smftrader_positivefeedbackpercent']  . '</b></dt><dd><b>' , $context['tradecount_nonetural'] != 0 ? round(($context['pcount'] / $context['tradecount_nonetural']) * 100, 2) : 0 , '%</b></dd>
<dt>' . $txt['smftrader_positivefeedback'] . '</dt><dd>' . $context['pcount'] . '&nbsp;<img src="' .  'Smileys/default/smiley.gif" alt="positive" /></dd>
<dt>' . $txt['smftrader_neutralfeedback']  . '</dt><dd>' .  $context['neturalcount'] . '&nbsp;<img src="' . 'Smileys/default/undecided.gif" alt="neutral" /></dd>
<dt>' . $txt['smftrader_negativefeedback']  . '</dt><dd>' .  $context['ncount'] . '&nbsp;<img src="' .  'Smileys/default/angry.gif" alt="negative" /></dd>
<dt>' . $txt['smftrader_totalfeedback']  . '</dt><dd>' .  ($context['pcount'] - $context['ncount']) . '</dd>
<dt><a href="' . $scripturl .  '?action=trader&sa=submit&id=' . $context['member']['id'] . '">' . $txt['smftrader_submitfeedback'] . $context['member']['name'] . '</a></dt><dd>&nbsp;</dd>
</dl>';
// END SMF Trader System

// Show the users signature.


In display.template.php

//Start SMF Trader System
//First do the query for the number of ratings
global $smcFunc;
$result = $smcFunc['db_query']('', "
SELECT
COUNT(*) AS total,salevalue
FROM {db_prefix}feedback
WHERE approved = 1 AND ID_MEMBER = " . $message['member']['id'] . " GROUP BY salevalue");
$context['neturalcount'] = 0;
$context['pcount'] = 0;
$context['ncount'] = 0;
while($row = $smcFunc['db_fetch_assoc']($result))
{
if ($row['salevalue'] == 0)
{
$context['pcount'] = $row['total'];
}
else if ($row['salevalue'] == 2)
{
$context['ncount'] = $row['total'];
}
else if ($row['salevalue'] == 1)
{
$context['neturalcount'] = $row['total'];
}

}
$smcFunc['db_free_result']($result);



if ($modSettings['trader_use_pos_neg'])
$tradecount = ($context['pcount'] - $context['ncount']);
else
$tradecount = $context['pcount'] + $context['ncount'] + $context['neturalcount'];



// Show the trader info
if ($tradecount!=0)
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>';

//END SMF Trader System
// Don't show these things for guests.
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mattchewone

Is it possible to have this mod link to a specific forum. For example a market category with a for sale board in it,

The users can give feedback once they have purchased something, rather than going to there profile?

Kindred

anything is POSSIBLE...   however, for that, you will have to code it.
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

cru

Hi!

how can i change the text "trade count" as seen in the member's forum  post above his /her avatar?

I am using dilber MC theme. on 1.1.9

TIA

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

aw06

Is it possible to see a list of the top 10 traders ?
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

darrenb1

Hi all, Thanks for all your help in the past, its great.

Having problems getting trader to work, i have this error on install.

1.     Execute Modification     ./Themes/default/languages/Modifications.english.php     Test successful
      1.    Add Before    ./Themes/default/languages/Modifications.english.php    Test successful
   2.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Skipping file
*    3.    Execute Modification    ./Themes/default/Profile.template.php    Test failed
      1.    Replace    ./Themes/default/Profile.template.php    Test failed
*    4.    Execute Modification    ./Themes/default/Display.template.php    Test failed
      1.    Add After    ./Themes/default/Display.template.php    Test failed
*    5.    Execute Modification    ./index.php    Test successful
      1.    Add After    ./index.php    Test successful
*    6.    Execute Modification    ./Sources/ManagePermissions.php    Test successful
      1.    Add After    ./Sources/ManagePermissions.php    Test successful
      2.    Add After    ./Sources/ManagePermissions.php    Test successful
*    7.    Execute Modification    ./Sources/Admin.php    Test successful
      1.    Add Before    ./Sources/Admin.php    Test successful
*    8.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
      1.    Add Before    ./Themes/default/languages/Help.english.php    Test successful
   9.    Execute Modification    ./Themes/default/languages/Help.english-utf8.php    Skipping file
   10.    Extract File    ./Sources/Trader2.php   
   11.    Extract File    ./Themes/default/Trader2.template.php   
   12.    Extract File    ./Themes/default/languages/Trader.english.php   
   13.    Extract File    ./Themes/default/languages/Trader.english-utf8.php   
   14.    Execute Code    smftraderinstall2.php

only have a few mods installed, its www.rifle-exchange.co.uk [nofollow]

any help would be great, i have installed smf classifieds too.   

Kindred

SMF version?


You will likely have to manual install the mod in those failed files.
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

smashedpumpkins

Okay if I apply this Mod and it fails on Display and Profile, but I continue the install it will just ignore those two files right? I'll play with your edits a few posts back.

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


vbgamer45

Impossible since any mod can change any piece of code.
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

smashedpumpkins

Quote from: vbgamer45 on June 25, 2009, 08:20:04 PM
Impossible since any mod can change any piece of code.
True, but this Mod is actually the one I want the most on my site. I have 5 or 6 other mods and I'd uninstall them all to get this working. But even on a fresh copy it still doesn't work. The Display and Profile fail to update. I played with other peoples updates to this mod and I was given MySQL errors. :\

Kindred

I assume VBGamer will update this once RC2 or SMF 2 gold is released...   until then you'll have to manually update display and profile (I believe that I posted the code to do so)
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

smashedpumpkins

#337
Quote from: Kindred on June 26, 2009, 03:53:11 PM
I assume VBGamer will update this once RC2 or SMF 2 gold is released...   until then you'll have to manually update display and profile (I believe that I posted the code to do so)
Okay I installed it this time on a different theme and so far it's working good. I've just got a few minor issues. Hopefully someone may be able to help me :)

First I noticed it does not show the Trade Count in posts if the user has no trade count. While testing I added feedback to my admin account and found that it showed up. However the account that has no feedback does not have the feedback there. Does anyone know how to switch that to show always? Even if the feedback is 0?

Lastly if you take a look here there's a scroll bar with a long blue line. Any idea what that might be?
http://www.ordergiftsfree.com/forums/index.php?action=profile;u=1
Nevermind... Fixed it by deleting "<hr size="1" width="100%" class="hrcolor" />"

Thanks a bunch!

Kindred

hmmm... I purposefully hide the tradecount(0) text.  If someone has no feedback or rating, then why do we need to see it?  Especially on a board of 50,000 users, of which only some 100 actually trade.
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

smashedpumpkins

#339
Quote from: Kindred on June 29, 2009, 08:18:12 PM
hmmm... I purposefully hide the tradecount(0) text.  If someone has no feedback or rating, then why do we need to see it?  Especially on a board of 50,000 users, of which only some 100 actually trade.
In some cases yes, but for me the trade feedback is pretty important. Any who got it fixed by removing the IF statement.

Okay I'd like to edit some of the text such as "Short comment on your transaction:" etc... to better fit my site. I noticed the actual text is in the XML files, but I can't find the text anywhere in any of the files. Where are they stored? Is the text stored in the database? If so where at in it?

Advertisement: