Colin Posted July 29, 2012 Report Share Posted July 29, 2012 Hi again , I've tried to skin 2 sites and an annoying problem exists when trying to skin the pilot_list.tpl, the pilot list duplicates the skin over and over again for each hub that has been added, I've had to do a half arsed job at skinning both pilot lists due to this problem, Coincidently both sites are through one.com (not a free host), not sure if this would be a factor but when I skinned another site which was through 1&1 this problem didn't exist and I could skin the site however I wanted which is why I mention it. I've attached a screenshot. I've just been in touch with one.com who was no help what so ever., If anyone can help me fix this it would be very much appreciated as it has been driving me mad for days ! As always any help appreciated Quote Link to comment Share on other sites More sharing options...
Scott Posted July 29, 2012 Report Share Posted July 29, 2012 Can you put your code up on here so I can take a look please? Quote Link to comment Share on other sites More sharing options...
Colin Posted July 29, 2012 Author Report Share Posted July 29, 2012 This is the entire pilot_list.tpl page in it's entirety just copy and pasted: Thanks for your help I really appreciate it ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Pilot Roster</title> <style type="text/css"> body,td,th { color: #6CAEE0; } </style> </head> <div align="center"> <body> <table width="1000"> <tr> <td width="769"><img src="http://www.vaflybe.c...be/images/flybe logo.jpg" width="300" height="90" /></td> <td width="219"><a href="https://www.facebook...984064827"><img src="http://www.vaflybe.c...s-Facebook.jpg" width="179" height="62" /></a></td> </tr> </table> <p><img src="http://www.vaflybe.c...images/nav.jpg" width="1000" height="35" /></p> <table width="900" border="1" bordercolor="#6633FF"> <tr> <td width="169" align="center" valign="top"><h2 class="star"><img src="http://www.vaflybe.c...oglechrome.jpg" width="155" height="54" /></h2> <h2 class="star"><span><u>Airline Stats</u></span></h2> <p>Total Pilots: <?php echo StatsData::PilotCount(); ?></p> <p>Total Hours: <?php echo StatsData::TotalHours(); ?></p> <p>Flights: <?php echo StatsData::TotalFlights(); ?></p> <p>Miles Flown: <?php echo StatsData::TotalMilesFlown(); ?></p> <p>Schedules: <?php echo StatsData::TotalSchedules (); ?></p> <p>Aircraft in Fleet: <?php echo StatsData::TotalAircraftInFleet () ; ?></p> <h2><u>Latest News</u> <p> </p> <?php PopUpNews::PopUpNewsList(5); ?> </h2> </h2> </h2></td> <td width="600" valign="top" align="center"><h3><?php echo $title?></h3> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table id="tabledlist" class="m-table"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</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'); */ // To skip a retired pilot, uncomment the next line: //if($pilot->retired == 1) { continue; } ?> <tr> <td width="1%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <font color="#6CAEE0"> <?php echo $pilot->firstname.' '.$pilot->lastname?></font> </td> <td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td> <td><font color="#6CAEE0"><?php echo $pilot->totalflights?></font></td> <td><font color="#6CAEE0"><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></font></td> <?php } ?> </tbody> </table></td> <td width="209" valign="top" align="center"><form name="loginform" action="<?php echo url('/login');?>" method="post"> <p align="center"><a href="http://www.vaflybe.c...p/contact"><img src="http://www.vaflybe.c.../contactus.jpg" width="155" height="54" /></a> <p align="center"><?php echo "<?xml version='1.0'?>"; ?> <?php if(isset($message)) echo '<p class="error">'.$message.'</p>'; ?> <h2><u><strong>Login</strong></u></h2> <p align="center">Pilot ID<br /> <input name="email" type="text" class="input-field required" value="" size="5" /><br /> Password<br /> </dt> <input name="password" type="password" class="input-field required" value="" size="5" /><input type="hidden" name="redir" value="index.php/profile" /> <input type="hidden" name="action" value="login" /> <p align="center"> <input type="submit" class="maxx-button dark" name="submit" value="Log In" /><br /> <a href="<?php echo url('Login/forgotpassword'); ?>">I forgot my password</a> </dd> </form> <p align="center"><em><u><strong>Welcome New Pilots</strong></font></u></em></p> <p align="center"><em><u><font color="#003333"> <?php MainController::Run('Pilots', 'RecentFrontPage', 5); ?> </font></u></em></p> <p><strong>Pilots Online:</font></strong><font color="#B40D0D"><?php echo count(StatsData::UsersOnline()); ?></font></p> <p> <?php $usersonline = StatsData::UsersOnline(); foreach($usersonline as $pilot) { ?> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" width="16" height="11" /> <a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"><?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' ' .$pilot->firstname . ' ' . $pilot->lastname?></a><br /> <?php } ?> </li> <?php /* $usersonline also has the list of users - really simple example Or if you're not on the frontpage: $usersonline = StatsData::UsersOnline(); foreach($usersonline as $pilot) { echo "{$pilot->firstname} {$pilot->lastname}<br />"; } */ ?> </p> <p align="center"> </p></td> </tr> </table> </body> </html> Quote Link to comment Share on other sites More sharing options...
Strider Posted July 29, 2012 Report Share Posted July 29, 2012 The reason it replicates the theme multiple times, is the system puts the table through a foreach loop, which displays the seperate rosters for each hub, you will have to merge them all into one roster, that is how to fix that problem. Quote Link to comment Share on other sites More sharing options...
Colin Posted July 30, 2012 Author Report Share Posted July 30, 2012 Would you be able to tell me how to merge them into one roster please Quote Link to comment Share on other sites More sharing options...
Jeff Posted July 30, 2012 Report Share Posted July 30, 2012 The way I have mine setup is that you must be logged in to view the page (code can be removed to have public access). It also shows if the pilot has a Skype account, that it shows if they are online (on Skype) at the moment (can also be removed). You can change the colors to match your site. <?php if(Auth::LoggedIn() == false) { echo 'You have found a restricted area. You must log in as a pilot in order to view!'; return; } ?> <h3><?php echo $title?></h3> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table id="tabledlist" class="tablesorter"> <thead> <tr> <th width="10%">Pilot ID</th> <th width="35%">Name</th> <th width="15%">Rank</th> <th width="20%">Flights</th> <th width="20%">Hours</th> <th width="30%">Skype</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'); */ // To skip a retired pilot, uncomment the next line: //if($pilot->retired == 1) { continue; } ?> <tr> <td width="20px" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td width="35%"> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" title="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td width="15%"><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" title="<?php echo $pilot->rank;?>" /></td> <td width="20%"><?php echo $pilot->totalflights?></td> <td width="20%"><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <td><div align="center"><?php $fieldvalue = PilotData :: GetFieldValue ( $pilot -> pilotid , 'Skype'); if( $fieldvalue != '' ) { echo ' <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script> <a href="skype:' . $fieldvalue . '?call"><img src="http://mystatus.skype.com/bigclassic/' . $fieldvalue . '" style="border: none;" width="100" height="30" alt="My status" /></a></a>' ; } ?></div></td> <?php } ?> </tbody> </table> Quote Link to comment Share on other sites More sharing options...
Colin Posted August 9, 2012 Author Report Share Posted August 9, 2012 that's brilliant thanks Jeff, just redesigning my site at the moment so will let you know if the code works, many thanks again mate appreciate it Quote Link to comment Share on other sites More sharing options...
Jeff Posted August 9, 2012 Report Share Posted August 9, 2012 You're welcome! 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.