News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMFShop - Shop MOD

Started by SMFHacks.com Team, December 27, 2004, 06:46:17 AM

Previous topic - Next topic

theunder-ground

#1000
I am trying to make the shop mod fit my needs.  I've almost got it done, but there is one but that is confusing me.

One of the main things that I want to be able to do is edit the currency amount through the profile.  I got the box to show up, it edits the database as needed, but unlike the place you edit the posts it doesn't show how much they currently have.

I am also trying to get this amount to show up in the profile summary and it will not.

These are all the changes I made:

in sources/profile.php

find

// Change the number of posts.
if (isset($_POST['posts']) && allowedTo('moderate_forum'))
$profile_vars['posts'] = $_POST['posts'] != '' ? (int) $_POST['posts'] : '\'\'';


Add after
// Change the number of Diamonds.
if (isset($_POST['money']) && allowedTo('moderate_forum'))
$profile_vars['money'] = $_POST['money'] != '' ? (int) $_POST['money'] : '\'\'';


in themes/default/Profile.template.php

Find

<tr>
<td><b>', $txt[86], ': </b></td>
<td>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</td>
</tr><tr>


Add After
               <td><b>', $modSettings['shopCurrencyPrefix'], ' </b></td>
<td>', $context['member']['money'], '</td>
</tr><tr>


Find

   // If karma is enabled let the admin edit it...
if ($user_info['is_admin'] && !empty($modSettings['karmaMode']))
{
echo '
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr><tr>
<td valign="top"><b>', $modSettings['karmaLabel'], '</b></td>
<td>
', $modSettings['karmaApplaudLabel'], ' <input type="text" name="karmaGood" size="4" value="', $context['member']['karma']['good'], '" onchange="setInnerHTML(document.getElementById(\'karmaTotal\'), this.value - this.form.karmaBad.value);" style="margin-right: 2ex;" /> ', $modSettings['karmaSmiteLabel'], ' <input type="text" name="karmaBad" size="4" value="', $context['member']['karma']['bad'], '" onchange="this.form.karmaGood.onchange();" /><br />
(', $txt[94], ': <span id="karmaTotal">', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), '</span>)
</td>
</tr>';
}

Add After   

// Diamonds
if ($user_info['is_admin'])
{
echo '
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr><tr>
<td valign="top"><b>', $modSettings['shopCurrencyPrefix'], '</b></td>
<td><input type="text" name="money" size="4" value="', $context['member']['money'], '" /></td>

</tr>';
}

mikedats

i cant seem to find any help through search....

shop mod works fine, well installed fine, i suppose. anyways, someone bought a rock and of course it doesnt do anything now a member tried to buy a changer user title and nothing happened. i have the option for members to change customer title off in the settings.....am i missing something here? gamble your money one works as well...just the change customer title or change other members customer title...it deducts money but wont allow them to do anything after that...solution?

J. Williams

Mikedats

They need to go to inventory
The rock does nothing :)
Joshua Jon Williams
Back in Action.

Daniel15

@theunder-ground: I haven't really played around with the profile functions, so I don't know how to make that work
@mikedats: The user needs to go to the 'Inventory' section in order to be able to use the item...
Quotei have the option for members to change customer title off in the settings
This is irrevalent, the items don't follow the setting ;). However, if you don't want members to be able to use the item, you can remove it from your shop.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

mikedats

yes i know that. i tried it. i bought change user title and then went into my inventory, saw it there, used it, entered my custom title but nothing happened. i still have the preset user title still....

what i mean in my last post was, i turned off "allow members to change custom title". i dont know if that anything to do with when a member buys "change custom title" it wont allow them to change it.

J. Williams

Mike,did you click the button next to it. Remember enter isn't that much of working in some mods.
Joshua Jon Williams
Back in Action.

theunder-ground

Quote from: daniel15 on April 21, 2006, 04:03:40 AM
@theunder-ground: I haven't really played around with the profile functions, so I don't know how to make that work

I figured that.  This post was merged into yours when in reality all I need is help with general coding.

Muse

Quote from: jenncarino on April 16, 2006, 10:45:20 PM
Is there a way to make shop item purchases display in the profile of a person's posts? If so, can someone explain please?

Ooh, I'd be interested in that if it were possible!

(Also, thanks again Daniel for helping fix my install!)

mikedats

Quote from: J J Williams on April 21, 2006, 07:04:52 AM
Mike,did you click the button next to it. Remember enter isn't that much of working in some mods.

can i ask which button that would be?

J. Williams

When you enter the custom title,the button next to it must be clicked.
Joshua Jon Williams
Back in Action.

mikedats

alright, just bought something: You successfully bought a 'Change User Title'. To use it, click on the 'Your Inventory' link on the left.

i clicked on my inventory...

"       Change User Title      Change your User Title      Paid: 150.00
                                                                                Use Item
                                                                                Trade Item

                                                                                                       "
i clicked on "use item"

This item requires further input. Please complete the fields below, and then press 'Use Item'
New Title: [new title]
[enter button]


theres no check box for anything..



Bigguy

After you fill in the fields can you hit Use Item again ???

mikedats

nope...maybe the installation wasnt as smooth as i thought it was.

londonhogfan

Quote from: londonhogfan on April 19, 2006, 12:03:49 AM
anyway for karma to raise/reduce the money?

I would love that.

anyone know if this can be done?

I would like it to add or subtract 5 credits if someone gets positive or negative karma.

MikeB

Hi

I need a mod whereby members are charged for posting within a certain category (all I want is a fixed charge for creating a new topic so they can sell stuff). Can someone tell me if this mod (or any other available) does that?

I'd be prepared to pay someone to write it for me if it doesn't exist.

Thanks in advance

Mike B

geezmo

I tried adding more images in Sources/shop/item_images/ but it won't let me add anything, I get a Permission Denied error when trying to upload things. How to solve this?

chrisjs162216

I can also confirm the permission denied errors, as I couldn't add the file it said to for his Reset CSS Display Name adon.


I've PMed him on a different forum about it, and see what's wrong.


Usually in cPanel, you can just click the folder and click Change Permissions, but it always reverts back to the default, 755.  I think the owner must be SMF in this case, otherwise it should work.

Just to confirm, the error is "[a fatal error or timeout occurred while processing this directive]" right?


Chris

J. Williams

Chris

This is what happens in SMF,You'd if using 1.1 rc 2,go to package manager & install options then you have the cleanup permissions option.
Joshua Jon Williams
Back in Action.

squirrelof09

How come I can't download the mod?

Its not in the list..

Bigguy

Try going here: http://www.daniel15.be/forum/index.php This is the mod makers forum. It should be there somewhere.

Advertisement: