[help] alter image path

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jun 29, 2008
Messages
63
Reaction score
0
now i have the race working how do i alter the image path?

I want to change what images are loaded depending on what race they registered with.


in the skins\Xnova\gebaeude folder i now have a new folder for each race with all the images.


i noticed in the buildings_build_row.tpl

Code:
<img border="0" src="{dpath}gebaeude/{i}.gif" align="top" width="120" height="120">

how do i get this to work

Code:
<img border="0" src="{dpath}gebaeude/{race}/{i}.gif" align="top" width="120" height="120">

need to enter the database fetch code but dunno what page.
 
i have absolutly no idea ... never tried so dont know =S you would be better off asking in xnova forum, there are better coders there
 
god, just need to do this:
Code:
$lang[race] = $your_race_image_path;

its the most simple thing, cos the function parsetemplate() will do the magic.
 
but there are four different image paths?????

I dont think you get what im trying to do byo..

the user table has an extra field called race, when they register they choose which race they want to be 1,2,3&4 for example.

now in the images folder there are now folders called 1,2,3&4 (exactly the same name as the values when submitted from registration page.

So now i need the {race} to be the command that says go look into the database users table and see what race they choose and use that vaule in the image path.

src="{dpath}gebaeude/{race}/{i}.gif"
 
Ive added you on msn but you are never online when I am.

Cant you just reply with the code and which file it needs to go into???
 
im always online, just not available.

other thing, how would i know how is ur code?
dont be silly and talk to me =/
 
ive been sending you nudges and messages since 9am and i cannot get hold of you.

The only file i have altered atm is this:-

templates/opengame/buildings_build_row.tpl

i have changed the following


Code:
<img border="0" src="{dpath}gebaeude/{i}.gif" align="top" width="120" height="120">

with this

Code:
<img border="0" src="{dpath}gebaeude/{race}/{i}.gif" align="top" width="120" height="120">

In the database i have altered the following

users
i have added an extra field called race (varchar8).

That is all that has been modified all the rest is standard rageonline files.
 
Status
Not open for further replies.
Back