dimitris Posted October 27, 2010 Report 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
Jon Posted October 27, 2010 Report Posted October 27, 2010 Would of been good this time yesterday for me, but I worked it out then. Nice Work, Jon Quote
HawaiianAirVirtual Posted January 9, 2012 Report 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
Jeff Posted January 9, 2012 Report Posted January 9, 2012 let's see how you have your code, so I can figure out how you went wrong. Quote
Strider Posted January 9, 2012 Report 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
simonecatalano Posted August 27, 2013 Report 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
Angello Posted November 21, 2014 Report Posted November 21, 2014 perfect tanks http://wwwcubanavirtual.altervista.org/phpvms/index.php/Pilots Quote
Longhaul444 Posted December 18, 2014 Report 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
hurkulez Posted July 8, 2015 Report 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
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.