Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 242
Total: 242

Author Topic: Trader System RC3 + TP0.95 and custom theme  (Read 7084 times)

0 Members and 1 Guest are viewing this topic.

Offline TeamVTEC

  • Member
  • *
  • Posts: 45
    • View Profile
Trader System RC3 + TP0.95 and custom theme
« on: September 13, 2006, 04:06:29 pm »
First of all great MOD ;D 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

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Trader System RC3 + TP0.95 and custom theme
« Reply #1 on: September 13, 2006, 04:18:59 pm »
Code: [Select]
[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: [Select]
global $context, $settings, $options, $txt, $scripturl, $modSettings;
Change to
Code: [Select]
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: [Select]
//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 »
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline TeamVTEC

  • Member
  • *
  • Posts: 45
    • View Profile
Re: Trader System RC3 + TP0.95 and custom theme
« Reply #2 on: September 14, 2006, 10:44:07 am »
Man that was easy ;D 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.. ::)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Trader System RC3 + TP0.95 and custom theme
« 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.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline TeamVTEC

  • Member
  • *
  • Posts: 45
    • View Profile
Re: Trader System RC3 + TP0.95 and custom theme
« 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 ;)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Trader System RC3 + TP0.95 and custom theme
« Reply #5 on: September 14, 2006, 01:20:31 pm »
What doesn't it have :P
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
9 Replies
9168 Views
Last post June 28, 2007, 07:04:22 am
by SMFHacks
2 Replies
3626 Views
Last post July 04, 2007, 06:00:01 pm
by laynerogers
0 Replies
4554 Views
Last post November 10, 2007, 03:24:08 am
by wimvincken
3 Replies
4804 Views
Last post December 15, 2007, 07:42:15 pm
by SMFHacks
0 Replies
3825 Views
Last post March 02, 2010, 10:44:18 pm
by pointalk

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal