SimplePortal
Customization => Custom Coding => Topic started by: KahneFan on April 03, 2009, 03:37:44 PM
-
I saw that. Pretty cool ;D
A similar question; do you know what I would use to put a line in the user info block for "(shop $ name) in pocket:"?
-
Split from the other topic (http://simpleportal.net/index.php?topic=1467.0) and moved to the Custom Coding board.
I'll do this in a second. ;)
-
Find this code in your 'SPortal1-1.php' file.
if (allowedTo('pm_read'))
{
echo '
<li>', sp_embed_image('dot'), ' <strong>', $txt['sp-usertmessage'], ':</strong> <a href="', $scripturl, '?action=pm">', $context['user']['messages'], '</a></li>
<li>', sp_embed_image('dot'), ' <strong>', $txt['sp-usernmessage'], ':</strong> ', $context['user']['unread_messages'], '</li>';
}
Add this code afterwards:
global $sourcedir;
static $mod;
if (!empty($mod) || file_exists($sourcedir . '/shop'))
{
echo '
<li>', sp_embed_image('dot'), ' <strong>In Pocket:</strong> ', $context['user']['money'], '</li>
<li>', sp_embed_image('dot'), ' <strong>In Bank:</strong> ', $context['user']['moneyBank'], '</li>';
}
-
Where would/should I find SPortal1-1.php? I'm only seeing Sportal2.php
(This is for SP2.2 + SMF 2.0RC1 btw)
-
Ah sorry, the edit should be the same for your 'SPortal2.php' file if you are using SMF 2.
Notice that the code adds both 'In Pocket' and 'in Bank' values, you can remove the code for one if you only want the other. ;)
-
Perfect, thanks!! I just added my sites denomination in front.