Advertise Here

Author Topic: [Code] Shop V1  (Read 50709 times)

0 Members and 1 Guest are viewing this topic.

Offline brad1571

  • SMF For Free Newbie
  • *
  • Posts: 15
  • Since the box is blank let's leave it that way.
    • View Profile

  • Total Badges: 8
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
Re: [Code] Shop V1
« Reply #150 on: February 11, 2010, 11:37:27 am »
tysm!

Offline K I L L A

  • SMF For Free Full Member
  • *
  • Posts: 199
  • ''As soon as one is born, one starts dying.''
    • View Profile

  • Total Badges: 17
    Badges: (View All)
    Search Windows User Topic Starter Combination Level 3
Re: [Code] Shop V1
« Reply #151 on: October 26, 2010, 07:41:36 pm »
I have a problem. Whenever someone buys something on my MineCraft server forum..its all works but instead of showing the item they want in the PM, it says the subject is for example: I want to Buy: Diamond Tool Set
But in the actual PM it list the details for the last item in the shop which is
Item: Stone Tool Set
Description: You will get 1 stone pickaxe,axe,shovel and hoe
Price: $40
Other Info:
I LIKE PIE :d


My code is
Code: [Select]
<script>
var Name = "Gil";
var Sign = "$";
var PerPost = "2";
var UserID = "1";

var Item = new Array();
Item[Item.length] = ["1 TnT","You will get 1 TnT block","40"];
Item[Item.length] = ["1 Fire","You will get 1 Fire block","40"];
Item[Item.length] = ["1 Stack Cobblestone/rock","You will get 1 stack of cobblestone or rock","40"];
Item[Item.length] = ["1 Diamond Block","You will get 1 diamond block","35"];
Item[Item.length] = ["1 Gold Block","You will get 1 gold block","32"];
Item[Item.length] = ["1 Iron Block","You will get 1 iron block","25"];
Item[Item.length] = ["Grass/Dirt Stack","You will get 1 dirt/glass stack","15"];
Item[Item.length] = ["Sand/Gravel Stack","You will get one stack of sand/gravel","15"];
Item[Item.length] = ["Diamond Tool Set","You will get 1 diamond pickaxe, axe and shovel(Hoe is glitched)","75"];
Item[Item.length] = ["Gold Tool Set","You will get 1 gold pickaxe,axe,shovel and hoe ","50"];
Item[Item.length] = ["Iron Tool Set","You will get 1 iron pickaxe,axe,shovel and hoe","50"];
Item[Item.length] = ["Stone Tool Set","You will get 1 stone pickaxe,axe,shovel and hoe ","40"];

document.write("<script src='http://209.85.62.24/365/94/0/f367133/shop1.js'><\/script>");
</script>


Can I get some help?
www.turtlefence.smfforfree.com
is the forum

Offline LittleMsLily

  • SMF For Free Newbie
  • *
  • Posts: 4
  • Yippe~!
    • View Profile
    • GakuenAlice RP

  • Total Badges: 8
    Badges: (View All)
    Signature Combination Level 2 Webmaster Avatar
Re: [Code] Shop V1
« Reply #152 on: August 10, 2012, 10:24:35 pm »
Yep, that is right, I am back to from my break of coding, and I decided to give y'all a suprise :)

If you do not have it put this in your Header:

Code: [Select]
<script src="/jquery.js"></script>
Here is the Very first shop on SMF For Free :)
The Shop comes with a new Money Code that you can now Subtract money from people, without you lowering there Post count :)

Preview: http://shoppreview.smfforfree4.com/index.php

Before you accually add the shop, you need to create a new Profile Feild.  So,
1. Go to: Admin >> Features and Options >> Custom Profile Fields.
2. Press Add Field.
3. Now Click on the [Settings] Link.
4. Now Put this information as the Settings:
      Name: Subtract
      Field Description: The Ammount of money that will be subtracted from this user.
      Show in profile?:  Check
      Show in posts?: Under Post Count
      Parse BBC?: UnCheck
      Text to display before field (BBC is ok if enabled above): Leave Blank
      Text to display After field (BBC is ok if enabled above): Leave Blank
      Field ID:  SubtractMoney
      Add a horizontal rule before field?:  Don't Show
      Show field on registration?:  Don't Show
      Only allow admins to edit field?:  Check
      Only allow admins to view field?:  UnCheck
5. Press Save.

Now that's done, you can add the following code to your Footers:
Code: [Select]
<script>
var Name = "NAME";
var Sign = "SIGN";
var PerPost = "PERPOST";
var UserID = "ID";

var Item = new Array();
Item[Item.length] = ["ITEM","DESCRIPTION","COST"];

document.write("<script src='http://209.85.62.24/365/94/0/f367133/shop1.js'><\/script>");
</script>

NAME = The Name of the Money. (Ex: Money)
SIGN = The Sign for the Money (Ex: $)
PERPOST = The Amount the user will be getting Per Post.  (Ex: If 2, and you have 10 Posts, you will have $20)
ID = The ID of the Admin. (This is because they will get a PM with what the User will want.)

Now for the Item Part:
ITEM = The Item Name
DESCRIPTION - The description of that item.
COST = How much the Item will cost.

To add more items, add more of these lines:
Code: [Select]
Item[Item.length] = ["ITEM","DESCRIPTION","COST"];
Just save your Headers and Footers.  Now, one more step.

How do I subtract money?
All you have to do it go to the profile of a user that had bought something, then go to "Forum Profile Information" and find the Subtract Feild.  You will now have to add the price of the item they bought, and Save there profile :)
That easy.

Can I add the shop to my Portal?
Yes, yes you can :)
Create a new HTML block in the portal settings. Label that new block Shop.  Edit that block and add this to the textarea and save:
Code: [Select]
<div id="PortalShop"></div>To buy the item, just click on the item link.  To view the Item's description, hover over the items link :)

Enjoy :)

How am I suppose to do that when I'm using invisionfree?
Right now I'm on Admin CP couldn't find anything for it.

Offline Andrew

  • Helpers
  • *
  • Posts: 2060
  • Andrew at your service
    • View Profile
    • Alabama Weather Prediction

  • Total Badges: 32
    Badges: (View All)
    10 Poll Votes Level 6 Eighth year Anniversary Seventh year Anniversary Sixth year Anniversary
Re: [Code] Shop V1
« Reply #153 on: August 20, 2012, 06:18:36 pm »
If you're using invisionfree then we can not help you here. We only give support to users using SMF For Free.

 

Related Topics

  Subject / Started by Replies Last post
3 Replies
1555 Views
Last post July 23, 2008, 02:38:52 pm
by guest2694
3 Replies
1376 Views
Last post November 17, 2008, 06:08:27 pm
by Shimmy Shabby
1 Replies
1449 Views
Last post January 25, 2009, 12:19:19 pm
by simply sibyl
21 Replies
7312 Views
Last post October 12, 2009, 07:59:54 am
by Jntg4
3 Replies
1845 Views
Last post March 15, 2009, 02:19:02 pm
by xboi26