Jump to content
MakeWebGames

Recommended Posts

Posted

This small mod will allow staff to decide which Links to show in inventory usually only SEND or EQUIP are hidden if you dont have items that do either so your left with SEND, ADD TO MARKET, or AUCTION, SELL which are always shown to the user but supposing we dont want RARE items to be sent to a user or added to the market. so heres how

open up inventory.php find..

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

and replace with

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Ive just added 3 cut off switches showauction, showend and showmarket if you have more then just keep adding to it..

Now open up staff_items.php where you create your new item

find <b>Usage Form</b>

and above it add

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

now goto the INSERT INTO part and add this (ONLY IF YOU HAVENT MODIFIED YOUR COPY)

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Now for the EDIT ITEM part add

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

before USAGE FORM

and the UPDATE is

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

and add the new SQLS to phpmyadmin

ALTER TABLE items ADD showsend TINYINT(2) NOT NULL DEFAULT 0;

ALTER TABLE items ADD showauction TINYINT(2) NOT NULL DEFAULT 0;

ALTER TABLE items ADD showmarket TINYINT(2) NOT NULL DEFAULT 0;

ALTER TABLE items ADD showgiveclan TINYINT(2) NOT NULL DEFAULT 0;

 

and your done

Posted

well done, however you are missing something...

a user if they are smart, (most are) will go to the auction page or whatever page it is and alter the ID number in the url to the item that shows no link, and would be able to use such if you have nothing blocking them from doing so on those pages...

why not just do something similar such as using 1 field and make it enum yes/no

and then make if statements rather you have picked it for the item when you created or edited the item?

then in the useage page just add same if statements as you would in the inventory page to block them from altering the url id?

Just a suggestion that is much simpler lol.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...