[PHP] Inventory manager

* What is this ?

This is a simple PHP file to let you be able to view the inventory of any character.

* Why using this ?

If you are not in need of such a thing, then you should probably go back to the forums index. Alternatively you could use it for training purposes.

* How to use it ?

There are several prerequisites to use this script:

[ul]
[li]You have to make the script able to write data to directories, using CHMOD.[/li][li]You have to have an armory database. If you don’t, don’t worry, i provide the SQL for the table used.[/li][/ul]
* Wait, what does it look like ?

Here is the output of the first version i tested. Changes are three columns, english, and two buttons to (un)fold everything.

http://www.trinitycore.org/f/pastebin/aia3b6fmqya

You should only change lines from 6 to 14 included. I’ll explain all the parameters:
[FONT=‘courier new’]DATABASE_USERNAME [/FONT][FONT=arial]is your mysql username (Semms obvious).[/FONT]
[FONT=‘courier new’]DATABASE_PASSWORD [/FONT][FONT=arial]is, as expected, the corresponsing MySQL user password.[/FONT]
[FONT=‘courier new’]*_DATABASE[/FONT] [FONT=arial]defines the names of the three databases used by the script.[/FONT]
[FONT=‘courier new’]LOCAL_ICON_PATH [/FONT][FONT=arial]is the path to the directory where icons will be stored on your server.[/FONT] The script has to be able to write to that directory, and the directory has to be writable!
[FONT=‘courier new’]REMOTE_ICON_PATH [/FONT][FONT=arial]is the URL of the images from WowHead. Unless they change their directories layout, you shouldn’t have to change this.[/FONT]
[FONT=arial]Finally, [/FONT][FONT=‘courier new’]LOCAL_INDEX[/FONT] [FONT=arial]is the index of your locale. Whenever possible, the script will dump localized item names. Be advised that locale 0 does not exist. (Ant that’s[/FONT] a fail from my side)

* I do not have an armory database, what should I do ?

Don’t worry. Just create the armory database by yourself and run this SQL dump to create the used table. It’s almost a copy from Shadez’s Armory, and fits our needs. I just fixed a bug with some characters.

* F.AQ.

Q. : I ran your script and I get a LOT of missing icons, is this normal ?
A. : The script will dump data from WowHead but this won’t be displayed on the first run. Don’t ask me why I’m not fixing this, I guess i’m too lazy. For someone that knows PHP a bit that should be fairly easily fixable. If you refresh the page, all the dumped images will appear. The more you run it on different characters having different gear, the more items you will have. Alternatively, you could go to Shadez’s Armory and download the extracted icons, or even extract them by yourself. You want the 51x51 ones, but using bigger ones shouldn’t matter, as the CSS layout of the page shrinks them.

Feel free to ask anything here. I’ll eventually add them to the FAQ.

Y U NO link to a stylesheet?

Joking aside, it’s a really nice code. Mind if I translate it to spanish and post it on that sub-forum?

Neh, go ahead.

some of the functions there are not included in the code…

You have to have Pdo enabled in your php.ini file, that’s all it takes.

You also need jquery but if your using this online this shouldn’t be a problem. It only is an issue if you use this script when not connected to the Internet.

Script not working for me. Tryed alot of things its properly connected to database on $define and still when i type player guid its simply “Refresh” the page and thats all. No results and such things. Any suggestions/advices?

Anyone who can help me around, i’ve tryed almost everything and its seems its not working as intended. Configured the database but, after i enter a name to search its doesnt appear nothing, its basicly acting like ‘refresh’… anyone of kind people who could lookup into this and see if that happens to that aswell? Thanks for your time!

Are you outputting errors? PHP is pretty good about telling you exactly what’s wrong, provided you’re telling it to display errors.

Well, the thing is its not outputting nothing, its just ‘act’ like ‘refresh’… I enter a name and after that nothing happens. I wounder where it could bugout.

This tool is almost a year old, many things have changed since then.

@Subv, alright… do you know any php script like that? that can work? /emoticons/default_smile.png i’ve tryed trinitymanager and that, but seems like when inspecting players inventory it lags way to much and 99% of time i get “unable to connect” other works pretty fine.