TinyPortal
Development => Support => Topic started by: foreverpurple on July 14, 2006, 06:00:16 AM
I have the shop installed but the profile when you post no longer shows how much money you have. How can I fix that?
I wonder if this is one for the shop mod support forum: http://www.daniel15.aus.cc/index.php
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 ?
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
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.
YOu are so clever!! That worked thank you very much!!