Jump to content

Show Rank Image in Admin Panel.


homer09001

Recommended Posts

A little modification I made to the rank editing page on the Admin panel I thought I would share.

1. Open "/admin/templates/ranks_allranks.tpl"

2. Find this code:

<tr>
<th>Rank Title</th>
<th>Minimum Hours</th>
<th>Pay Rate</th>
<th>Total Pilots</th>
<th>Options</th>
</tr>

3. Replace with:

<tr>
<th>Rank Title</th>
<th>Minimum Hours</th>
<th>Rank Image</th>
<th>Pay Rate</th>
<th>Total Pilots</th>
<th>Options</th>
</tr>

4. Find the following code:

<td align="center"><?php echo $rank->rank; ?></td>
<td align="center"><?php echo $rank->minhours; ?></td>
<td align="center"><?php echo Config::Get('MONEY_UNIT').$rank->payrate.'/hr'; ?></td>
<td align="center"><?php echo $rank->totalpilots; ?></td>
<td align="center" width="1%" nowrap>

5. Replace with:

<td align="center"><?php echo $rank->rank; ?></td>
<td align="center"><?php echo $rank->minhours; ?></td>
<td align="center"><img src="<?php echo $rank->rankimage; ?>"></td>
<td align="center"><?php echo Config::Get('MONEY_UNIT').$rank->payrate.'/hr'; ?></td>
<td align="center"><?php echo $rank->totalpilots; ?></td>
<td align="center" width="1%" nowrap>

6. Save and Close "ranks_allranks.tpl".

Now when you view all ranks in the admin panel it will show the corresponding image.

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