Hello together I would like the side content in the middle is http://stuttgart-airlines-va.com/index.php/Pilots how can I do that?
11 hours ago, LH154 said:
Hello together I would like the side content in the middle is http://stuttgart-airlines-va.com/index.php/Pilots how can I do that?
Hi,
try adding this:
\<div class="sky-postcontent sky-postcontent-0 clearfix"\> \<div class="sky-content-layout"\> \<div class="sky-content-layout-row"\> \<!-- Your content here ============================================= --\> \</div\> \</div\> \</div\>
Has unfortunately not worked. Here times the original code I hope this is not a problem
\<section class="page-contents"\> \<div class="container"\> \<?php if(!defined('IN\_PHPVMS') && IN\_PHPVMS !== true) { die(); } ?\> \<h3\>\<i class="fa fa-users" fa-lg"\>\</i\> \<?php echo $title?\>\</h3\> \<?php if(!$pilot\_list) { echo 'There are no pilots!'; return; } ?\> \<table class="sky\_table" width="100%" cellspacing="0"\> \<thead\> \<tr\> \<th\>Pilot ID\</th\> \<th\>Name\</th\> \<th\>Rank\</th\> \<th\>Flights\</th\> \<th\>Hours\</th\> \</tr\> \</thead\> \<tbody\> \<?php foreach($pilot\_list 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);?\>" /\> \<?php echo $pilot-\>firstname.' '.$pilot-\>lastname?\> \</td\> \<td\>\<img src="\<?php echo $pilot-\>rankimage?\>" alt="\<?php echo $pilot-\>rank;?\>" /\>\</td\> \<td\>\<?php echo $pilot-\>totalflights?\>\</td\> \<td\>\<?php echo Util::AddTime($pilot-\>totalhours, $pilot-\>transferhours); ?\>\</td\> \<?php } ?\> \</tbody\> \</table\> \</div\> \</section\>
On 2017-6-12 at 4:20 AM, LH154 said:
Has unfortunately not worked. Here times the original code I hope this is not a problem
<section class=“page-contents”> <div class=“container”> <?php if(!defined(‘IN_PHPVMS’) && IN_PHPVMS !== true) { die(); } ?> <h3><i class=“fa fa-users” fa-lg"></i> <?php echo $title?></h3> <?php if(!$pilot_list) { echo ‘There are no pilots!’; return; } ?> <table class=“sky_table” width=“100%” cellspacing=“0”> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($pilot_list 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);?>” /> <?php echo $pilot->firstname.’ '.$pilot->lastname?> </td> <td><img src=“<?php echo $pilot->rankimage?>” alt=“<?php echo $pilot->rank;?>” /></td> <td><?php echo $pilot->totalflights?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <?php } ?> </tbody> </table> </div> </section>
it should work:
\<?php if(!defined('IN\_PHPVMS') && IN\_PHPVMS !== true) { die(); } ?\> \<section class="page-contents"\> \<div class="container"\> \<h3\>\<i class="fa fa-users" fa-lg"\>\</i\> \<?php echo $title?\>\</h3\> \<?php if(!$pilot\_list) { echo 'There are no pilots!'; return; } ?\> \<table width="100%" border="0" cellspacing="0" cellpadding="0" class="sky\_table"\> \<thead\> \<tr\> \<th\>Pilot ID\</th\> \<th\>Name\</th\> \<th\>Rank\</th\> \<th\>Flights\</th\> \<th\>Hours\</th\> \</tr\> \</thead\> \<tbody\> \<?php foreach($pilot\_list 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);?\>" /\> \<?php echo $pilot-\>firstname.' '.$pilot-\>lastname?\> \</td\> \<td\>\<img src="\<?php echo $pilot-\>rankimage?\>" alt="\<?php echo $pilot-\>rank;?\>" /\>\</td\> \<td\>\<?php echo $pilot-\>totalflights?\>\</td\> \<td\>\<?php echo Util::AddTime($pilot-\>totalhours, $pilot-\>transferhours); ?\>\</td\> \</tr\> \<?php } ?\> \</tbody\> \</table\> \</div\> \</section\>
If it no, send me a pm pls.
The pilot_list.tpl is called once per hub. This means that if you add a header into the pilot_list.tpl, the header will be shown same number as hubs. Open your core/modules/Pilots.php file and you will see something like this:
public function index() { // Get all of our hubs, and list pilots by hub $allhubs = OperationsData::GetAllHubs(); if(!$allhubs) $allhubs = array(); foreach($allhubs as $hub) { $this-\>set('title', $hub-\>name); $this-\>set('icao', $hub-\>icao); $pilot\_list = PilotData::findPilots(array('p.hub'=\>$hub-\>icao)); $this-\>set('allpilots', $pilot\_list); # deprecated $this-\>set('pilot\_list', $pilot\_list); $this-\>render('pilots\_list.tpl'); } $nohub = PilotData::findPilots(array('p.hub'=\>'')); if(!$nohub) { return; } $this-\>set('title', 'No Hub'); $this-\>set('icao', ''); $this-\>set('allpilots', $nohub); # deprecated $this-\>set('pilot\_list', $nohub); $this-\>render('pilots\_list.tpl'); }
As you can see on line 8, there is a foreach and within the foreach the pilot_list.tpl is called. What you can do to avoid it:
-
Replace the above part of code with this:
public function index() { // Get all of our hubs, and list pilots by hub $allhubs = OperationsData::GetAllHubs(); if(!$allhubs) $allhubs = array(); //foreach($allhubs as $hub) //{ //$this->set(‘title’, $hub->name); //$this->set(‘icao’, $hub->icao); //$pilot_list = PilotData::findPilots(array(‘p.hub’=>$hub->icao)); //$this->set(‘allpilots’, $pilot_list); # deprecated //$this->set(‘pilot_list’, $pilot_list); $this->set(‘allhubs’, $allhubs); $this->render(‘pilots_list.tpl’); //} //$nohub = PilotData::findPilots(array(‘p.hub’=>‘’)); //if(!$nohub) { //return; //} //$this->set(‘title’, ‘No Hub’); //$this->set(‘icao’, ‘’); //$this->set(‘allpilots’, $nohub); # deprecated //$this->set(‘pilot_list’, $nohub); //$this->render(‘pilots_list.tpl’); }
-
In this step, the pilot_list.tpl is called once by the module. Open your pilot_list.tpl and replace it to something like this:
<?php if(!defined(‘IN_PHPVMS’) && IN_PHPVMS !== true) { die(); } ?> <section class=“page-contents”> <div class=“container”> <?php if(!$allhubs) { echo ‘There are not any hubs!’;} else { foreach($allhubs as $hub) { <h3><i class=“fa fa-users” fa-lg"></i> <?php echo $hub->name; ?></h3> <?php $pilot_list = PilotData::findPilots(array(‘p.hub’=>$hub->icao)); if(!$pilot_list) { echo ‘There are no pilots in this HUB!’; continue; } ?> <table width=“100%” border=“0” cellspacing=“0” cellpadding=“0” class=“sky_table”> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($pilot_list 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);?>” /> <?php echo $pilot->firstname.’ '.$pilot->lastname?> </td> <td><img src=“<?php echo $pilot->rankimage?>” alt=“<?php echo $pilot->rank;?>” /></td> <td><?php echo $pilot->totalflights?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> </tr> <?php } ?> </tbody> </table> <?php } } ?> </div> </section>
Let us know how it works. I did not test it but it should be ok.
15 hours ago, servetas said:
The pilot_list.tpl is called once per hub. This means that if you add a header into the pilot_list.tpl, the header will be shown same number as hubs. Open your core/modules/Pilots.php file and you will see something like this:
public function index() { // Get all of our hubs, and list pilots by hub $allhubs = OperationsData::GetAllHubs(); if(!$allhubs) $allhubs = array(); foreach($allhubs as $hub) { $this->set(‘title’, $hub->name); $this->set(‘icao’, $hub->icao); $pilot_list = PilotData::findPilots(array(‘p.hub’=>$hub->icao)); $this->set(‘allpilots’, $pilot_list); # deprecated $this->set(‘pilot_list’, $pilot_list); $this->render(‘pilots_list.tpl’); } $nohub = PilotData::findPilots(array(‘p.hub’=>‘’)); if(!$nohub) { return; } $this->set(‘title’, ‘No Hub’); $this->set(‘icao’, ‘’); $this->set(‘allpilots’, $nohub); # deprecated $this->set(‘pilot_list’, $nohub); $this->render(‘pilots_list.tpl’); }
As you can see on line 8, there is a foreach and within the foreach the pilot_list.tpl is called. What you can do to avoid it:
- Replace the above part of code with this:
public function index() { // Get all of our hubs, and list pilots by hub $allhubs = OperationsData::GetAllHubs(); if(!$allhubs) $allhubs = array(); //foreach($allhubs as $hub) //{ //$this->set(‘title’, $hub->name); //$this->set(‘icao’, $hub->icao); //$pilot_list = PilotData::findPilots(array(‘p.hub’=>$hub->icao)); //$this->set(‘allpilots’, $pilot_list); # deprecated //$this->set(‘pilot_list’, $pilot_list); $this->set(‘allhubs’, $allhubs); $this->render(‘pilots_list.tpl’); //} //$nohub = PilotData::findPilots(array(‘p.hub’=>‘’)); //if(!$nohub) { //return; //} //$this->set(‘title’, ‘No Hub’); //$this->set(‘icao’, ‘’); //$this->set(‘allpilots’, $nohub); # deprecated //$this->set(‘pilot_list’, $nohub); //$this->render(‘pilots_list.tpl’); }
- In this step, the pilot_list.tpl is called once by the module. Open your pilot_list.tpl and replace it to something like this:
<?php if(!defined(‘IN_PHPVMS’) && IN_PHPVMS !== true) { die(); } ?> <section class=“page-contents”> <div class=“container”> <?php if(!$allhubs) { echo ‘There are not any hubs!’;} else { foreach($allhubs as $hub) { <h3><i class=“fa fa-users” fa-lg"></i> <?php echo $hub->name; ?></h3> <?php $pilot_list = PilotData::findPilots(array(‘p.hub’=>$hub->icao)); if(!$pilot_list) { echo ‘There are no pilots in this HUB!’; continue; } ?> <table width=“100%” border=“0” cellspacing=“0” cellpadding=“0” class=“sky_table”> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($pilot_list 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);?>” /> <?php echo $pilot->firstname.’ '.$pilot->lastname?> </td> <td><img src=“<?php echo $pilot->rankimage?>” alt=“<?php echo $pilot->rank;?>” /></td> <td><?php echo $pilot->totalflights?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> </tr> <?php } ?> </tbody> </table> <?php } } ?> </div> </section>
Let us know how it works. I did not test it but it should be ok.
Servetas,
he didn’t ask for that, he only want center the content with a class (CSS) lol.