Jump to content
MakeWebGames

Recommended Posts

Posted

Not sure if this has been done before,so yeah, sorry in advance if it has. But, after looking through most of the mods section, and searching for anything like it I found nothing..

Anyhoo, quick small mod to add images to houses. No SQL, yey!

One page and a small addon for index.php and smenu.php

 

First off copy and paste this and save it as house_app.php

You're unable to view this code.

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

 

Then add this under the first table in index.php, or any where you want I guess..

You're unable to view this code.

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

 

Finally, the link for smenu.php

You're unable to view this code.

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

 

What it does:

All this app/mod does it generate a md5 hash of the house name in index.php, and then outputs it as part of the filename. Then, all you do is get whatever image you want for the house and lookup the house name and assoctiated hash in house_app.php and save the image as that. Not the prettiest of solutions, but works fine for me.

Small note, the default directory for the house images, is 'houses', so if you want to use a different directory you'll need to change this line in index.php:

You're unable to view this code.

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

 

Changing the "houses" line..

  • 7 months later...

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