- <a href="?op=add_dpts">Add Donation Points</a>
Response to: viewtopic.php?f=28&t=137
I’ve written this new version of the item mall because the previous one was just bad… To heavy and crappy coded. This one is better. I’ve removed pretty much of the HTML code, all tables are handled within a self-written table class. So that cleared up a lot or old code, it just needs to be tested. If anyone is willing to sacrifice their free time feel free.
Code should be easy readable.
Quick how-to:
table: mall_category
Make a list of all your categories etc
- cid : Category ID – auto increment
- ctitle: Category title
- cdesc: Description of category
- cparent: -1 to show on the main page, an different number referring to the cid from an other category, so you’ll get a sub category.
- cminlevel: To get like VIP – Only items. Or GM only items for GMs that can’t make items or something. Or to create different levels like 101, 104 etc…
- chidden: 0 to show, 1 to hide the category (like if you’re adding stuff so it won’t show up for other users. But you can also set the cminlevel to 300+ or so depending on what you like)
Put the available items in here. Tables speak for them self. Field image is not used.. Could be added when necessary.
The other things speak for them self eg
- item_id: 337
- item_type: 11
- item_name: Topaz [7]
- item_desc: +35int
This holds all the items you’re about to sell.
- cid: Category id -> from mall_category
- iid: item id -> from mall_items
- price: INTEGER format, could also be negative to increase someone’s money?! Be warned! Lol
- payment: Z for zully, D: for donationpoints
- quantity: amount of that items, eg: 999 and for bullets would give you 999 bullets off course.
- ref_able: is the item refineable if yes add a number between 1-9 for the grade to give
- soc_able: does the item contain a socket?
To make it load in as a module
It has to be included in an other page (or to make it standalone it requires a random parameters to make the url checking posible eg: itemmall_v2.php?p=itemmall_or_what_ever
In the itemmall_v2 You'll find:
// Configuring some data
$item_mall->setlog(true); // enable/disable to create an information stream of who bought what
$item_mall->setaccount_id(1); // set the users account ID
$item_mall->setalevel(100); // set the users access level
You'll have to retrieve the account id, and the access level to get the stuff to work fine.
Download: DOWNLOAD NOW!
Password: myrose
Dynasty CMS plugin
Add this file to your administrator's dir, and than you can add a new link to in your administrator's panel.
Warning: Don't forget to change the SQL queries if you use an the other donation field.