Jump to content

Changing Schedule ICAO into City name


HighFlyerPL185

Recommended Posts

Hello there,

I was looking to change the ICAO code of Departure and Arrival points on the Schedule Results to city names. How can I do that? I had a look at the database directly but I don't see any fields that could have city names inside them.

Since I'm at that, I'll ask one further question if you wouldn't mind. Is there a way to present image instead of a day flown? I.e I want to make 7 additional columns (done that), each column standing for each day. The header would have Mon, Tue, Wed etc, and the image would display in the row, where appropriate.

Link to comment
Share on other sites

I was looking to change the ICAO code of Departure and Arrival points on the Schedule Results to city names. How can I do that? I had a look at the database directly but I don't see any fields that could have city names inside them.

I went in every airport listed in the Admin Center, and changed every one of them by hand (Ex: Phoenix International Airport to Phoenix)

Since I'm at that, I'll ask one further question if you wouldn't mind. Is there a way to present image instead of a day flown? I.e I want to make 7 additional columns (done that), each column standing for each day. The header would have Mon, Tue, Wed etc, and the image would display in the row, where appropriate.

There is a code in the forums that will do just that. Do a little searching i don't remember which category it is in (maybe Code snippets).

Link to comment
Share on other sites

For the ICAO problem, change:

<?php echo $schedule->depicao;?>

to

<?php echo $schedule->depname;?>

You can combine them so it's ICAO - Airport Name by doing:

<?php echo $schedule->depicao.' - '.$schedule->depname;?>

Same applies for arricao.

For the schedule frequency:

<?php
	// We are gonna loop each day of the week
	for($dayofweek = 0; $dayofweek < 7; $dayofweek++)
	{
			// echo our column opening
			echo '<td  class="center">';

			// Check if $i (the current day of week) exists
			if(substr_count($route->daysofweek, $dayofweek) > 0)
			{
					// there is a flight for sunday , so echo that plane icon out
			echo '<img src="IMAGE URL GOES HERE" />';
			}

			// Close that column
			echo '</td>';

	}
?>

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