spellbyte ® Posted January 10, 2007 Posted January 10, 2007 I have had several people asking me how to do this so i will post it here for all to see run this sql query You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then simply add this to whatever page u want to display the picture it's really very simple or use this unedited inventory.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. replace that if you have not modified your inventory.php before Quote
seanybob Posted January 10, 2007 Posted January 10, 2007 Re: item images If i remember correctly... once you add that variable to the items table, if you want to be able to create/delete/edit items on the admin panel, wherever you have it insert an item into the table in the admin panel, add an extra '' on the query for example, in my edit items function, this query is present mysql_query("INSERT INTO `items` ( `itmid` , `itmtype` , `itmname` , `itmdesc` , `itmbuyprice` , `itmsellprice` , `itmbuyable` , `itmpic` ) VALUES ('{$_POST['itmid']}', '{$_POST['itmtype']}', '$itmname', '$itmdesc', '{$_POST['itmbuyprice']}', '{$_POST['itmsellprice']}', '$itmbuy')", $c); you would have to change that to mysql_query("INSERT INTO `items` ( `itmid` , `itmtype` , `itmname` , `itmdesc` , `itmbuyprice` , `itmsellprice` , `itmbuyable` , `itmpic` ) VALUES ('{$_POST['itmid']}', '{$_POST['itmtype']}', '$itmname', '$itmdesc', '{$_POST['itmbuyprice']}', '{$_POST['itmsellprice']}', '$itmbuy', '')", $c); Quote
spellbyte ® Posted January 10, 2007 Author Posted January 10, 2007 Re: item images ahh yeah good point seanybob, thanks fopr pointing that one out Quote
spellbyte ® Posted January 10, 2007 Author Posted January 10, 2007 Re: item images right i am trying to add an extra field to add new item and edit item for the item pics, but when i add the link i get this error You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. it works ok without the link in there, this is what i have added so far You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. any thoughts please anyone? Quote
03laceys Posted June 12, 2007 Posted June 12, 2007 Re: [mccode] item images Thinking of adding this but how would it no what pic goes with what? Quote
iseeyou94056 Posted June 14, 2007 Posted June 14, 2007 Re: [mccode] item images spellbyte ® i have been whatin for some 1 2 ancer u for a wile i got that on mine and i get same erroe Quote
iseeyou94056 Posted June 14, 2007 Posted June 14, 2007 Re: [mccode] item images spellbyte ® you should put in questions Quote
seanybob Posted June 14, 2007 Posted June 14, 2007 Re: item images Try this. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. ;) Quote
iseeyou94056 Posted June 14, 2007 Posted June 14, 2007 Re: [mccode] item images it lets me make the item but the pic dont show Quote
seanybob Posted June 14, 2007 Posted June 14, 2007 Re: [mccode] item images it lets me make the item but the pic dont show ? The code I posted wasn't supposed to make a pic show? Quote
deathknight90 Posted June 14, 2007 Posted June 14, 2007 Re: [mccode] item images then why would you post a code if it will not show a pic. Quote
iseeyou94056 Posted June 14, 2007 Posted June 14, 2007 Re: [mccode] item images do u got one that does Quote
deathknight90 Posted June 18, 2007 Posted June 18, 2007 Re: [mccode] item images well its not very hard to do. All my items have pics but its not free. Im shure there is someone here that will give you a free one. Sorry:( Quote
HITMAN 17 Posted February 10, 2008 Posted February 10, 2008 Re: [mccode] item images can someone put a v2 iteminfo with the item pic for me plz Quote
iseeyou94056 Posted February 16, 2008 Posted February 16, 2008 Re: [mccode] item images you mested up little in the inventory.php here is the fix You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
juelpatwary Posted April 5, 2008 Posted April 5, 2008 Re: [mccode] item images AHH!!! Can someone please post up How to dothis, When i tried i got errors Quote
Guest Anonymous Posted April 5, 2008 Posted April 5, 2008 Re: [mccode] item images Why don't you post your code and the errors ... Quote
juelpatwary Posted April 5, 2008 Posted April 5, 2008 Re: [mccode] item images Okey thanks Nyna Btw love your scripts :D Quote
juelpatwary Posted April 5, 2008 Posted April 5, 2008 Re: [mccode] item images This is the error i get in Invntory.php Warning: include(mysql.php) [function.include]: failed to open stream: No such file or directory in /home/bfp111/public_html/inventory2.php on line 9 Warning: include() [function.include]: Failed opening 'mysql.php' for inclusion (include_path='.:/x10hosting/php2/pear/PEAR') in /home/bfp111/public_html/inventory2.php on line 9 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/bfp111/public_html/inventory2.php on line 11 EDIT: And also, Is there anyway i could add that picture code to admin cp, like when i make an item i choose the picture too, Which code do i use for that and were would i put it? Quote
Guest Anonymous Posted April 5, 2008 Posted April 5, 2008 Re: [mccode] item images Warning: include(mysql.php) [function.include]: failed to open stream: No such file or directory in /home/bfp111/public_html/inventory2.php on line 9 Well there's your first problem -- mysql.php is missing. mysql.php is (IIRC) part of DBS/MCcodes V2 not V1(lite) ... So the question is ... what version are you running? Quote
juelpatwary Posted April 5, 2008 Posted April 5, 2008 Re: [mccode] item images Im running V2/////// Quote
juelpatwary Posted April 5, 2008 Posted April 5, 2008 Re: [mccode] item images Cant i convert this mod to v2? Quote
juelpatwary Posted April 5, 2008 Posted April 5, 2008 Re: [mccode] item images Please can someone help me? :| Quote
juelpatwary Posted April 5, 2008 Posted April 5, 2008 Re: [mccode] item images Please can someone make this v2 Quote
Tonka Posted April 5, 2008 Posted April 5, 2008 Re: [mccode] item images Well there's your first problem -- mysql.php is missing. mysql.php is (IIRC) part of DBS/MCcodes V2 not V1(lite) ... mysql.php=v1 config.php=v2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.