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 months later...
  • 1 month later...
  • 2 months later...
  • Moderators

You guys must download the correct template format.

If you are using phpVMS with templates that uses the .TPL extension, then this one will be correct for your installation -> https://github.com/Vansers/phpVMS_vStatsCenter/archive/tpl_version.zip

If your using with .PHP extension, then this will be correct as well -> https://github.com/Vansers/phpVMS_vStatsCenter/archive/php_version.zip

Cheers!

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Hi

I have installed this module and it pulls the figures great but its just in plain text format? the table does not show like in your pictures? any way to fix this?

Capture_zps096ste67.png

Thanks

Martin

Kyle,

Thanks for making this module and distributing it. For those that are not getting a table to enclose their data, use <table width="100%" border="1px" align="center"> in your index.tpl where <table align="center" is.

There's 6 of these to change

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Just got through installing the module to do some local testing and everything looks good. However, when i go to click on a pirep link or pilot link within the screen, I get the following error:

" Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'vStatsCenter' does not have a method '%3c' in C:\wamp\www\core\classes\MainController.class.php on line218"

I also get the same error when I install the script to live site:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'vStatsCenter' does not have a method '%3c' in/xxxx/xxxxx/xxxxxxxxx.org/phpvms/core/classes/MainController.class.php on line 218

The x's represent the entire url which seems really go back the initial root.

Any ideas?

Regards,

Nat

Link to comment
Share on other sites

  • 1 month later...
  • 9 months later...
  • Moderators

NEW VERSION!

I have updated this module to provide a cleaner URL. The file changes are listed here - GitHub Commit

- The URL to the module will be required to be updated.

<a href="<?php echo url('/vStatsCenter/index/'.date(n).'/'.date(Y)) ?>">vStatsCenter</a>

- Simply, download the new files, replace them, and update the URL!

Download Version 1.1

Link to comment
Share on other sites

Hi Guys,

i have a problem on the Lines

Warning: Missing argument 1 for vStatsCenter::index() in /home/stuttgar/public_html/core/modules/vStatsCenter/vStatsCenter.php on line 19

Warning: Missing argument 2 for vStatsCenter::index() in /home/stuttgar/public_html/core/modules/vStatsCenter/vStatsCenter.php on line 19

Notice: The template file "/home/stuttgar/public_html//core/templates/vStatsCenter/index.php.tpl" doesn't exist in /home/stuttgar/public_html/core/classes/TemplateSet.class.php on line 248

can anyone help me to script or finish?

 

greating Niko

Link to comment
Share on other sites

4 hours ago, LH154 said:

Hi Guys,

i have a problem on the Lines

Warning: Missing argument 1 for vStatsCenter::index() in /home/stuttgar/public_html/core/modules/vStatsCenter/vStatsCenter.php on line 19

Warning: Missing argument 2 for vStatsCenter::index() in /home/stuttgar/public_html/core/modules/vStatsCenter/vStatsCenter.php on line 19

Notice: The template file "/home/stuttgar/public_html//core/templates/vStatsCenter/index.php.tpl" doesn't exist in /home/stuttgar/public_html/core/classes/TemplateSet.class.php on line 248

can anyone help me to script or finish?

 

greating Niko

The first two mean that you have to access the site via the url with the date parameters

BAD: http://siteurl.com/index.php/vStatsCenter

GOOD: http://siteurl.com/index.php/vStatsCenter/month/year

or via the code as suggested above in Kyle's post

 

<a href="<?php echo url('/vStatsCenter/index/'.date(n).'/'.date(Y)) ?>">vStatsCenter</a>

 

The second error means that you are using the wrong version of phpvms for this module, you should be using this version.

You can try to edit the module and rename files, but no guarantees it will work with your version.

Edited by web541
Link to comment
Share on other sites

  • 3 weeks later...

Haven't tested this

core/common/VStatsData.class.php
Add This

public function monthly_awards_vawards($month, $year) {
  $query = "SELECT l.*, UNIX_TIMESTAMP(l.grt_dategrant) as dateissued, p.*, e.*
  FROM `vawards_grants` l
  LEFT JOIN `vawards_awards` p ON p.awd_id = l.grt_awdid
  LEFT JOIN " . TABLE_PREFIX . "pilots e ON e.pilotid = l.grt_pilotid WHERE e.retired = 0 AND MONTH(l.grt_dategrant) = ".DB::escape($month)." AND YEAR(l.grt_dategrant) = ".DB::escape($year)."
  ORDER BY l.grt_dategrant ASC";

  $results = DB::get_results($query);
  return $results;
}


In core/modules/vStatsCenter/vStatsCenter.php
Find this
 

$this->set('awards', VAStatsData::monthly_awards($month, $year));

Replace it with this
 

$this->set('awards', VAStatsData::monthly_awards_vawards($month, $year));


In core/templates/vStatsCenter/index.php
Find this

<tr>
    <td align="center"><a href="<?php echo url('/profile/view/'.$awd->pilotid);?>"><?php echo PilotData::GetPilotCode($awd->code, $awd->pilotid);?></a></td>
    <td align="center"><?php echo $awd->firstname . ' ' . $awd->lastname; ?></td>
    <td align="center"><?php echo $awd->name;?></td>
    <td align="center"><?php echo date("F j, Y", $awd->dateissued); ?></td>
</tr>

Replace it with this
 

<tr>
    <td align="center"><a href="<?php echo url('/profile/view/'.$awd->pilotid);?>"><?php echo PilotData::GetPilotCode($awd->code, $awd->pilotid);?></a></td>
    <td align="center"><?php echo $awd->firstname . ' ' . $awd->lastname; ?></td>
    <td align="center"><?php echo $awd->awd_name; ?></td>
    <td align="center"><?php echo date("F j, Y", $awd->dateissued); ?></td>
</tr>


If it doesn't work, then play around with the sql query at the top here.

Edited by web541
  • Like 1
Link to comment
Share on other sites

  • 2 months later...
On 12/16/2016 at 1:05 PM, Kyle said:

NEW VERSION!

I have updated this module to provide a cleaner URL. The file changes are listed here - GitHub Commit

- The URL to the module will be required to be updated.


<a href="<?php echo url('/vStatsCenter/index/'.date(n).'/'.date(Y)) ?>">vStatsCenter</a>

- Simply, download the new files, replace them, and update the URL!

Download Version 1.1

Keep getting the following error:

Deprecated: Non-static method VAStatsData::monthly_flight_stats() should not be called statically, assuming $this from incompatible context in phpvms\core\modules\vStatsCenter\vStatsCenter.php on line 36

 

 

Link to comment
Share on other sites

  • 1 month later...

I tried to get it working but now im getting 
I ve replaced public by public static and some minor thing read above ..


Fatal error: Using $this when not in object context in /core/modules/vStatsCenter/vStatsCenter.php on line 29

Edited by elfrost
Link to comment
Share on other sites

  • 4 weeks 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...