Jump to content
MakeWebGames

[mccode] House Pictures


Ishy

Recommended Posts

This is just a easy modification to your game because I am a noobie and just started to learn PHP.

This modification is for House Pictures.

I have put it so the house picture is the same size as your display picture...You will have

to add seperate pictures on eahc house.

Lets Start:

Add this SQL:

You're unable to view this code.

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

 

Then open index.php:

Find:

You're unable to view this code.

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

 

Then add underneath:

You're unable to view this code.

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

 

Then hopefully it should work 8-)

If you have any problem PM me please.

I am hoping to give out more little free modifications.

Thanks Toxication

Link to comment
Share on other sites

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

Re: [Mccode][Free] House Pictures

 

Its easier to just use something like this in index.php:

 

You're unable to view this code.

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

 

lol

 

You're unable to view this code.

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

 

11 wasted lines cut to 3 with no effort at all

Thats a bit of code you guys will not have known yet

Link to comment
Share on other sites

Re: [Mccode][Free] House Pictures

While Oxi's code does only have 3 lines, it does not cover all the houses. And he can add the houses, it will stay 3 lines, but the first line will be very very long so in the end, I dont see the real benefit. A few less characters in the file, big deal. Hardly worth laughing at someone. I would suggest some Else If's though

Feel free to continue sniffing his butt however

Link to comment
Share on other sites

Re: [Mccode][Free] House Pictures

 

While Oxi's code does only have 3 lines, it does not cover all the houses. And he can add the houses, it will stay 3 lines, but the first line will be very very long so in the end, I dont see the real benefit. A few less characters in the file, big deal. Hardly worth laughing at someone. I would suggest some Else If's though

Feel free to continue sniffing his butt however

How the hell will array be long? It's only how many values you put into that takes the time, 3 isn't hardly much but you can easily add more. The benefit is it's more efficient.

Geeessee...

Link to comment
Share on other sites

Re: [Mccode][Free] House Pictures

I think you should take of the V1 Code and Game Owner bit... :-)

If you don't know how you ain't one of them. :|

You should of put the SQL query in.

When you have done that go to phpMyAdmin houses/Browse/choose your house you want the picture to go in...

And then put in the URL of the picture e.g. http://www.gameurl.com/picture.jpg

And it should work :-P

Link to comment
Share on other sites

  • 1 month later...
Guest Anonymous

Re: [Mccode][Free] House Pictures

This should work

ALTER TABLE `houses` ADD `hPIC` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0'

Link to comment
Share on other sites

Guest Anonymous

Re: [Mccode][Free] House Pictures

i haven,t tested this yet but think it should work it just so u can add the house pic from the admin panel when you insert a house

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

Re: [Mccode][Free] House Pictures

 

i haven,t tested this yet but think it should work it just so u can add the house pic from the admin panel when you insert a house

You're unable to view this code.

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

 

i have just tryed this and it does not insert a new houes at all even with out a pic

Link to comment
Share on other sites

Re: [Mccode][Free] House Pictures

just add a tinytext field into the houses table called hIMAGE then when you select the house on the index page just use

{ir[;

you can manually edit your houses table to just include the pic name

took me about 5 minutes to do....and no if statements, and no extra queries

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