Jump to content

Recommended Posts

Posted

So this will be my last request at the moment.

Well, I tried to add an award called "100 Flights". When I added that adward to a pilot I searched at the office for his profile, but instead of the award-picture I´m just able to view the name of the award "100 Flights".

How to change the data to show the pictures?

Please help and reply.

Have a nice day and best regards from Germany

Tobi

CEO North Air

  • Administrators
Posted

Look for lines 80-82 in your pilot profile template (profile_main.tpl) the instructions are there. It needs to be uncommented and placed where you would like it to display.

/* To show the image:
	<img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" />
*/

  • Like 1
Posted

Well, thanks again for your help, but I tried a lot and it won´t work.

The instruction says:

/* To show the image:

<img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" />

*/

Well, now I guess to put anywhere between the following lines, but where exactly?

<p>

<strong>My Awards</strong><br />

<?php

if(!$allawards)

{

echo 'No awards yet';

}

else

{

/* To show the image:

<img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" />

*/

?>

<ul>

<?php foreach($allawards as $award){ ?>

<li><?php echo $award->name ?></li>

<?php } ?>

</ul>

<?php

}

?>

</p>

What does it meen to change the skin´s folder?

Thank you once again for your help!

  • Administrators
Posted

You can put that line of code

<img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" />

anywhere within the foreach command for the awards section, or you can leave it right where it is for it to work as well but the biggest thing is that you need to get the /* and */ from around it, that is telling the browser to ignore everything inside of the comments marks - ie "it is commented out".

Also you should create a folder in the lib/skins folder for your own skin with your own name to place your edited templates in, otherwise when you do an update the templates, and all your work, will be overwritten.

Posted

Well I tried what you said but when I browses my profile there won´t be shown the image of the award, just the name.

Here is the code I added:

<p>

<strong>My Awards</strong><br />

<?php

if(!$allawards)

{

echo 'No awards yet';

}

else

{

To show the image:

<img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" />

?>

<ul>

<?php foreach($allawards as $award){ ?>

<li><?php echo $award->name ?></li>

<?php } ?>

</ul>

<?php

}

?>

</p>

Any mistages insert?

Thanks again for your help! Your doing a great job!

  • Administrators
Posted

Move it within the foreach like this ->

<ul>
<?php foreach($allawards as $award){ ?>
<li><?php echo $award->name ?></li>
<li><img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /></li>
<?php } ?>

  • 3 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.   Restore formatting

  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.

Loading...
×
×
  • Create New...