Jump to content

Aircraft module


Strider

Recommended Posts

This module lists all your aircraft under its own airline that operates it. It is great for VA's that have multiple airlines under the one name.

Download: https://github.com/S...hive/master.zip

Demo: http://malaysiava.or...ex.php/Aircraft

I expanded the module it now includes a better way to insert the aircraft code into the module in the admin side, and it now allows you to list the aircraft that are under your codeshare agreement. It lists them in a seperate page.

This is version 1.1.

Thanks to all who helped me with this module.

You can modify this module as much as you like, but please retain the copyright at the bottom of the pages.

You will have to edit the aircraft.tpl file. It uses tabs, they should work, you can change the tabs that are used to ones you would like.

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Edit the tpl file. odd, about the version, I am pretty sure I had put the version in the footer. The tabs should be fairly straight forward, just look at the way they are setup and just add other divs, using the same as the last. You can get your own tabs too. just search for them on google, and you can get the code.

Link to comment
Share on other sites

<?php
if(!$aircrafts)
{
 echo '<span style="color:red;">No aircraft in your database</span>';
}
else {?>
<ul class="tabs">
<li><a href="#">Vola Italia</a></li>
<li><a href="#">Tab 2</a></li>
<li><a href="#">Tab 3</a></li>
</ul>

<!-- tab "panes" -->
<div class="panes">
<div><table class="tablesorter">
		 <tr>
			 <th>Aircraft</th>
			 <th>Image</th>
			 <th>View</th>
		 </tr>
		 <?php
		 foreach($aircrafts as $aircraft)
{
		 if($aircraft->airline == "VA")
		 {
		 ?>
		 <tr>
		 <td><?php echo $aircraft->aircraft;?></td>
		 <td>
		 <?php if(!$aircraft->image){
		 echo "No Image Available.";
		 }
		 else
		 {?>
		 <img src="<?php echo SITE_URL?>/lib/images/aircraft/thumbs/<?php echo $aircraft->image;?>" alt="<?php echo $aircraft->airline;?>"/><?php }?></td>
		 <td><a href="<?php echo SITE_URL?>/index.php/Aircraft/Aircraftview/<?php echo $aircraft->aircraftid;?>"><span class="btn">View more</span></a></td>
		 </tr>
		 <?php
		 }
		 }
		 ?>
		 </table></div>

what I havent figured out yet is how to link the tabs with the links

OK just figured out how it works :)

Link to comment
Share on other sites

  • 6 months later...
  • 2 weeks later...
  • 2 weeks later...
  • 1 month later...

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