Jump to content
MakeWebGames

[mccode v2] Items Pic mod


Analog

Recommended Posts

  • Replies 82
  • Created
  • Last Reply

Top Posters In This Topic

  • 5 weeks later...
  • 3 months later...

I become this error whe i prees the button INFO

You're unable to view this code.

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

 

And that my iteminfo.php, can anyone to fix that?

 

You're unable to view this code.

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

Edited by Djkanna
<br /> issue.
Link to comment
Share on other sites

looking at line 21 id say you have an extra " but im not sure if the Post was corrupted when posted but the img tags shouldnt be there

$itmpic = "<tr style='background: gray;'><td colspan='2' style='text-align: center;'><img src='itmpics/$id'></td></tr>"; }

Link to comment
Share on other sites

  • 3 months later...

i cant get this nore any other mod on this site to work with my script, its only since i did a fresh restart the begining of this summer holiday and its really starting to do my head in, has anyone got this mod to work on there game because its doing nothing to mine just changing the layout..

do the images need to be a specific file type, in the database does the file have to be called 1.jpg or does its need a

<img src='1.jpg'>

ive tried everything now and nothings working for me is really starting to put me off all this (N)

Link to comment
Share on other sites

  • 5 months later...

items pic mod problem

Can any one please help me with the following problem im having please.

I'm getting the following error when trying to add the following mod on line 14

 

Parse error: syntax error, unexpected '[', expecting ']' in /home/swisou/public_html/iteminfo.php on line 14

Here is my iteminfo.php

Thanks

 

You're unable to view this code.

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

Link to comment
Share on other sites

this is what i use to actually place the images in there the bbcode version didnt work for me so i just converted it to html

You're unable to view this code.

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

 

its line 35 here in my code and i just resized the images here so i dont have to do it manually i guess im lazy haha so i hope this helps people that have problems using the img tags """"

Edited by KyleMassacre
added info
Link to comment
Share on other sites

  • 6 months later...
Hi, nice mod!

I thought I could lend a hand with the item pics in inventory.

find in inventory

You're unable to view this code.

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

 

Replace with this;

You're unable to view this code.

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

 

Then Find

You're unable to view this code.

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

 

replace with this

You're unable to view this code.

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

 

save and upload

:wink:

Its seem that the code is missing some html...

can you repost theoriginal code please.

i have problem with this line

You're unable to view this code.

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

Edited by sixsens
Link to comment
Share on other sites

  • 3 weeks later...
Would this work with 2.5 version?

So yeah it works but takes some heavy work haha (for me!!!!!...took about 8 hours to implement lol)

I hope this helps somebody. Seems like most people are having issues with iteminfo.php, so here's my copy. I don't know how it works, but it does. so yeah. My "EDIT" of new items is still broken, and I'm too tired to try and tackle it.

 

You're unable to view this code.

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

Link to comment
Share on other sites

Wow 8 hours to create a new column in the items table and reference that in a query?

When you put it that way, yeah :(. At least I got it working (partially lol). Some people never got it working tho :P

Can somebody help me with this tho. However I try to do it... I get query error. This is when trying to edit the item (posting new item works fine)

I'm supposed to update itmpic in the items table with the rest of that stuff down there... seems simple enough..except I can't do it.

So how do I put this text box

You're unable to view this code.

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

 

into this query?

 

You're unable to view this code.

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

 

P.S. Just checked your game rulerofzu, it's awesome!! I'm pretty jelly.

Edited by Melkrow
Link to comment
Share on other sites

Dont use $_POST in a query. Secure your $_POST and then use the var.

If you do not know how to do that look up filter, filter_var, mysql_real_escape_string (or use $db->escape in mc2) , int, abs etc and learn the differences between integers and strings.

I do not see itmpic or any reference to what could be the column for a picture in that update. You cant update something if its not included in the query.

Link to comment
Share on other sites

That's what I'm trying to do, to include it in the query so it would update.

So basically, when creating a new item, I have it able to insert itmpic into the table as such (see the last part in the query).

You're unable to view this code.

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

 

So that works fine, the image is stored and I can display it on my site. The problem is when I go to "edit" that item, I don't know how to make it so that it 'saves' the changes i make to itmpic (in case I want to use different image or add an image if there wasn't one already when the item was created first).

I hope that makes sense.

Link to comment
Share on other sites

Well right now nothing occurs, just the changes I make to "Item Picture" don't update, everything else does. So if I accidentally put the wrong img name, I can't change it, or the items that I made before this mod, I can't update them to add an image.

I'm basically trying to do step 2 in this post by the author of the mod http://makewebgames.io/showthread.php/23914-mccode-v2-Items-Pic-mod?p=153675&viewfull=1#post153675

And to answer your question lol.... because in the link above and in the first "insert" part, the whole code is in one line, and in v2.5.6b, the 'update' part is like I posted it, broken up in a lot of line, and I can't wrap my head around it lol. Please understand that before today I've never done any PHP or SQL. Will be reading some basic tutorials here soon.

Link to comment
Share on other sites

Well as I stated previously the update code you posted didnt mention any pic column so it wont update even if you have a form field for it your not passing the info in the query.

Can you help me put that in there? Whenever I try to plug in $_POST['itmpic'] into that update query, it gives me a query error when i try to edit (that's why I completely removed it for now until i figure out how to make it work).

Link to comment
Share on other sites

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...