Jump to content
MakeWebGames

[mccode v2] Items Pic mod


Analog

Recommended Posts

  • Replies 82
  • Created
  • Last Reply

Top Posters In This Topic

You're unable to view this code.

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

 

Like that? (I tried a lot more ways lol)

When I put it like that, I don't get the error on edits as long as I don't put anything in the item image box, and as soon as I type anything in the pic box I get that same query error.

 

My question is...how does the script know what $itmpic is? Can that be defined somewhere separately? I looked through the document and saw that other elements (like $armor, $weapon, $itmdesc etc etc) were defined few hundred lines above the query, like this.

You're unable to view this code.

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

 

I tried to do my own version of $itmpic =

..... lol, didn't quite work out.

Link to comment
Share on other sites

Look at the proceeding form where you have the input fields. So you have a new one for entering the details for the item pic which then when the form is submitted gives the info for the query.

So then you also need to add the new var for the query

$itmpic =

(isset($_POST['itmpic']))

? strip_tags($db->escape($_POST['itmpic'])) : '';

Link to comment
Share on other sites

In my game to do this, I ended up taking an simple, direct path to doing this. In iteminfo.php:

 

You're unable to view this code.

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

 

The last line displays the pic associated with the item, and I just upload the pic with the exact item name on it, and it works.

Link to comment
Share on other sites

Look at the proceeding form where you have the input fields. So you have a new one for entering the details for the item pic which then when the form is submitted gives the info for the query.

So then you also need to add the new var for the query

$itmpic =

(isset($_POST['itmpic']))

? strip_tags($db->escape($_POST['itmpic'])) : '';

I tried that before, and tried it just now again, gives me query error.

 

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

To add to edit item...

Must have already done the first part of this mod

Open staff_items.php

 

Find:

You're unable to view this code.

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

 

Replace with:

You're unable to view this code.

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

 

Can somebody please do this part for me? This is the "edit" part of the PHP file.

What exactly do I find and replace .... :( (Stupid Redux version)

 

You're unable to view this code.

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

Edited by Melkrow
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...