Jump to content
MakeWebGames

Recommended Posts

Posted

i saw in shop pics that someone said whats next city pics...

on explore at the top where you want the image to be shown put

You're unable to view this code.

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

 

then when putting a pic up name it to the cities id

like first location == 1 soo upload to /images/1.jpg

just basic but it works so that is all that matters :P.....

Posted

Re: [mccode V2] City Pic xD

Nice one and i did the shop picture :)

Posted

Re: [mccode V2] City Pic xD

Here is a very simple way to do this, using an associative array...

<?

// for this coty id 1 will show the first image...

$images = array(1=>'images/cityImage.jpg',

2=>'images/otherCityImage.png',

3=>'images/yetAnotherCityImage.gif');

// output the image

echo '';

?>

Posted

Re: [mccode V2] City Pic xD

Ill take the above back. What you added to the CE forums was absolute gibberish. It needs to have more to it, and you should be kicked for not sharing. Its things like this that clog up the forums. Crap things that dont work...

Posted

Re: [mccode V2] City Pic xD

I gotta say i tried this and i couldnt get it to work either,, i cant see how the location is called without the aid of an sql statemtent to begin with.....

I did however make a working version whereby you add the image via the admin panel when adding a city or editing a city if anyone wants it,

Posted (edited)

Re: [mccode V2] City Pic xD

call this file staff_cities.php backup your old file 1st incase youve added extra than whats here..

 

You're unable to view this code.

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

 

Now open up explore.php and add near the top

 

You're unable to view this code.

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

 

SQL

 

You're unable to view this code.

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

 

create a folder on your FTP called cities this is where your images will be stored,

Just to note upload the pic to the folder and when editing or adding a city with an image make sure you use the full title example default.jp or default.png or default.gif

Obviously you dont have to call it default im just using that as an example.

Edited by illusions
edits tags
Posted

Re: [mccode V2] City Pic xD

I would also like to thank Illusions, as he was talking to me, and I commented about the first post. Then he coded it the right way. And I know Illusions mods work. As alot of my are the ones he posted here. +100

Posted

Re: [mccode V2] City Pic xD

// for this location id 1 will show the first image...

$images = array(1 =>'images/cityImage.jpg',

2 =>'images/otherCityImage.png',

3 =>'images/yetAnotherCityImage.gif');

// output the image

echo '';

worked for me...

I don't see the point of having masses of code to do something as simple as display an image like with the 1 illusions posted.

Posted

Re: [mccode V2] City Pic xD

The only reason i do my scripts that way with the use of the admin panel it saves the user constantly having to update php files.. they can do it straight from the site which saves time..

  • 11 months later...
Posted

RE: [mccode V2] City Pic xD

 

i saw in shop pics that someone said whats next city pics...

on explore at the top where you want the image to be shown put

You're unable to view this code.

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

 

then when putting a pic up name it to the cities id

like first location == 1 soo upload to /images/1.jpg

just basic but it works so that is all that matters :P.....

Very Nice Addition to My Game Man....The City Picture Add +1 To You If I Knew How....Respect :thumbsup:
  • 3 weeks later...
Posted

i done all the steps on this post about adding the city images when i click explore or any other page i am not getting a error message for anything but i am not getting my image to show i did the new folder called cities named my image as 1.jpg and in my staff panel this is how i named my city info

Name: Detroit, Michigan

Description: The Root Of All Evil

City Image: 1.jpg

Minimum Level: 1

and in explore i get this where a image should be No Image Yet

Posted
The only reason i do my scripts that way with the use of the admin panel it saves the user constantly having to update php files.. they can do it straight from the site which saves time..
you know i was just reading this post and was thinking that if you weren't going to make it i knew i would :thumbup: but coding this mod isnt very difficult even though i do appreciate illusions helping me everytime i needed help and helping new members get started but, anyways before i start getting off topic you could have also used your mod that included a template to select from or even use the code for the settings table but just modify it to be something like "mind you im thinking of the settings code but dont know it off hand, so don't quote me on it."

Example:

You're unable to view this code.

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

thats just for a predefined image. But as for illusions releasing the mod there isn't really a big deal on the code now, nor needing help.

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