Jump to content
Strider

Hubs page module

Recommended Posts

Can you post your code for the table so we can take a look, but inspecting, it seems that you don't have a source for you image

In other words, this is what you have

<img src="" alt="Captain">

And you need to have this

<img src="have something in this field" alt="Captain">

So there might be something going on, jnascar's post looks correct

Share this post


Link to post
Share on other sites

Hello ,  I did every steps on installation guide but I have a problem I have the simspilot phpvms every file is .php''  

Notice: The template file "/home/u147302258/public_html/v2/core/templates/hub/hubview.php" doesn't exist in /home/u147302258/public_html/v2/core/classes/TemplateSet.class.php on line 231 '' 
And I have the same problem on the admin page 
 
Best Regards
Air Corsica Virtuel CEO
Edited by rafaeletras

Share this post


Link to post
Share on other sites

Hey many thanks, the module works very well, can you add the information (a text box) for additional airport information?

Thank you again

Share this post


Link to post
Share on other sites

Try using this

<?php
$dep_schedules = SchedulesData::findSchedules(array('depicao' => $hubs->icao));
foreach($dep_schedules as $sched) {
	echo $sched->code.$sched->flightnum.' | '.$sched->depicao.' - '.$sched->arricao;
	echo '<br />';
}

$arr_schedules = SchedulesData::findSchedules(array('arricao' => $hubs->icao));
foreach($arr_schedules as $sched) {
	echo $sched->code.$sched->flightnum.' | '.$sched->depicao.' - '.$sched->arricao;
	echo '<br />';
}
?>

You can then format it how you would like in your template.

Share this post


Link to post
Share on other sites
21 hours ago, web541 said:

Try using this


<?php
$dep_schedules = SchedulesData::findSchedules(array('depicao' => $hubs->icao));
foreach($dep_schedules as $sched) {
	echo $sched->code.$sched->flightnum.' | '.$sched->depicao.' - '.$sched->arricao;
	echo '<br />';
}

$arr_schedules = SchedulesData::findSchedules(array('arricao' => $hubs->icao));
foreach($arr_schedules as $sched) {
	echo $sched->code.$sched->flightnum.' | '.$sched->depicao.' - '.$sched->arricao;
	echo '<br />';
}
?>

You can then format it how you would like in your template.

Thank you for this,

I have just got to find where to edit the table now :)

Share this post


Link to post
Share on other sites
2 hours ago, Angel Air said:

I have just got to find where to edit the table now :)

In case you are in need of inspiration

<h3>Departure Schedules</h3>
<br />
<table>
	<thead>
		<tr>
			<th>Flight Number</th>
			<th>Departure Airport</th>
			<th>Arrival Airport</th>
			<th>Flight Time</th>
		</tr>
	</thead>
	<tbody>
	<?php
	$dep_schedules = SchedulesData::findSchedules(array('depicao' => $hubs->icao));
	foreach($dep_schedules as $sched) {
	?>
		<tr>
			<td><?php echo $sched->code.$sched->flightnum; ?></td>
			<td><?php echo $sched->depicao; ?></td>
			<td><?php echo $sched->arricao; ?></td>
			<td><?php echo $sched->flighttime; ?>hrs</td>
		</tr>
	<?php
	}
	?>
	</tbody>
</table>

<br />
<h3>Arrival Schedules</h3>
<br />
<table>
	<thead>
		<tr>
			<th>Flight Number</th>
			<th>Departure Airport</th>
			<th>Arrival Airport</th>
			<th>Flight Time</th>
		</tr>
	</thead>
	<tbody>
	<?php
	$arr_schedules = SchedulesData::findSchedules(array('arricao' => $hubs->icao));
	foreach($arr_schedules as $sched) {
	?>
		<tr>
			<td><?php echo $sched->code.$sched->flightnum; ?></td>
			<td><?php echo $sched->depicao; ?></td>
			<td><?php echo $sched->arricao; ?></td>
			<td><?php echo $sched->flighttime; ?>hrs</td>
		</tr>
	<?php
	}
	?>
	</tbody>
</table>

Share this post


Link to post
Share on other sites
On 3/22/2017 at 4:15 PM, web541 said:

Try using this


<?php
$dep_schedules = SchedulesData::findSchedules(array('depicao' => $hubs->icao));
foreach($dep_schedules as $sched) {
	echo $sched->code.$sched->flightnum.' | '.$sched->depicao.' - '.$sched->arricao;
	echo '<br />';
}

$arr_schedules = SchedulesData::findSchedules(array('arricao' => $hubs->icao));
foreach($arr_schedules as $sched) {
	echo $sched->code.$sched->flightnum.' | '.$sched->depicao.' - '.$sched->arricao;
	echo '<br />';
}
?>

You can then format it how you would like in your template.

Will apologize upfront, however this is rather confusing.  Is this code specifically for use with the Hub Module or is this referencing somewhere else?  

 

Regards,

Nat

Share this post


Link to post
Share on other sites
On 1/2/2017 at 4:44 PM, jnascar said:

Try this:

<td align="center"><img src="<?php echo RanksData::getRankImage($pilot->rank);?>" alt="<?php echo $pilot->rank;?>" /></td>

This worked for me.

Share this post


Link to post
Share on other sites
2 hours ago, natcret said:

Will apologize upfront, however this is rather confusing.  Is this code specifically for use with the Hub Module or is this referencing somewhere else?

Yes, this is specifically for the hub module.

Check this post

Put that in the hubview.tp/.php file

Share this post


Link to post
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...