TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,236
  • Total Topics: 21,353
  • Online today: 340
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 225
  • Total: 225

Getting Shop Dollars to show

Started by foreverpurple, July 14, 2006, 06:00:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

foreverpurple

I have the shop installed but the profile when you post no longer shows how much money you have.  How can I fix that?

Techdomain

I wonder if this is one for the shop mod support forum: http://www.daniel15.aus.cc/index.php

G6Cad

I think that the shop mod for SMF forums is something for them and the mod maker there to give you the correct answers on ?

foreverpurple

I asked and they gave me an answer but it means modding the display.template file and I don't have that file in my oxygen theme.

QuoteNext, we need to edit the theme to put the amount of credits next to every post a user makes. To do so, just follow these steps:
Open /themes/[themename]/Display.template.php
Find:

                        // Show how many posts they have made.
                        echo '
                                                                ', $txt[26], ': ', $message['member']['posts'], '<br />
                                                                <br />';


Replace with:

// Show how many posts they have made.
// echo '
// ', $txt[26], ': ', $message['member']['posts'], '<br />
// <br />';

            //BEGIN Shop MOD 0.2 Code
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
';

            //I couldn't find where all these $message['member'][whatever] variables
            //are set, so I just send an extra database query to get the member's
            //money. Can someone tell me where (file and line) the $message variables
            //are set?
            global $ID_MEMBER, $db_prefix;

            $result_money = db_query("SELECT money
                                      FROM {$db_prefix}members
                                      WHERE ID_MEMBER = {$message['member']['id']}
                                      LIMIT 1", __FILE__, __LINE__);
            $row_money = mysql_fetch_array($result_money, MYSQL_ASSOC);

            echo $modSettings['shopCurrencyPrefix'].$row_money['money'].$modSettings['shopCurrencySuffix']."<br><br>";
            //END SHOP MOD
           

//BEGIN SMFShop MOD 1.31 (Build 7) CODE
echo "<a href='$scripturl?action=shop;do=invother2;member={$message['member']['username']}'>View Inventory</a><br>";
//END SMFShop MOD 1.31 code


Then, the amount of credits a user has, as well as a link to their inventory, will be seen next to every post they make.

If you can't find this segment of code, please make a new post here, stating the name of your theme, and a link to your forum
Thanks for reading!
--daniel15

IchBin

If a theme does not have one of the template files it uses the one in the default theme. So if you want, copy the template file to the oxygen theme and edit it there.

foreverpurple

YOu are so clever!! That worked thank you very much!!

This website is proudly hosted on Crocweb Cloud Website Hosting.