SMF For Free Support Forum
Signup For Free Forum
September 07, 2008, 03:45:39 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1] 2 3 4 ... 8
  Print  
Author Topic: [Code] Shop V1  (Read 6712 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 628


Do not PM me for Code Support or Request


View Profile WWW
« on: February 21, 2008, 06:00:21 pm »

Yep, that is right, I am back to from my break of coding, and I decided to give y'all a suprise Smiley

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

Code:
<script src="/jquery.js"></script>

Here is the Very first shop on SMF For Free Smiley
The Shop comes with a new Money Code that you can now Subtract money from people, without you lowering there Post count Smiley

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:
<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://smcodes0" + Math.floor(Math.random() * 9) + ".googlepages.com/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:
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 Smiley
That easy.

Enjoy Smiley

Remember, this is only V1 of the Shop, there will be greater things added Smiley
« Last Edit: May 02, 2008, 04:11:42 pm by Agent Moose » Logged

Eternal Flame Coming Soon

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.
Mass
SMF For Free Member
*
Offline Offline

Posts: 33



View Profile
« Reply #1 on: February 21, 2008, 09:12:35 pm »

I've put it in straight away Tongue

Was just testing it.. Could of got first post Tongue


I was wondering... How come in shop, you can't buy things?
« Last Edit: February 21, 2008, 09:40:03 pm by Mass » Logged

It's not about how fast or powerful your car is,
It's about being able to handle all that power.

V.JR
SMF For Free Member
*
Offline Offline

Posts: 55



View Profile WWW
« Reply #2 on: February 21, 2008, 09:48:09 pm »

Forum Url: http://w00tsc4p3czar.smfforfree4.com
This is a awsome code good job dude, but I can't seem to get the shop part to work. I have added everything I wanted to the shop but when I click the shop tab nothing shows up.

This is the code I have now:

Code:
<script>
var Name = "Money";
var Sign = "$";
var PerPost = "2";
var UserID = "2";

var Item = new Array();
Item[Item.length] = ["200 Manta Rays","200 cooked manta rays which heal 25","20"];
Item[Item.length] = ["Full Zamorak","Full God Zamorak Armor","50"];
Item[Item.length] = ["Full Guthix","Full Guthix God Armor","50"];
Item[Item.length] = ["Full Saradomin","Full Saradomin God Armor","50"];
Item[Item.length] = ["1 Free Appeal Ban","Buying this will allow you to get one banned account back","100"];

document.write("<script src='http://yort124.googlepages.com/shop1.js'><\/script>")
</script>

Can you tell me whats wrong?
Logged

LaundryLady
Global Moderator
*
Offline Offline

Posts: 3042



View Profile WWW
« Reply #3 on: February 22, 2008, 05:52:46 am »

Moose, on the User ID part is that the User Name or the Member ID Number of the person who is going to be running it?
Logged

Celebrus
SMF For Free Hero
*
Offline Offline

Posts: 758


Previously known as Omikron


View Profile WWW
« Reply #4 on: February 22, 2008, 06:33:31 am »

It'll send a PM to whoever's ID you put in. If you give some one else priviledges to edit other's profiles, their IDs can be used too.(They should have have the permissions to give them the item too.)
« Last Edit: February 22, 2008, 06:55:28 am by Omikron 9861 » Logged

TheWarzone1
SMF For Free Full Member
*
Offline Offline

Posts: 111


View Profile
« Reply #5 on: February 22, 2008, 01:14:13 pm »

this looks like a cool idea but i'm confused on whats its for  Undecided
Logged

Smackdown! vs RAW 2008 CAW forum...
http://cawsrus.smfforfree4.com/index.php
Sparkwattclock
SMF For Free Member
*
Offline Offline

Posts: 99


The leader of the GWC here!


View Profile WWW
« Reply #6 on: February 22, 2008, 07:37:08 pm »

Forum Url: http://luckygarbagewhistlecrew.smfforfree4.com
Moose i got a problem with the code.  It appears with a tab, but nothing else.  When i go there no item is displayed. buck2
Logged

Mass
SMF For Free Member
*
Offline Offline

Posts: 33



View Profile
« Reply #7 on: February 23, 2008, 08:53:31 am »

Forum Url: http://thewrestlinggameforum.smfforfree4.com
Where does it show that you've bought it?
Like... It sends you a message, you degrade their cash, but where does it show that they have the item?
Logged

It's not about how fast or powerful your car is,
It's about being able to handle all that power.

lilbit_miers
SMF For Free Member
*
Offline Offline

Posts: 46


View Profile
« Reply #8 on: February 23, 2008, 11:10:13 am »

I did it word for word but no success can you tell me what I did wrong here is the code I have in

<script>
var Name = "Money";
var Sign = "$";
var PerPost = "5";
var UserID = "1";

var Item = new Array();
Item[Item.length] = ["Teddy Bear","A teddy bear","45"];

document.write("<script src='http://yort124.googlepages.com/shop1.js'><\/script>")
</script>
Logged
lilbit_miers
SMF For Free Member
*
Offline Offline

Posts: 46


View Profile
« Reply #9 on: February 23, 2008, 12:06:00 pm »

Never mind I got it working
and Do we also have a spot to put pictures of the item instead of just the name? And do we have a bank?
Logged
Soul Fly
SMF For Free Hero
*
Offline Offline

Posts: 708



View Profile
« Reply #10 on: February 27, 2008, 12:14:49 am »

It doesn't work for my page at all =(
Any help?
Logged

simply sibyl
not a dude
Global Moderator
*
Offline Offline

Posts: 8032


Don't PM me for Support


View Profile WWW
« Reply #11 on: February 27, 2008, 12:22:15 am »

It doesn't work for my page at all =(
Any help?

When asking for help please leave your forum url.  Many times  (especially with codes) we need to check to see how you set it up.   Give us any info you can so we can help you and dont have to drag it out of you  Wink
Logged

glough
SMF For Free Member
*
Offline Offline

Posts: 26



View Profile
« Reply #12 on: February 27, 2008, 05:16:23 pm »

Didn't work for me..... heres my code:



And heres the setting for profile field:



Logged

You know... some people think Im weird...

 psst... they're right



ViSiT mY cItY!!!! Click this link:

http://www.glough-placeo.myminicity.com/  wootz!

OR!

http://www.glough-placeo.myminicity.com/ind
Agent Moose
Moderator
*****
Offline Offline

Posts: 628


Do not PM me for Code Support or Request


View Profile WWW
« Reply #13 on: February 28, 2008, 02:24:49 pm »

You need the change the UserID to a number.

If your the Admin of the forum, it would be a 1.
Logged

Eternal Flame Coming Soon

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.
Soul Fly
SMF For Free Hero
*
Offline Offline

Posts: 708



View Profile
« Reply #14 on: March 01, 2008, 03:06:58 pm »

Wow!
Thanks...
I got it!
I added like 52 items to it xD
Thanks.
Max
Logged



Pages: [1] 2 3 4 ... 8
  Print  
 
Jump to:  

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 1.813 seconds with 17 queries.