Jump to content

[SOLVED] VATSIM image in sidebar


STALKER

Recommended Posts

Hi all!!!

I am trying to set a VATSIM image in sidebar but I cannot get it. I have modified frontpage_main.tpl and set VATSIM image in images folder... can you help me?

.

.

.

.

.

.

.

.

.

.

<?php echo count($guestsonline);?> guest(s) online in the past <?php echo Config::Get('USERS_ONLINE_TIME')?> minutes.</i></p>

<?php

/* $usersonline also has the list of users -

really simple example

Or if you're not on the frontpage:

$usersonline = StatsData::UsersOnline();

foreach($usersonline as $pilot)

{

echo "{$pilot->firstname} {$pilot->lastname}<br />";

}

*/

?>

<p><img src="images/vatsim.gif" alt="VATSIM" width="100" /></p>

</div>

Link to comment
Share on other sites

  • Administrators

<p><img src="images/vatsim.gif" alt="VATSIM" width="100" /></p>

will not work in a template file as it is trying to find the image in the wrong place as you are using a relative path to it. The best way I believe in phpvms templates to get an image to display is to use

<p><img src="<?php echo SITE_URL; ?>/path to your image" alt="VATSIM" width="100" /></p>

Link to comment
Share on other sites

<p><img src="<?php echo SITE_URL; ?>/images/vatsim.gif" alt="VATSIM" width="100" /></p>

OR

<p><img src="http//www.isairvirtualairlines.com/images/vatsim.gif" alt="VATSIM" width="100" /></p>

Either of those will work. The first one has a php variable in it, you don't actually put your site url there. If you dont know what php is I recommend you look at this link:

http://www.w3schools.com/php/default.asp

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