Revolution X

Coding Community => Coding Snippets => Topic started by: slayer766 on August 07, 2009, 06:51:44 pm



Title: SMF For Free Store Mod v1
Post by: slayer766 on August 07, 2009, 06:51:44 pm
Name: Store Mod v1
Description: A Store Mod complete with Buying, Selling, Trading, and so much more! See for yourself!

Features:
Money Features
  • Money per quick reply, full reply, topic, and poll
  • Donate to other users
  • Money increase/decrease in real time right on the same page
  • Info displayed next to your posts and in your profile
    • 5 Items listed from your inventory

Store Features
  • Bank
    • Withdraw
    • Deposit
    • Interest
    • Top 5 Richest Members
  • Buy Items
    • Random Money
    • Steal Money
    • Burglary Detector
  • Inventory
    • Use Item
    • Sell Item
    • Delete Item
  • Automatic Stock Replenishment
  • Users browsing shop
  • Pagination
  • Trade Center

Admin CP Features
  • Automatic Installation
  • Store Settings
  • Edit User
    • Edit Item(s)
    • Delete Item(s)
  • Item Modification
    • Create Item
    • Edit Item
    • Delete Item
  • Configure Store CSS
A complete list of features, news and updates will be in your Store Admin CP. :)

Preview: Preview (http://slaycode.smfforfree.com/index.php)
Register, visit the Store tab.

Copyright: slayer766
Known Bugs: None
Browser Compatibility: Currently known to run in all browsers.
Installation: 4 Easy steps to follow. Actual shop installation on your board will take place in your Administration Center, once you add everything to your board below:


Step 1. Go into your Admin CP > Manage Styles > Headers/Footers > Headers:

Make sure you have this in there
Code:
<script src="/jquery.js"></script>

In your Footers, place this in there:
Code:
<script src="http://209.85.62.24/171/8/0/p198002/Storezv1.js" type="text/javascript"></script>

Now Save Headers and Footers.


Step 2. Webpage Editor Add Webpage >

WebPage Title: store
WebPage Body: Click on the HTML button in the button list. Place this code in there:
Code:
<p>
<script type="text/javascript"><!--
if($("span b:first").text() != "Guest"){
var user = $("span b:first").text();
document.write('<iframe src="http://slayer766.com/SMFMS/Storefront.php?&store=home&u=' + user + '&f=' +  smf_scripturl + '" mce_src="http://slayer766.com/SMFMS/Storefront.php?&store=home&u=' + user + '&f=' +  smf_scripturl + '" height="600px" width="100%" scrollbar="no" frameborder="0"> </iframe>');
}
// --></script>
</p>
Now click Update, and then click Add Page.


Step 3. Manage Styles > Custom Tabs > Add Custom Tab:
Title: Shop (Or whatever you want it to say)
URL: This would be the location of the webpage you JUST created. :)

The Store is on your board now, but with no items, no access to items, no css or anything. :P Now this is the part where your admin abilities come in.


Final Step. Visit your Admin CP, go to Administration Center(Which should show up by default when you enter your Admin CP), scroll down a little bit and you will see Store Admin CP. It will tell your No Installation found, you just simply click on the Install Now! button and you're done!

You can now Edit, Delete, Create Items, Create/Edit/Delete User Items, set how much you want per poll/reply/topic, and a ton of other stuff! Have fun!


If you experience ANY problems please post them here and I will fix them ASAP. If you have any suggestions, feedback please post them here or here (http://slaycode.smfforfree.com/index.php/board,3.0.html). It's much appreciated. :)

I would like to thank those who have helped test this out, those boards include Revolution X and Partners In Crime. Thanks you guys! :D Another thanks to Moose for making the code post credits for quick reply. ;)


Title: Re: SMF For Free Store Mod v1
Post by: Lyle on August 07, 2009, 06:52:29 pm
Wow! slayer...they just added to the forums..and youve already realeased

great job....keep up the good work


Title: Re: SMF For Free Store Mod v1
Post by: Agent Moose on August 07, 2009, 07:47:06 pm
Go slayer!

I love the code, and I'm sure everyone will love it :)


Title: Re: SMF For Free Store Mod v1
Post by: slayer766 on August 08, 2009, 10:47:24 am
Thanks for the comments.  8)


Title: Re: SMF For Free Store Mod v1
Post by: Nottz on August 08, 2009, 11:37:36 am
The Code Is Amazing.
Great Job. ;)


