dimitris Posted October 27, 2010 Report Share Posted October 27, 2010 Good Day everyone ! I have create a small piece of code to use at your pilots_list.tpl to add an icon (Active/Inactive) to the pilot list.(taking data from the pilots active/inactive in admin panel) Demo here: Demo Pilot List The steps you need to follow are: 1. Add this code to add a column at the table: <th>Status</th> 2. Add this code under the column to create a row with the code you need:(replace the "yourskin" with your skin folder name) <td><?php if($pilot->retired == '1') {echo '<img src="'.SITE_URL.'/lib/skins/yourskin/images/no.png" alt="warning" /> - Retired';} else {echo '<img src="'.SITE_URL.'/lib/skins/yourskin/images/yes.png" alt="warning" /> - Active';} ?></td> 3. Download the images (.png foramt) attached to this post and upload to your images folder inside your skin. For any questions or problem tell me to know status.zip 2 Quote Link to comment Share on other sites More sharing options...
Jon Posted October 27, 2010 Report Share Posted October 27, 2010 Would of been good this time yesterday for me, but I worked it out then. Nice Work, Jon Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted November 2, 2010 Report Share Posted November 2, 2010 Works Great. Thanks! Quote Link to comment Share on other sites More sharing options...
HawaiianAirVirtual Posted January 9, 2012 Report Share Posted January 9, 2012 I cannot get it to work. I get a Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/hawaiian/public_html/core/templates/pilots_list.tpl on line 59 Quote Link to comment Share on other sites More sharing options...
Jeff Posted January 9, 2012 Report Share Posted January 9, 2012 let's see how you have your code, so I can figure out how you went wrong. Quote Link to comment Share on other sites More sharing options...
Strider Posted January 9, 2012 Report Share Posted January 9, 2012 There is a line that is not finished, it was expecting a ',' or ';' look on line 59, and above that, as the problem is there. It is just a matter of putting a ',' or a ';' Quote Link to comment Share on other sites More sharing options...
simonecatalano Posted August 27, 2013 Report Share Posted August 27, 2013 Hello I how insert this line <th>Status</th> and this <td><?php if($pilot->retired == '1') {echo '<img src="'.SITE_URL.'/lib/skins/yourskin/images/no.png" alt="warning" /> - Retired';} else {echo '<img src="'.SITE_URL.'/lib/skins/yourskin/images/yes.png" alt="warning" /> - Active';} ?></td> Thanks Quote Link to comment Share on other sites More sharing options...
OA01 Posted August 28, 2013 Report Share Posted August 28, 2013 The zip file is corrupt!? Quote Link to comment Share on other sites More sharing options...
simonecatalano Posted August 28, 2013 Report Share Posted August 28, 2013 Don't Work ;( Quote Link to comment Share on other sites More sharing options...
Angello Posted November 21, 2014 Report Share Posted November 21, 2014 perfect tanks http://wwwcubanavirtual.altervista.org/phpvms/index.php/Pilots Quote Link to comment Share on other sites More sharing options...
Longhaul444 Posted December 18, 2014 Report Share Posted December 18, 2014 Love this little add-on. Although I did take the icons in a different direction http://www.rcjtransportva.com/index.php/Pilots Quote Link to comment Share on other sites More sharing options...
hurkulez Posted July 8, 2015 Report Share Posted July 8, 2015 Thx, But I used my own images: Pilot Roster Demo <td><center><?php if($pilot->retired == '1') {echo '<img src="'.SITE_URL.'/lib/skins/skinfoldername/images/no.png" alt="warning" style="max-height: 14px;"/>';} else {echo '<img src="'.SITE_URL.'/lib/skins/skinfoldername/images/yes.png" alt="warning" style="max-height: 14px;"/>';} ?></center></td> 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.