Jump to content

vStatsCenter


Kyle
Message added by Kyle

WARNING: This module is no longer supported from the developer as the developer is shifting their focus on phpVMS v4 Addons.

Recommended Posts

  • 2 weeks later...
  • 1 month later...
  • 3 weeks later...
  • 1 month later...
  • Moderators

For us newbies, LOL, where to put the

<a href="<?php echo url('/vStatsCenter/'); ?>">vStatsCenter</a>

Is not clearly stated. What file would I put this code at?

You can put it in your Navigation bar or a link on any of the pages you wish. ;)

Link to comment
Share on other sites

  • Moderators
  • 2 weeks later...
  • 2 months later...

Hi Kyle,

I think i have found an error. On line 59 in the template folder it says

<h3 align="center">Stats For <?php echo $month_name;?> - <?php echo $year;?></h3>

The problem being when you select a month on the screen it stays at May. I took out the _name and it update ok but it only gives the month number.

Great module by the way :)

Resolve?

Link to comment
Share on other sites

Kyle,

Great addition, just the one problem i can find is when you change the selected date the h3 does not change it stays on the current month, the year changes but the month does not,

<h3 align="center">Stats For <?php echo $month_name;?> - <?php echo $year;?></h3>

I think its getting confused with the defined parameters at the top of the page.

I too have the same problem, how to solve it? thanks

Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...
  • 1 month later...
  • 7 months later...

Yes, you can use:

<?php echo substr($flighthours, 0, X); ?>

Where X replace with the number of characters you want to get (in that case 4).

I know this is very old, but having issues. I got this to work once before and now I can't. Can someone show me some code that is working to round off to 2 decimal places only? I have tried sound, substr and all that good stuff and nothing is working for me.

Would love some pointers.

Thanks!

Ray

Link to comment
Share on other sites

  • Moderators

I know this is very old, but having issues. I got this to work once before and now I can't. Can someone show me some code that is working to round off to 2 decimal places only? I have tried sound, substr and all that good stuff and nothing is working for me.

Would love some pointers.

Thanks!

Ray

You can do this way...

<?php echo round($flighthours, 2); ?>

Cheers!

Link to comment
Share on other sites

  • 3 weeks later...

You can do this way...

<?php echo round($flighthours, 2); ?>

Cheers!

Ill give that a try.

Thanks!

**EDIT**

Tried it. Still getting like 9 or more decimal places. This is flor flight hours (176.09999999999997)as well as the Top Flight Time (53.599999999999994).

Link to comment
Share on other sites

  • Moderators

Ill give that a try.

Thanks!

**EDIT**

Tried it. Still getting like 9 or more decimal places. This is flor flight hours (176.09999999999997)as well as the Top Flight Time (53.599999999999994).

Would you paste the code where you are getting those decimal places? Something is still messed up, and it should be rounding. ;)

Link to comment
Share on other sites

Would you paste the code where you are getting those decimal places? Something is still messed up, and it should be rounding. ;)

<tr>
<td align="center"><?php echo $flightcount;?></td>
<td align="center"><?php echo round($flighthours, 2); ?></td>
   <td align="center"><?php echo $passengers;?></td>
   <td align="center"><?php echo round($avglanding);?>(FT/MIN)</td>
</tr>

Notice the flight hours? I have cleared cookies and cache in my browser, cleared cache on site and all.

Here is the pilot time:

<tr>
<td align="center"><?php echo $ranktime;?></td>
<td align="center"><a href="<?php echo url('/profile/view/'.$ptime->pilotid);?>"><?php echo PilotData::GetPilotCode($ptime->code, $ptime->pilotid);?></a></td>
<td align="center"><?php echo $ptime->firstname . ' ' . $ptime->lastname; ?></td>
<td align="center"><?php echo round ($ptime->time), (2);?></td>
</tr>

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