From install.xml:
> SET money = money + {$modSettings['shopPointsPerTopic']}
> SET money = money + {$modSettings['shopPointsPerPost']}
I suggest using $modSettings[shopPointsPerTopic], as it will parse ever so very slightly faster.
> $context['admin_areas']['shop'] = array (
You should probably check permissions. It's possible a moderator could get into this section (and have permission to do other things, but not manage the shop...)
if (allowedTo('shop_admin'))
$context['admin_areas']['shop'] = array(
...
> "{$txt['shop_admin_items']}"
Erm... why not just $txt['shop_admin_items']? Forcing interpolation will end up wasting memory.
> echo "dode";
Typo? Note that this section is only for converting template.php's, so you won't see it active at all.
The $message['member'] array is set in Load.php. Look for loadMemberData() and loadMemberContext().
> <br><br>
XHTML -> <br /><br />.
$newSettings['shopPointsPerTopic'] = $_POST['pertopic'];
$newSettings['shopPointsPerPost'] = $_POST['perpost'];
You should probably cast pertopic and perpost to ints, just to make sure they typed numbers... like so:
$newSettings['shopPointsPerTopic'] = (int) $_POST['pertopic'];
$newSettings['shopPointsPerPost'] = (int) $_POST['perpost'];
I notice you use several different templates, Invision-style. The general method in SMF is to use one larger template and use sub templates. For example, you might change this:
loadTemplate('ShopAdminInventory');
To:
loadTemplate('ShopAdmin');
$context['sub_template'] = 'inventory';
And then instead of:
function template_main() {
Use:
function template_inventory() {
You may, from your experience with Invision, prefer the other way - and that's fine, this is of course only a suggestion... but I would say that staying with "the way SMF works" will make things easier for those who use your mod.
And, lastly, db_stuff.php uses smf_ hardcoded. I strongly suggest you use $db_prefix instead, because this forum, as an example, uses a different prefix than smf_.
And, personally, I might replace this:
//give admin money :-)
db_query("UPDATE `smf_members` SET `money` = '10000' WHERE `ID_MEMBER` = '1' LIMIT 1", __FILE__, __LINE__);
With:
// Reward whoever's installing this with a lot of money :-).
updateMemberData(empty($ID_MEMBER) ? 1 : $ID_MEMBER, array('money' => 10000));
Don't take these suggestions the wrong way, or anything, I'm just trying to give you some helpful advice on integrating into SMF; I know there are not a whole ton of examples available quite yet.
-[Unknown]