Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Mar 8, 2011 15:45:39 GMT -8
Proboards Support code request board apparently has no attachment feature so I'll post this here instead. Attached you'll find the complete YourShop code which can be rehostedTo rehost (see this topic for a list of free hosts if you don't have one already) - If your host supports uploading the entire archive then simply upload the entire archive to your host and it should do the rest by extracting the files keeping the folder structure intact.
Note: If you use 00webhost.com you'll first need to convert the RAR file to a ZIP or TAR file first since that host does not support RAR uploads.
If your host does not have this archive upload option then you'll need to extract the files yourself using whatever program you have installed that understands the RAR compression format (e.g. winRAR). If your host supports FTP transfer then upload the extracted files and folders using FTP making sure that the folder structure is recreated on your host. If no FTP access on your host you should then create the following folders Once you've created the folder structure upload the files making sure they go into the appropriate folder as they appear in the RAR file.
- You'll need to edit the following line in the main.js file (located in the 0.3 folder - edit prior to upload if your host offers no editing feature):
function addScript(url){ newChild = document.createElement("script"); newChild.type = "text/javascript" newChild.src = shopHost+url; newChild.defer = "true"; document.getElementsByTagName("head").item(0).appendChild(newChild); }
- If you you're using the default items that came with the code (haven't added any custom shop items or removed any) then replace the forum's footer portion of the code with the following (if you modified the code to use your own items then you'll need to follow the manual editing instructions):
</script><script type="text/javascript"> <!-- /* YourShop Version 0.3
Copyright 2005-2008 Bradley Nelson a.k.a CCWorld All Rights Reserved
For use on Proboards Boards only. This Header must remain intact at all times. Do not re-post without permission. */
// staff that can mange shop settings var shopAdmin = [ "admin" ];
// staff that can edit money // Note: Users in shopAdmin DO NOT need to be listed here too var shopStaff = [ "nimda" ];
var moneyName = "Dollars"; var moneySym = "$"; var moneyPP = 5; var shopOn = 1; var shopSig = 0; var shopAvatar = 1; var shopHost = "http://yourhost.com/path_to_shop/YourShop 0.3/"; var allowDonations = 1; var useButton = 0; var maxItems = -1; // DO NOT leave blank if useButton is enabled! var buttonUrl = shopHost+"shop/menu/card_shop.gif"; /*ITMLSTSTRHRE*/ var addOnItems = [ [0,"Basic Axe",shopHost+"shop/items/axe.gif",500,"A basic battle axe.", 0,1], [1,"Bunch of Balloons #1",shopHost+"shop/items/balloonbunch.gif",250,"The first bunch of brightly colored balloons.", 0,3], [2,"Blob",shopHost+"shop/items/blob.gif",800,"Buy your very own pet blob!", 0,4], [3,"Bunny",shopHost+"shop/items/bunny.gif",900,"Buy your own pet bunny! Nice and fluffy...", 0,4], [4,"Chain Mace",shopHost+"shop/items/chainmace.gif",750,"High quality iron chain mace.", 0,1], [5,"Cross",shopHost+"shop/items/cross.gif",650,"A solid stone cross.", 0,2], [6,"Cutlass",shopHost+"shop/items/cutlass.gif",800,"A well constructed cutlass.", 0,1], [7,"Dagger",shopHost+"shop/items/dagger.gif",300,"A short, easily concealible dagger.", 0,1], [8,"Dark Blue Balloon",shopHost+"shop/items/dbballoon.gif",75,"A dark blue balloon.", 0,3], [9,"Double Axe",shopHost+"shop/items/doubleaxe.gif",950,"A double sided battle axe.", 0,1], [10,"Fire Axe",shopHost+"shop/items/fireaxe.gif",850,"An axe enchanted with fire.", 0,1], [11,"Fire Sword",shopHost+"shop/items/firesword.gif",800,"A sword enchated with fire.", 0,1], [12,"Green Balloon",shopHost+"shop/items/gballoon.gif",75,"A green balloon.", 0,3], [13,"Hammer",shopHost+"shop/items/hammer.gif",300,"A strudy metal hammer.", 0,2], [14,"Hand Axe",shopHost+"shop/items/handaxe.gif",400,"A small, but nice hand axe.", 0,1], [15,"Harp",shopHost+"shop/items/harp.gif",650,"Make music (or at least noises) with this nice golden harp.", 0,2], [16,"Light Blue Balloon",shopHost+"shop/items/lbballoon.gif",75,"A light blue balloon.", 0,3], [17,"Bow",shopHost+"shop/items/makebow.gif",550,"A low quality make-shift bow.", 0,1], [18,"Mallet",shopHost+"shop/items/mallet.gif",150,"A cheap, wooden mallet.", 0,2], [19,"Minning Equipment",shopHost+"shop/items/mineeqp.gif",450,"A collection of minning equipment.", 0,2], [20,"Purple Balloon",shopHost+"shop/items/pballoon.gif",75,"A purple balloon.", 0,3], [21,"Penguin",shopHost+"shop/items/penguin.gif",1000,"Your very own pet penguin! Straight from the south pole.", 0,4], [22,"Red Balloon",shopHost+"shop/items/rballoon.gif",75,"A red balloon.", 0,3], [23,"Royal Bow",shopHost+"shop/items/royalbow.gif",1200,"A very high quality bow with all the accessories you could want.", 0,1], [24,"Shovel",shopHost+"shop/items/shovel.gif",150,"A simple shovel.", 0,2], [25,"Spiked Club",shopHost+"shop/items/spikedclub.gif",400,"A basic club covered in spikes.", 0,1], [26,"Sword",shopHost+"shop/items/sword.gif",650,"The basic sword.", 0,1], [27,"Water Sword",shopHost+"shop/items/watersword.gif",800,"A sword enchanted with water.", 0,1], [28,"Wooden Club",shopHost+"shop/items/woodenclub.gif",150,"A thick club of wood.", 0,1], [29,"Yellow Balloon",shopHost+"shop/items/yballoon.gif",75,"A yellow balloon.", 0,3], [30,"Bunch of Balloons #2",shopHost+"shop/items/balloonbunch2.gif",250,"The second bunch of brightly colored balloons.", 0,3], [31,"Purple Heart Balloon",shopHost+"shop/items/phballoon.gif",85,"A purple balloon shaped like a heart.", 0,3], [32,"Red Heart Balloon",shopHost+"shop/items/rhballoon.gif",90,"A red balloon shaped like a heart.", 0,3], [33,"Silver Earings",shopHost+"shop/items/searings.gif",1250,"A pair of silver earings.", 0,5], [34,"Gold Earings",shopHost+"shop/items/gearings.gif",2500,"A high quality pair of gold earings.", 0,5], [35,"Empty Potion Bottle",shopHost+"shop/items/nopotion.gif",50,"A bottle that could hold a potion, but is instead empty.", 0,6], [36,"Red Potion",shopHost+"shop/items/redpotion.gif",650,"A bottle contaning a special red potion.", 0,6], [37,"Green Potion",shopHost+"shop/items/greenpotion.gif",650,"A bottle contaning a special green potion.", 0,6], [38,"Blue Potion",shopHost+"shop/items/bluepotion.gif",650,"A bottle contaning a special blue potion.", 0,6], [39,"Red Pill",shopHost+"shop/items/redpill.gif",600,"A single red pill.", 0,6], [40,"Red Pills",shopHost+"shop/items/redpills.gif",1300,"Three red pills.", 0,6], [41,"Blue Pill",shopHost+"shop/items/bluepill.gif",600,"A single blue pill.", 0,6], [42,"Blue Pills",shopHost+"shop/items/bluepills.gif",1500,"Three blue pills.", 0,6], [43,"Med Kit",shopHost+"shop/items/medkit.gif",1800,"A med kit contaning everything you'd ever need.", 0,6], [44,"Brown Cloths",shopHost+"shop/items/brownshirt.gif",550,"A brown shirt and a pair of pants.", 0,5], [45,"Yellow Cloths",shopHost+"shop/items/yellowshirt.gif",550,"A yellow shirt and a pair of pants.", 0,5], [46,"Red Cloths",shopHost+"shop/items/redshirt.gif",550,"A red shirt and a pair of pants.", 0,5], [47,"Purple Cloths",shopHost+"shop/items/purpleshirt.gif",550,"A purple shirt and a pair of pants.", 0,5], [48,"Green Cloths",shopHost+"shop/items/greenshirt.gif",550,"A greem shirt and a pair of pants.", 0,5], [49,"Blue Cloths",shopHost+"shop/items/blueshirt.gif",550,"A blue shirt and a pair of pants.", 0,5], [50,"Black Cloths",shopHost+"shop/items/blackshirt.gif",550,"A black shirt and a pair of pants.", 0,5], [51,"Small Pile of Coins",shopHost+"shop/items/smcoins.gif",500,"A small pile of coins.", 2,7], [52,"Medium Pile of Coins",shopHost+"shop/items/medcoins.gif",1000,"A medium pile of coins.", 2,7], [53,"Large Pile of Coins",shopHost+"shop/items/bigcoins.gif",1500,"A large pile of coins.", 2,7], [54,"Treasure Chest",shopHost+"shop/items/treasure.gif",2500,"A treasure chest fillied with coins.", 2,7], [56,"Blue Jewel",shopHost+"shop/items/bluejewel.gif",500,"A shiny blue jewel.", 0,7], [57,"Green Jewel",shopHost+"shop/items/greenjewel.gif",500,"A shiny green jewel.", 0,7] ]; var cMaxItems = 57; /*ITMLSTENDHRE*/ /*SHPITMSTRHRE*/ var shopItems = { title: { available: 0, amount: 0 }, sig: { available: 1, amount: 100 }, avatar: { available: 1, amount: 100 }, usernameBold: { available: 1, amount: 100 }, usernameItalic: { available: 1, amount: 100 }, usernameColor: { available: 1, amount: 100 }, usernameUline: { available: 1, amount: 100 }, rank: { available: 1, amount: 500, max: 5 } }; /*SHPITMENDHRE*/ /*SHPRNKSRTHRE*/ var shopRanks = [ [0, "Blue", shopHost+"shop/stars/starblue.gif"], [1, "Red", shopHost+"shop/stars/starred.gif"], [2, "Green", shopHost+"shop/stars/stargreen.gif"], [3, "Small Yellow", shopHost+"shop/stars/star.gif"], [4, "Large Yellow", shopHost+"shop/stars/staryellow.gif"], [5, "Pink", shopHost+"shop/stars/starpink.gif"], [6, "Purple", shopHost+"shop/stars/starpurple.gif"], [7, "Black", shopHost+"shop/stars/starblack.gif"], [8, "Grey", shopHost+"shop/stars/stargrey.gif"], [9, "White", shopHost+"shop/stars/starwhite.gif"] ]; var cMaxRanks = 9; /*SHPRNKENDHRE*/ /*SHPCATSRTHRE*/ var shopCats = [ [1, "Weapons"], [2, "Tools/Other"], [3, "Balloons"], [4, "Animals/Pets"], [5, "Clothing"], [6, "Medical"], [7, "Jewels"] ]; var cMaxCats = 7; /*SHPCATENDHRE*/ //--> </script> <script type="text/javascript" src="http://yourhost.com/path_to_shop/YourShop 0.3/shop/0.3/main.js"></script>
make sure to replace where ever it says ""http://yourhost.com/path_to_shop/YourShop 0.3" with the actual path to the shop on YOUR host
Manual Edit (for those that use custom shop items):
Edit the portion of the code that goes in your forum's footer to add the following variable: var moneyName = "Dollars"; var moneySym = "$"; var moneyPP = 5; var shopOn = 1; var shopSig = 0; var shopAvatar = 1; var shopHost = "http://yourhost.com/path_to_shop/YourShop 0.3/"; var allowDonations = 1; var useButton = 0;
*don't forget that trailing slash at the end *make sure to replace where ever it says ""http://yourhost.com/path_to_shop/YourShop 0.3" with the actual path to the shop on YOUR host *if you didn't put the shop in a sub-folder then path_to_shop/ would obviously be omitted As an example I elected to put the shop in a subfolder named scripts and within that folder another subfolder named proboards so my final url would look something like myhost.com/scripts/proboards/YourShop 0.3/
You should then edit any images in the footer portion of the code to point to your host rather then pb.ccsr.us, for example [0,"Basic Axe","pb.ccsr.us/shop/items/axe.gif",500,"A basic battle axe.",0,1], would become [0,"Basic Axe",shopHost + "shop/items/axe.gif",500,"A basic battle axe.",0,1],
If for any reason you need to move your shop files to a new host all you need to edit is that new line var shopHost in the footer portion of the code so it points to the new host. Attachments:
|
|