Administrators ProAvia Posted January 5, 2017 Administrators Report Share Posted January 5, 2017 (edited) In the default phpVMS 5.5.2 (Simpilot version), there is a file in 'core/common' named 'ChartsData.class.php - it's not in version 2.1.934. I see in that file a reference to - #replacement functions for OFC charts - Google Charts API - simpilot #load Google Chart Wrapper library (3rd party) require CORE_LIB_PATH . '/gChart/gChart.php'; - at the top of the file. Is there something else I need to download/install for ChartsData.class.php to function? Seems this file provides a replacement for OFC (Open Flash Chart) functionality. What exactly does this file do and is it linked to specific default modules? ______________________________ My main reason for asking about this file is that on my version 2.1.934 site, I am using Airport Charts - by Vansers. That add-on module contains the exact same file name... ChartsData.class.php. The two files are nowhere near similar in content. I'd like to use the Airport Charts module in phpVMS 5.5.2 - AND any functions of the default chart as well. I don't think renaming a default file would be a good thing - as it would break stuff that I'm not even aware of. Kyle hasn't updated Airport Charts since 10/2011. I can get the original to work in version phpVMS 5.5.2 using the normal methods found here for other modules. I saw in the Airport Charts thread that Kyle is fine with the module being modded for personal use. Maybe I need to mod the Airport Charts folders/files to 'NavCharts' from 'Charts'? I suppose the best course of action is to use the new name of 'NavCharts' throughout the module to make it easier to keep track of the mod files (and rename the DB table to 'navcharts' also). Edited January 22, 2017 by ProAvia Quote Link to comment Share on other sites More sharing options...
web541 Posted January 5, 2017 Report Share Posted January 5, 2017 (edited) Yeah, the charts data class here is mainly for the charts built in to phpVMS by default (used in the /index.php/profile/stats link and I think the admin panel) to replace the OFC charts in an earlier version. Now, you could just merge the two files but I have split them and updated them for you (haven't tested them) here so take a look and it should work out of the box. If you are looking for charts from an API source (that can be read on say a hub page or something), then check this module out. Edited January 5, 2017 by web541 Module merged with master branch 1 Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted January 5, 2017 Author Administrators Report Share Posted January 5, 2017 (edited) Thanks! Yeah - I thought the default 5.5.2 file did something like that. On the main admin page, I don't get a chart. Nothing at /index.php/profile/stats either. Hence my question if I need to download anything else to make ChartsData.class.php work - see my first post. I messed with it some before loading your update. And I was able to get it to load. But I took mine out and used yours instead, cause yours looked cleaner and adds a few changes not in the original files. There is one small omission/error that was in the original files - and carried over into yours. admin/templates/charts/index.php, line 41 // Originally: <a href="viewcharts?icao=<?php echo $airport->icao; ?>"><?php echo $airport->icao; ?></a> // Change to: <a href="chartsadmin/viewcharts?icao=<?php echo $airport->icao; ?>"><?php echo $airport->icao; ?></a> //This will allow viewing the charts in the admin panel without the error of: //The module "VIEWCHARTS" doesn't exist! After changing that, it works great! If you'd like, maybe send a pull request to Kyle. I'll look at the AirCharts module too and then decide which to offer - heck, maybe both. I do like the option of viewing from the schedule briefing page in AirCharts. Thanks again! Edited January 5, 2017 by ProAvia 1 Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted January 5, 2017 Report Share Posted January 5, 2017 3 hours ago, ProAvia said: Thanks! Yeah - I thought the default 5.5.2 file did something like that. On the main admin page, I don't get a chart. Nothing at /index.php/profile/stats either. Hence my question if I need to download anything else to make ChartsData.class.php work - see my first post. I messed with it some before loading your update. And I was able to get it to load. But I took mine out and used yours instead, cause yours looked cleaner and adds a few changes not in the original files. There is one small omission/error that was in the original files - and carried over into yours. admin/templates/charts/index.php, line 41 // Originally: <a href="viewcharts?icao=<?php echo $airport->icao; ?>"><?php echo $airport->icao; ?></a> // Change to: <a href="chartsadmin/viewcharts?icao=<?php echo $airport->icao; ?>"><?php echo $airport->icao; ?></a> //This will allow viewing the charts in the admin panel without the error of: //The module "VIEWCHARTS" doesn't exist! After changing that, it works great! If you'd like, maybe send a pull request to Kyle. I'll look at the AirCharts module too and then decide which to offer - heck, maybe both. I do like the option of viewing from the schedule briefing page in AirCharts. Thanks again! Yes now works good. Only i have to find the charts and add the links Thanks guys... Quote Link to comment Share on other sites More sharing options...
web541 Posted January 5, 2017 Report Share Posted January 5, 2017 4 hours ago, ProAvia said: Thanks! Yeah - I thought the default 5.5.2 file did something like that. On the main admin page, I don't get a chart. Nothing at /index.php/profile/stats either. Hence my question if I need to download anything else to make ChartsData.class.php work - see my first post. I messed with it some before loading your update. And I was able to get it to load. But I took mine out and used yours instead, cause yours looked cleaner and adds a few changes not in the original files. There is one small omission/error that was in the original files - and carried over into yours. admin/templates/charts/index.php, line 41 // Originally: <a href="viewcharts?icao=<?php echo $airport->icao; ?>"><?php echo $airport->icao; ?></a> // Change to: <a href="chartsadmin/viewcharts?icao=<?php echo $airport->icao; ?>"><?php echo $airport->icao; ?></a> //This will allow viewing the charts in the admin panel without the error of: //The module "VIEWCHARTS" doesn't exist! After changing that, it works great! If you'd like, maybe send a pull request to Kyle. I'll look at the AirCharts module too and then decide which to offer - heck, maybe both. I do like the option of viewing from the schedule briefing page in AirCharts. Thanks again! Thanks and fixed Quote Link to comment Share on other sites More sharing options...
web541 Posted January 5, 2017 Report Share Posted January 5, 2017 (edited) I made a pull-request for this earlier and Kyle has been nice enough to merge it into the master branch, so anyone wanting to use the old "Airport Charts" module with phpVMS 5.5.x can now do it. https://github.com/Vansers/phpVMS_Airport_Charts Edited January 5, 2017 by web541 1 Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted January 5, 2017 Author Administrators Report Share Posted January 5, 2017 Cool! Thank you to both you and Kyle. So, in the admin panel - am I supposed to see a chart for the last 30 days? And on the My Stats page as well? I do have the default 5.5.2 ChartsData.class.php file in place, as well as the gchart/gchart.php. Quote Link to comment Share on other sites More sharing options...
web541 Posted January 6, 2017 Report Share Posted January 6, 2017 Yep, check your browser console and see if there are any errors showing up. Also, if you're game, you could redo the charts (or so-called 'modernize it'), then check these out Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted January 7, 2017 Author Administrators Report Share Posted January 7, 2017 Not showing any errors. I'll have a look at those links at a later date. Right now, I need to finish the site update from 2.1.934 to 5.5.2 so I can change the live site over. Don't really need the charts right now - and have been doing without on the old live site too. This will give me something to do after the update. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.