Title: Re: SMF For Free Store Mod v1
Post by: Nick on August 09, 2009, 04:52:31 pm
I love the store; awesome job, slayer :)

1 suggestion:
When an item is bought, is there anyway to make it to where it sends a PM to the Root Admin (User 1) with who bought it and what the item was?

If not, it's fine


Title: Re: SMF For Free Store Mod v1
Post by: slayer766 on August 09, 2009, 05:01:48 pm
Thanks. :)


Why do you want that?  :o


Title: Re: SMF For Free Store Mod v1
Post by: Nick on August 09, 2009, 05:40:25 pm
Thanks. :)


Why do you want that?  :o

Because I plan to "sell" certain features in the shop, eg. Coloring your user name across the board. Since that's on a member ID basis, I can control who gets it. I would "sell" that feature for money to active members.

Again, if you don't want to do it/it's not possible, that's fine


Title: Re: SMF For Free Store Mod v1
Post by: Agent Moose on August 09, 2009, 05:40:59 pm
Like I was saying to you a couple of days ago slayer, people would want an effect that sends a certain user(s) a PM so they can get an item.

Say people had an item in the store that called "Bold Username".  Well, with that item, all they would have to do is buy it, and it will send the user specified a PM saying that {user} wants the Bold Username.  Then the Admin can add my Change Username Across Board code and make it so their name will be bold :P


Title: Re: SMF For Free Store Mod v1
Post by: slayer766 on August 09, 2009, 05:52:25 pm
I believe this can be accomplished through the store without the use of a PM. ;) I'll write that soon, I have other features to create beforehand.


Title: Re: SMF For Free Store Mod v1
Post by: Santadomin on August 20, 2009, 01:47:42 am
Awesome code mate, im definately using this one! ... but how do i add a custom picture to an item? i tried a url and a [IMG]URL ..too but neither worked ...


Title: Re: SMF For Free Store Mod v1
Post by: slayer766 on August 20, 2009, 08:37:57 am
What url did your try?

I own color username item. :P I'm going to add that to admin controls so admins can add that item. Currently I have it only set up so it colors your name red...I'm obviously going to finish that up but later.


Title: Re: SMF For Free Store Mod v1
Post by: Agent Moose on August 20, 2009, 01:54:53 pm
Tahts why my name is red!  I was wondering why >.<

Darn you and your awesomeness slayer :P

Thats weird...I used the color username and it made it regular :P  Oh well, I like it regular better :P


Title: Re: SMF For Free Store Mod v1
Post by: slayer766 on August 20, 2009, 02:02:42 pm
Yeah you can't "Use" it, I need to make it so you can't use it. Once you have the color username item it's colored.


Title: Re: SMF For Free Store Mod v1
Post by: Agent Moose on August 20, 2009, 02:04:31 pm
Ah, how do you plan on making it different colors :P


Title: Re: SMF For Free Store Mod v1
Post by: slayer766 on August 20, 2009, 02:44:01 pm
Not sure yet, trying to figure out a way on how exactly that would work out.


Title: Re: SMF For Free Store Mod v1
Post by: Jish on August 22, 2009, 07:58:22 pm
NIce man!


Title: Re: SMF For Free Store Mod v1
Post by: slayer766 on August 24, 2009, 09:50:37 am
Thanks. ^_^

You can now choose from 9 different colors to change your username color with the color username item.


Title: Re: SMF For Free Store Mod v1
Post by: Qub1 on August 25, 2009, 12:52:09 pm
Why did it say: Error. User opened page in a new window. Ban., I didn't open a new window, I was just clicking the buy button, and suddently the shop is down or something. Is anyone else experiencing the same problem? Anyway, nice code  O0

Please help!


Title: Re: SMF For Free Store Mod v1
Post by: Agent Moose on August 26, 2009, 05:08:50 pm
Slayer, I think you should just remove that little ban type thing.  I mean, people are having a problem with it, and they can't view anything anyway, so why not just have it so it redirects, and nothing else?


Title: Re: SMF For Free Store Mod v1
Post by: slayer766 on August 28, 2009, 07:57:08 pm
Yeah it's been removed. Qub you shouldn't have any problems with the code now.


Title: Re: SMF For Free Store Mod v1
Post by: Qub1 on September 04, 2009, 03:49:06 pm
Thanks, it works great  ;) Very nice code i've seen in a long time...  O0