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

Login with username, password and session length
Members
Total Members: 9898
Latest: zlmember
Stats
Total Posts: 27745
Total Topics: 4856
Online Today: 77
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 2
Guests: 64
Total: 66
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
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 3653 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: 9376


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: 9376


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: 9376


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 06:14:06 pm]

[Today at 04:36:21 pm]

[Today at 09:56:10 am]

[Today at 09:11:02 am]

[Today at 09:07:32 am]

[Today at 03:46:49 am]

[February 07, 2012, 09:45:42 pm]

[February 07, 2012, 06:09:23 pm]

[February 07, 2012, 02:56:36 pm]

[February 06, 2012, 08:16:24 pm]
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.226 seconds with 19 queries.