STALKER Posted August 15, 2012 Report Share Posted August 15, 2012 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> Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted August 15, 2012 Administrators Report Share Posted August 15, 2012 <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> Quote Link to comment Share on other sites More sharing options...
STALKER Posted August 16, 2012 Author Report Share Posted August 16, 2012 Thank you very much for your answer, but I cannot get it... Is it like this? <p><img src="<?php echo israirvirtualairlines.com; ?>/images/vatsim.gif" alt="VATSIM" width="100" /></p> Quote Link to comment Share on other sites More sharing options...
Aaron Posted August 16, 2012 Report Share Posted August 16, 2012 <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 Quote Link to comment Share on other sites More sharing options...
mseiwald Posted August 16, 2012 Report Share Posted August 16, 2012 try <img src="<?php echo SITE_URL; ?>/lib/images/vatsim.gif" alt="VATSIM" width="100" /> or <img src="<?php echo SITE_URL; ?>/lib/skins/##yourskin##/images/vatsim.gif" alt="VATSIM" width="100" /> Quote Link to comment Share on other sites More sharing options...
STALKER Posted August 16, 2012 Author Report Share Posted August 16, 2012 <img src="<?php echo SITE_URL; ?>/lib/skins/##yourskin##/images/vatsim.gif" alt="VATSIM" width="100" /> Working! thank you all for your help Quote Link to comment Share on other sites More sharing options...
freshJet Posted August 16, 2012 Report Share Posted August 16, 2012 Probably due to the paragraph tags Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.