Jump to content

Fleet Table


AFVA | Mitchell

Recommended Posts

Version 1.0 Outdated

A table which contains your full fleet information.

Preview: http://www.vhmrw.site90.com/index.php/fleet

1. Add the folder 'Fleet' to your core/modules folder

2. Add fleet_main.tpl to your coretemplate folder

3. Go to: www.yourvmssite.com/index.php/fleet

(Replacing www.yourvmssite.com with your site URL of course)

Download Link: http://downloads.vhmrw.site90.com/Fleet%20Module.zip

(only download link as earlier version)

------------------------------------------------------------------------------------------

Version 1.1  Released

1.1 Features:

All previous 1.0 information

Total Hours

Total Flights

Custom SQL (FleetInfo)

1.1 Will come with a very large table. To things you don't want:

1. Go to the thead section

2. Find the name of the thing you want to delete

3. Delete this: <td><b>Whatever</b></td>

4. Go to the tbody section

5. Do the same

Preview of 1.1: http://vhmrw.site90.com/index.php/fleetta

Download attached.

------------------------------------------------------------------------------------------

Feedback appreciated,

Mitchell Williamson

FleetTable1.1FIXED.zip

  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...

Thank you, i made a few changes to it, as i found you had an extra <table> tag which was obsolete. Removed that, also added a css rule so that the borders collapsed so they didn't llook weird, also changed the <b></b> to <strong></strong> just to help with validation. Also changed the link to this thread to open up in a new tab.

Cheers

Dan C

Link to comment
Share on other sites

Thanks for this hack. It works great. On my site, I have not used V2 of this yet with the thumbnail images, am still using the original.

Here is a peak at how I have mine looking. I borrowed some code from Nabbel's Downloads list from the admin area and used it on the fleet table. It worked out great.

http://thunderva.com/index.php/fleet

Link to comment
Share on other sites

I have not used V2 of this yet with the thumbnail images

Actually its 1.1.2

Here is a peak at how I have mine looking

Looks very nice!

Also while im here:

Version 2.0 (Final Public Release Version) of the Fleet Table will be released soon....

FEATURES:

Aircraft Image

fleet_table.tpl bugs fixed.

Fleet.php Fixes

Some Information about fleet below the table

Just a question....anyone interested in a 'Download' Link for each aircraft?

Also if anyone has ANY requests for the page whether its got to do with the table or if you want something nice below it (screenshot gallery, downloads, checklists etc)

Link to comment
Share on other sites

  • 3 weeks later...

I really like this feature, but I wanted all of my fleet to be shown in the fleet page. As the code is set, planes will only appear once they have accrued flight time. As my VA is brand new, there are quite a lot of aircraft with no hours logged that won't show up in the fleet page. So I took the liberty of amending the SQL query in the /core/modules/fleet/fleet.php page:

Original SQL:

			$sql = 'SELECT a.*, a.name AS aircraft,
				   COUNT(p.pirepid) AS routesflown,
				   SUM(p.distance) AS distance,
				   SEC_TO_TIME(SUM(p.flighttime*60*60)) AS totaltime,
				   AVG(p.distance) AS averagedistance,
				   AVG(p.flighttime) as averagetime
				  FROM   '.TABLE_PREFIX.'aircraft a
					INNER JOIN '.TABLE_PREFIX.'pireps p ON (p.aircraft = a.id)
				  GROUP BY a.registration';

By changing the join function, I can now show all of the fleet, regardless of whether it has logged any flight time:

Amended Code:

$sql = 'SELECT a.*, a.name AS aircraft,
				   COUNT(p.pirepid) AS routesflown,
				   SUM(p.distance) AS distance,
				   SEC_TO_TIME(SUM(p.flighttime*60*60)) AS totaltime,
				   AVG(p.distance) AS averagedistance,
				   AVG(p.flighttime) as averagetime
				  FROM   '.TABLE_PREFIX.'aircraft a
					LEFT OUTER JOIN '.TABLE_PREFIX.'pireps p ON (p.aircraft = a.id)
				  GROUP BY a.registration';

fleettable.PNG

Cheers,

Stu

Link to comment
Share on other sites

Guest lorathon

New to all this but love the fleet add on.

Question - How can you add this to the main menu? I have just started customizing the standard package so not much changed. I would like to have the fleet link right next to the "live map" link.

Thanks.

Nevermind I figured that out but the image is not showing up. I put an image url attached to the fleet aircraft through the admin. When i open the fleet page image is not there. If i copy the image url from the missing image location it is the same url as the fleet page. what am i doing wrong?

Link to comment
Share on other sites

Nevermind I figured that out but the image is not showing up. I put an image url attached to the fleet aircraft through the admin. When i open the fleet page image is not there. If i copy the image url from the missing image location it is the same url as the fleet page. what am i doing wrong?

I had the same problem. The code used to call the image is wrong. On the fleet_table.tpl change the following.

<img src="<?php echo $aircraft->imageurl; ?>">

to

<img src="<?php echo $aircraft->imagelink; ?>">

That should work for you.

Link to comment
Share on other sites

FLEET TABLE 2.0 BETA - FINAL PUBLIC RELEASE

Here is the BETA of Fleet Table 2.0

NEW FEATURES:

Added download link

Image fixes

SQL Updated

and more!

It is attached.

NOTE: This is only a BETA release and many things may not work yet.

NOTE2: I'm gonna be away from Monday 22nd to Friday 27th (i think).

FleetTable2BETA.zip

  • Like 1
Link to comment
Share on other sites

Guest lorathon

I had the same problem. The code used to call the image is wrong. On the fleet_table.tpl change the following.

<img src="<?php echo $aircraft->imageurl; ?>">

to

<img src="<?php echo $aircraft->imagelink; ?>">

That should work for you.

Thanks worked like a charm. You know I saw this and changed it but I must have typoed or something. Could not get it to work. Does now though. Thanks again.

Link to comment
Share on other sites

  • 3 weeks later...

Hello !!

I have a preoblem !! Where I have to put aircraft images ? I tired to ../images/aircraft, but didnit work !! I make mistake ??

Please help !!

You upload the images to your server then you go to Airline Operations --> Add and Edit Fleet .

From there you click on the aircraft you want to add a picture to and the add the full URL to the "Link to Aircraft Image" field. The module will then display the image.

Hope this helps!

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