Well, if you use a theme other than the default, you'll be upset to find out that SMFShop doesn't put a shop button in that theme. Also, it doesn't display the amount of credits a user has next to posts that they make. But, don't worry! We can fix that!
The first thing to do is request a shop button. Please read the topic entitled '
How to request a Shop button for your theme', and once you have done that, make a new post in the 'Shop Button Requests' subforum. Please, read the How-to topic first!
Next, 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.phpFind: // Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
<br />';
SMFShop 3.0 or higher, or development version (revision 37 or higher), replace with: // BEGIN SMFShop MOD New Version Code
// Removed one <br /> from end of post count line.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
';
echo '
', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '<br /><br />
<a href="', $scripturl, '?action=shop;do=invother2;member=', $message['member']['username'], '">View Inventory</a><br />
<a href="', $scripturl, '?action=shop;do=sendmoney;member=', $message['member']['username'], '">Send Money to ', $message['member']['name'], '</a><br />';
//END SMFShop code
SMFShop 2.3 or lower, 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
//BEGIN SMFShop MOD 2.2 (Build 10) code
echo "<a href='$scripturl?action=shop;do=sendmoney;member={$message['member']['username']}'>Send Money to {$message['member']['name']}</a><br />";
//END SMFShop 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