SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
February 10, 2012, 07:19:38 pm

Login with username, password and session length
Members
Total Members: 9904
Latest: toytoy5555
Stats
Total Posts: 27798
Total Topics: 4859
Online Today: 79
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 56
Total: 56
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Trader System RC3 + TP0.95 and custom theme  (Read 3656 times)
TeamVTEC
Newbie
*
Offline Offline

Posts: 45


View Profile
« on: September 13, 2006, 04:06:29 pm »

First of all great MOD Grin everything went well on install... it even shows up in the profile section but not under the Avatar in posts like should do... what do i have to change to make it work with a custom theme?
Display.template?

My forum: http://forum.sirfanaticsholland.com/index.php?action=forum
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9399


View Profile
« Reply #1 on: September 13, 2006, 04:18:59 pm »

Code:
[code
<file name="Themes/default/Display.template.php">
<operation>
<search position="before"><![CDATA[global $context, $settings, $options, $txt, $scripturl, $modSettings;]]></search>
<add><![CDATA[
global $db_prefix;]]></add>
</operation>
<operation>
<search position="before"><![CDATA[// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group'], '<br />';]]></search>
<add><![CDATA[
//Start SMF Trader System
//First do the query for the number of ratings
db_query("SELECT feedbackid FROM {$db_prefix}feedback WHERE ID_MEMBER ="  . $message['member']['id'], __FILE__, __LINE__);
$tradecount = db_affected_rows();

//Show the trader info
echo '
<b>' . $txt['smftrader_profile'] . ' </b>
(<a href="' . $scripturl .  '?action=trader&id=' . $message['member']['id'] . '">', $tradecount, '</a>)<br />';

//END SMF Trader System
]]>
</add>
</operation>
</file>

You need to open display.template.php
Find soemthing like
Code:
global $context, $settings, $options, $txt, $scripturl, $modSettings;
Change to
Code:
global $context, $settings, $options, $txt, $scripturl, $modSettings, $db_prefix;
Find
// Show the member's primary group (like 'Administrator') if they have one.
      if (isset($message['member']['group']) && $message['member']['group'] != '')
         echo '
                        ', $message['member']['group'], '<br />'
Add before
Code:
//Start SMF Trader System
//First do the query for the number of ratings
db_query("SELECT feedbackid FROM {$db_prefix}feedback WHERE ID_MEMBER ="  . $message['member']['id'], __FILE__, __LINE__);
$tradecount = db_affected_rows();

//Show the trader info
echo '
<b>' . $txt['smftrader_profile'] . ' </b>
(<a href="' . $scripturl .  '?action=trader&id=' . $message['member']['id'] . '">', $tradecount, '</a>)<br />';

//END SMF Trader System
« Last Edit: September 13, 2006, 04:23:42 pm by SMFHacks » Logged
TeamVTEC
Newbie
*
Offline Offline

Posts: 45


View Profile
« Reply #2 on: September 14, 2006, 10:44:07 am »

Man that was easy Grin thanks a bunch for your code... could you explain to me what the difference is between the default display.template and a custom one? why not copy the entire MOD code from the default template to the custom? or am i asking stupid things.. Roll Eyes
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9399


View Profile
« Reply #3 on: September 14, 2006, 10:58:44 am »

Currently SMF only can install to the defaul theme, maybe in the future in can install to others.
Logged
TeamVTEC
Newbie
*
Offline Offline

Posts: 45


View Profile
« Reply #4 on: September 14, 2006, 01:08:07 pm »

Currently SMF only can install to the defaul theme, maybe in the future in can install to others.

I really hope so, there are still allot of things SMF does not have... but it's growing Wink
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9399


View Profile
« Reply #5 on: September 14, 2006, 01:20:31 pm »

What doesn't it have Tongue
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 03:36:31 pm]

[Today at 02:42:09 pm]

[Today at 02:23:51 pm]

[Today at 10:26:45 am]

[February 09, 2012, 05:30:55 pm]

by exit
[February 09, 2012, 04:47:13 pm]

[February 08, 2012, 09:09:16 pm]

[February 08, 2012, 09:11:02 am]

[February 08, 2012, 09:07:32 am]

[February 08, 2012, 03:46:49 am]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.225 seconds with 20 queries.