Jump to content

Active/Inactive pilots images on pilot list


Recommended Posts

Posted

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 :P

status.zip

  • Like 2
  • 1 year later...
Posted

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 ';'

  • 1 year later...
Posted

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

  • 1 year later...
  • 4 weeks later...
  • 6 months later...
Posted

Thx,

But I used my own images:

yes.pngno.png

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>

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