Jump to content

Pilots Page Problem


mynameiskhan

Recommended Posts

errrz.jpg

Guys i tried but result is in front of you you can see in the shot what happened now what i did is i uploaded the latest file pilot_list.tpl again from obesessblue folder and tried to modify that file what i did is just removed some </div> from bottom of the page and now it came up like this my main problem is to align pilot names to align the table please suggest me what i will do now?

irfan

Link to comment
Share on other sites

thanx mark1million my issue is resolved by the grace of god thanks so much but i have one more question if you can also help in this one now i have also added ivao id,vatsim id,active/nonactive bars in table how these options will work for me in whcih file i have to add and what to add please tell me?

for other new joiners if you have same problem with pilot list please add this code it will do a magic.

<div class="mcright">

<h3><?php echo $title?></h3>

<?php

  if(!$allpilots)

  {

     echo 'There are no pilots!</div>';

     return;

  }

?>

<table class="sortable" width="700" cellspacing="1" cellpadding="5" border="1">
 <thead>
   <tr>
     <th width="56px">Pilot ID</th>
     <th width="150px">Name</th>
     <th width="80px">Rank</th>
     <th width="55px">Flights</th>
     <th width="55px">Hours</th>
     <th width="100px">Last Flight</th>
     <th width="55px">Vatsim</th>
     <th width="55px">Ivao </th>
     <th width="65px">Active/Inactive</th>
   </tr>
 </thead>

<tbody>

<?php

foreach($allpilots as $pilot)

{

  /* 

     To include a custom field, use the following example:



     <td>

        <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?>

     </td>



     For instance, if you added a field called "IVAO Callsign":



        echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign');

   */

?>

<tr>

  <td width="1%" nowrap><a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo $pilot->pilotid?>">

        <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>

  </td>

  <td>

     <div align="left"><img src="<?php echo Countries::getCountryImage($pilot->location);?>" 

        alt="<?php echo Countries::getCountryName($pilot->location);?>" />



         <?php echo $pilot->firstname.' '.$pilot->lastname?>

        </div></td>

  <td><div align="center"><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></div></td>

  <td><div align="center"><?php echo $pilot->totalflights?></div></td>

  <td><div align="center"><?php echo $pilot->totalhours?></div></td>

  <td><div align="center"><?php

//$report = PIREPData::GetLastReports($pilot->pilotid, 1);
if($pilot->lastpirep  == 0)
{
       echo 'No data yet';
}
else
{
$report = PIREPData::GetLastReports($pilot->pilotid, 1);

echo date('d.M.Y', strtotime($report->submitdate));
}

?></td>

<td><div align="center">
     <?php $fieldvalue = PilotData :: GetFieldValue ( $pilot -> pilotid , 'Vatsim ID' );
if( $fieldvalue != '' )
{
echo '<a href="http://www.vataware.com/pilot.cfm?cid=' . $fieldvalue . '" target="_blank"><img src="/images/charticon.jpg" width="28" height="28" border="0" alt="Vatsim ID" /></a></a>' ;
}
else
{
echo '<img src="/images/nonreg.png" width="20" height="18" border="0" alt="Not Listed" /></a>' ;
}
?>
   </div></td>


       <td><div align="center">
     <?php $fieldvalue = PilotData :: GetFieldValue ( $pilot -> pilotid , 'IVAO ID' );
if( $fieldvalue != '' )
{
echo '<a href="http://www.ivao.aero/members/person/details.asp?ID='. $fieldvalue . '" target="_blank"><img src="/images/charticon.jpg" width="28" height="28" border="0"  alt="Ivao ID" /></a>' ;
}
else
{
echo '<img src="/images/nonreg.png" width="20" height="18" border="0" alt="Not Listed" /></a>' ;
}
?>
   </div></td>

<td><div align="center"><?php
   If ($pilot->retired == 0)
         { echo '<img src="/images/green-status.gif" />'; }
   else
         { echo '<img src="/images/red-status.gif" />'; }
?></div></td></div></td>



    <?php

}

?>

  </div>

</tbody>

</table>
<br />
</div>

irfan

Link to comment
Share on other sites

Nabeel i uploaded the gif files but its now showing any thing there no gif image in avtive or inactive BAR

code

<td><div align="center"><?php
   If ($pilot->retired == 0)
         { echo '<img src="/images/green-status.gif" />'; }
   else
         { echo '<img src="/images/red-status.gif" />'; }
?></div></td></div></td>



    <?php

dev which skin r u using try to copy paste upper code in your pilots_list.tpl file i did the same it worked for me i am using ObsessBlue skin.

Link to comment
Share on other sites

  • Moderators

Nabeel i uploaded the gif files but its now showing any thing there no gif image in avtive or inactive BAR

code

<td><div align="center"><?php
   If ($pilot->retired == 0)
         { echo '<img src="/images/green-status.gif" />'; }
   else
         { echo '<img src="/images/red-status.gif" />'; }
?></div></td></div></td>



    <?php

dev which skin r u using try to copy paste upper code in your pilots_list.tpl file i did the same it worked for me i am using ObsessBlue skin.

Right what you need is to place images of,

/images/green-status.gif and

/images/red-status.gif

In your image folder in the root of your site, you can rename to anything you like myimage.png etc just make sure that the path is correct

Link to comment
Share on other sites

That is great coding. Those of you wanting to go a few steps further, you can change the color of the tables by changing this:

<table class="sortable" width="700" cellspacing="1" cellpadding="5" border="1">

To this:

<table class="sortable" width="700" bordercolor="#ffffff"  bgcolor="#B6C7DB" cellspacing="1" cellpadding="5" border="1">

Of course, you can change the colors to whatever matches your web site. Hope this helps.

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