PHP Simple Item Editor
Hi all,
http://www.ageofkunark.com/itemeditor.zip http://www.ageofkunark.com/eqie.jpg I thought I'd post this as I made it for use on my server and find it's a great help for fast production of items. It's dirty (oh so dirty) so don't get mad if it doesn't do what you want! Couple of things to note before you start using it: * I use autonumber on my items table - you will need to do the same to use this tool (make sure you don't go over your server item limit! * For the sake of all that is good make sure you password protect your eqie folder using something like .htaccess. I didn't waste time building a login system. Enjoy, I hope it's more understandable for you php coders out there (but like I say it's slightly messy) Have fun Bolly |
Nice tool. Thanks for the hard work.
|
Item Editor..
Good job.
been waiting a few months for something like this. I been getting a lot of request for custom items and this does the trick. you made quite a few people happy. |
Yes, very nice! Thank you!
|
This is great!
One thing I may report? You need to escape out single quotes, as some items have a ' in their name. The way the editor is now, it breaks if you try to edit any item (or lore) with an apostrophe. |
Item Editor..
Quote:
Treid it last night...seems it inserts above max_id and crashes the server so you wantto watch what you duplacate for now. |
I'm referring to the fact that anything with an apostrophe needs an "escape" a \ before the ' to be read correctly.
The code is stripping them out (no logic to handle the escapes), which is cutting off anything in a name past the ' It's a show stopping bug because it can corrupt item names with an apostrophe in them. |
ok
Quote:
|
|
Quote:
|
This can be confusing sometimes if magic_quotes_gpc are enabled in PHP. This setting automagically escapes single and double quotes on POSTed data, but doesn't actually insert the escape characters into the DB. So, the data will post properly, but will need escaped when echoing into the form HTML.
On the other hand, if magic_quotes_gpc is off on your system, the single quotes might be breaking your insert query string, so the data isn't making it to the DB properly. Either way, using double quotes to delimit your string values in the HTML form is an easy way to deal with single quotes. This is, of course if you don't plan on ever having strings that have double quotes in them. If you do, you could always do some str_replace()'s with ascii values for quotes. |
So yeah, until that is addressed and fixed I cannot recommend this excellent script to anyone.
...and that sucks. I'd fix it, honest I would, if I only had time. I'm so buried in the upkeep of my own server and the other projects I've already taken on. :( |
Does your server happen to be down.. I've been getting ping timeouts for the past 2 hours =S
|
Anyone mind hosting this?
|
Here:
http://stash.buttwrenching.com/itemeditor.zip ...but like I said in its current form it can corrupt the db, due to improper string handling so I don't recommend you actually use it as it is now. IF someone fixes it, e-mail the fix to gernblanATgmailDOTcom and I will host that version for everyone instead. |
spsst!
Code:
function edititem Code:
function edititem($postitem,$value) |
BTW, this is why I would like to create an EQEMU mirror =)
Also to call that function while the array results with that function in it... such as... Code:
while ($somearray['ID'] > 0) |
Still need a fix for apostrophes though... they must be escaped or item names, etc. can get truncated which would be bad.
Great work on the optimizations, however!! |
can do a streplace for ' to ' But you'll have to do the sting replace in quotes instead of apostrophies =).
Something like str_replace("'","'") there should be some other perameters, yes but thats the gist of it. To make it safe, I'd also do another thats str_replace('"','"e;') to get rid of any escaping quotes =) |
Yeah but I'm too bad with PHP still to actually do it.
If anyone out there can fix this script up and then post it I know it would help a lot of people. It's VERY good. It just needs to not destroy item names if they contain an apostrophe. |
Quote:
This can also be done with the PHP command addslashes() on a per-command basis. |
hi guys, long time no speak. I just noticed loads of you had responded but i didn't even realise!
i'll take your notes and make some changes and release an update next weekend for the latest version take care inky |
hey all, went to work on this but was unable to find my backup. Can anyone paste a mirror?
Cheers |
Anyone have a current link to this file? Thanks!
|
I can host it too if someone would send it to me, would like to try it out myself
|
All times are GMT -4. The time now is 12:36 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.