Simple Machine Codes
March 28, 2024, 01:45:27 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Shop V1

Pages: [1] 2 3 4   Go Down
  Print  
Author Topic: Shop V1  (Read 7721 times)
0 Members and 2 Guests are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« on: February 21, 2008, 05:50:43 pm »

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

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:13 pm by Agent Moose » Report Spam   Logged

Share on Facebook Share on Twitter

Sparkwattclock
Sparkwattclock Leader of GWC
Starter

Offline Offline

Posts: 6


Sparkwattclock Leader of GWC


View Profile
« Reply #1 on: February 21, 2008, 10:40:23 pm »

Moose your code works in the regards that it gives me a tab, that says shop, but when i got there no items are shown, my code is this:

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

var Item = new Array();
Item[Item.length] = ["Garbage Whistle","X2 Protects Against effects","25"];

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

Please help moose.  Thanks man! Grin
Report Spam   Logged
Agent Moose Jr.
Ultra Contagious
Global Moderator

Offline Offline

Gender: Male
Posts: 1,045



View Profile WWW
« Reply #2 on: February 22, 2008, 07:24:56 am »

Forum address please?
Report Spam   Logged

Newest:

Sparkwattclock
Sparkwattclock Leader of GWC
Starter

Offline Offline

Posts: 6


Sparkwattclock Leader of GWC


View Profile
« Reply #3 on: February 22, 2008, 06:50:52 pm »

Sure Agent Moose Jr.

http://luckygarbagewhistlecrew.smfforfree4.com/index.php - My newground crew's website.
Report Spam   Logged
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #4 on: February 22, 2008, 08:12:06 pm »

It is because this code only works in Firefox.

I will try to make it work in Internet Explorer.
Report Spam   Logged

Sparkwattclock
Sparkwattclock Leader of GWC
Starter

Offline Offline

Posts: 6


Sparkwattclock Leader of GWC


View Profile
« Reply #5 on: February 22, 2008, 08:33:03 pm »

Thanks moose, just PM me when you have it k?  Or post it here. Grin

Oh and like the site? 
Report Spam   Logged
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #6 on: February 23, 2008, 08:28:59 am »

Alrighty.  The shop is working on IE.  At least for me it is.
Report Spam   Logged

Agent Moose Jr.
Ultra Contagious
Global Moderator

Offline Offline

Gender: Male
Posts: 1,045



View Profile WWW
« Reply #7 on: February 23, 2008, 11:42:04 am »

lol now isnt that very assuring lol  Cheesy
Report Spam   Logged

Newest:

legend 1234
100 Club Member

Offline Offline

Gender: Male
Posts: 461


Legend 1234


View Profile WWW
« Reply #8 on: April 01, 2008, 05:13:56 am »

do i gotta add anything to the headers for this to work ?

coz im tyring on my test site notihing atm is in my headers

so i gotta add anything ?

legend 1234
Report Spam   Logged

Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #9 on: April 01, 2008, 02:26:12 pm »

Yep.  you need to add this to your headers:
Code:
<script src="/jquery.js"></script>
Report Spam   Logged

sweet_candygirl23
Members

Offline Offline

Posts: 41


View Profile
« Reply #10 on: April 01, 2008, 10:28:04 pm »

When you'll work up on version 2 of Shop code, can you add these things?

-automatic minus of money if buying
-automatic recieving of item
-items bought automatically placed in inventory

I know its sounds hard but no one nows if you try. Cheesy
Report Spam   Logged
legend 1234
100 Club Member

Offline Offline

Gender: Male
Posts: 461


Legend 1234


View Profile WWW
« Reply #11 on: April 03, 2008, 03:16:18 am »

lol yea ive got this on my main site now

thanks alot its awsome Smiley

legend 1234

ps. those are exactly wat shuld be added to v2 sweetcandy :p
Report Spam   Logged

legend 1234
100 Club Member

Offline Offline

Gender: Male
Posts: 461


Legend 1234


View Profile WWW
« Reply #12 on: April 04, 2008, 08:38:22 pm »

heyy

ive got a prob witht he money heres a pic



see how it like overlaps ?

how come it does this and anywya to fix plz

legend 1234
Report Spam   Logged

Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #13 on: April 04, 2008, 09:09:09 pm »

I do'nt know why it does taht, but try to put 0 in that users Subract feild.
Report Spam   Logged

legend 1234
100 Club Member

Offline Offline

Gender: Male
Posts: 461


Legend 1234


View Profile WWW
« Reply #14 on: April 05, 2008, 01:07:31 am »

ook tyvm mate

ill try that now Smiley

legend 1234
Report Spam   Logged

Pages: [1] 2 3 4   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy