Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by web541

  1. If you want to add a skin that you've already found, it should be as simple as downloading it and uploading it to a new folder in your lib/skins directory. After, just select this skin in the admin panel's settings. There may be some issues along the way (compatibility, modules, file extensions, etc.) but most are a simple fix if you search/post to this forum. If you want to create a new skin, there's an old thread here that will help (in simple terms): In terms of ACARS setup, the setup depends on which ACARS software you plan on using. Otherwise this post may serve better in the Paid Services forum if you are finding someone else to do it for you.
  2. Nice job! I was going to suggest checking the $entry and $exit variables as they were the last things that could possibly be changed.
  3. By this do you mean it's running but not going backwards, or not running at all?
  4. Hmm, that could be a start. Is there a pattern to it or is it truely random? And does the order stay the same if you run the same function twice or do the waypoints keep jumbling up? Was the first dump taken before this line: $navpoint_list_details = self::getNavDetails($navpoint_list); or earlier in the function? If that's the case then it's probably an issue within the loops somewhere as anything further than this line is just pulling waypoint info from your DB and ordering it (which seems to be working from your dumps).
  5. I would change this: <select id="depicao" name="depicao"> <option value="">Select All</option> <?php if(!$depairports) $depairports = array(); foreach($depairports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao .' ('.$airport->name.')</option>'; } ?> </select> to this: <input type="text" name="depicao" id="depicao" placeholder="Enter Departure ICAO..." /> and do the same for the arrival airport as well, just change all the depicao to arricao in the new input. Hope that helps.
  6. This is fine for the location column, but the airline column should not be NULL at any point. If it is, then you need to re-install the module correctly as you may be missing some admin files otherwise it will not work as expected.
  7. You can try using this code: Make sure that the 'core/codon.config.php' inside the require() is set to the relative path of your phpvms folder/core/codon.config.php file.
  8. In addition to what ProAvia has suggested, you may want to check that the: Config::Set('ACARS_LIVE_TIME', 720); line in your core/local.config.php is set to a lower number (this is by default 720 minutes/12 hours).
  9. It depends what sort of hosting you go for (e.g. shared) but generally all you need to do is ensure the correct PHP and MySQL versions are supported by your host and you've selected them properly. Then I would upload a fresh download of phpVMS, go to the /install url and follow the prompts. When that's done, you'll have a fresh database, so depending on how much you have altered your localhost install, you could either upload your skin(s) and modules individually to the new install OR delete the new phpVMS installation, drag and drop your localhost installation into your hosting and change the details at the top of your core/local.config.php file. No guarantees there won't be issues though, so be prepared to fix a few if you come across them. In regards to the airport fetching, you can now check this post out and give it a try: Although since you are using phpVMS 2.x then the files may be slightly different so it's possible that you'll need to manually import the changes to your own install.
  10. Is there a reason you are wanting to upgrade versions (e.g. host forces a higher PHP version?), because otherwise if you have a working install then I wouldn't touch it too much. With the actual upgrade, from phpVMS 2.x to phpVMS 5.5.x (or it's pretty much just getting it to install with minimal errors and then changing your skin's template files from .tpl to .php. And inside any data classes in core/common (mostly any modules you have installed, the default files should already have this), making sure that the syntax is public static function instead of just public function. This is a known issue (and has been for years since VACentral got changed), there isn't a preferred way to fix it right now. I think most people are still finding them manually and importing them via .csv. There's a bunch of forum posts about this. What PHP version and MySQL/MariaDB version are you running? This sounds like a database issue. Yep that's another known issue (since Google changed their mapping API terms). The link to change to OSM maps on Nabeel's github is useful and people have had success with that method. The full discussion is here: Unfortunately not, you'd have to make the same changes to the map files in whichever phpVMS version you use. But the process is the same for all of them, just with slight changes to the files and file extension (.tpl vs .php). If you are planning on starting from scratch then ProAvia's repo is a good start especially if you are on a high php version. See here. I addressed this at the start, it's drag and drop but then you would have to change your file extension and watch out for any errors and fix them as they pop up.
  11. Sounds like some sort of logic error to me. Here's a couple of guesses: if ($entry < $exit) { # Go forwards through the list adding each one for ($l = $entry; $l <= $exit; $l++) { $allpoints[$airways[$name][$l]->name] = $airways[$name][$l]; } } elseif ($entry > $exit) { # Go backwards through the list for ($l = $exit; $l >= $entry; $l--) { $point_name = self::cleanName($airways[$name][$l]->name); $allpoints[$point_name] = $airways[$name][$l]; } there could be something going on with the name here as going backwards, the point name isn't 'cleaned' (through the cleanName function), so I would try changing these lines: $point_name = self::cleanName($airways[$name][$l]->name); $allpoints[$point_name] = $airways[$name][$l]; // TO THIS: $allpoints[$airways[$name][$l]->name] = $airways[$name][$l]; and seeing if that does anything. For these lines here: if (isset($airways[$name])) { $entry_name = self::cleanName($navpoints[$i - 1]); $exit_name = self::cleanName($navpoints[$i + 1]); because there's a bunch of looping happening afterwards, this could be something, so I would temporarily change it to this: if (isset($airways[$name])) { $entry_name = self::cleanName($navpoints[$i + 1]); $exit_name = self::cleanName($navpoints[$i - 1]); and see if it does the reverse (so the route is parsed correctly backwards instead of forwards). Just a hunch so I could be totally wrong. Does this mean it's not in the output at all? $navpoint_list_details = self::getNavDetails($navpoint_list); I would want to know if the $allpoints variable contains the correct airways/points at this stage before any of the parsing occurs. So before this line, you might want to dump it and see if the results are the same: return $allpoints; but phpVMS might not like the format of that, so you might have to return json_encode($allpoints) if you're logging it in the console or print_r($allpoints) if you have a url.
  12. You should be able to modify this function in PHP: https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/modules/ACARS/ACARS.php#L60 which is read here: https://github.com/DavidJClark/phpvms_5.5.x/blob/master/lib/js/acarsmap.js#L65 and it should allow you to use the templating tags.
  13. 1 - If you've got auto-retire set to true in your local.config.php then it routes (either from cron or every 24hours) to this function: https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/common/PilotData.class.php#L712 then ultimately to this function: https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/common/PilotData.class.php#L353 2 - Check your local.config.php file first for PILOT_STATUS_TYPES, otherwise they're defined here: https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/app.config.php#L466 Can you check your console and inspect the <select name="retired"> when you go to edit a pilot (the dropdown for their status) and check that the value of each <option> matches up with what it should be.
  14. I don't think it has been implemented yet. There's an image uploading request on github but I'm not sure if it covers avatars or just normal site images/pages.
  15. Have you tried optimizing your tables through the maintenance page? Not sure if it will help but it's worth a try. It's possible that the phpVMS foreign key constraints have been messed up due to the high IDs, if you are continuing to have issue then I would recommend setup a second site, have a fresh install/DB and migrate your data over. If importing it retains the high IDs then you may have to write a script that takes the old data dump and inserts them one at a time from the start. It's definitely weird that things are working but the data is ending up in some sort of 'pseudo table' and not showing in the DB.
  16. No I don't think it's been put anywhere yet, but you can put that code anywhere you want (you could try /layouts/SKIN/profile/index.blade.php and search for "Rank" and put it nearby). <img src="{{ asset('/assets/img/ranks/rank1.png') }}" alt="Rank 1" /> or <img src="{{ public_asset('/assets/img/ranks/rank1.png') }}" alt="Rank 1" />
  17. So you would like a list of PIREPS for each hub, but is this filtered on the PIREP's dep/arr airport or the PIREP user's home airport? So in other words for each hub a list of PIREPS to/from that airport or a list of PIREPS from users from that hub? I'll assume the latter based on your example. Not sure where you want to display it, but I would recommend a HUBS page (if that's what you are going for): public function METHOD($icao) { $pireps = $this->pirepRepo ->with('user') ->whereHas('user', function ($query) use($icao) { return $query->where('home_airport_id', '=', $icao); }) ->paginate(); ... or if you wanted the first option public function METHOD($icao) { $where = ['dpt_airport_id' => $icao]; $orWhere = ['arr_airport_id' => $icao]; $pireps = $this->pirepRepo->scopeQuery(function($query) use ($where, $orWhere) { return $query->where($where)->orWhere($orWhere)->orderBy('created_at', 'desc'); }); $pireps->paginate(); ... I think there's a whereOrder() method somewhere but not sure if it applies to this case.
  18. It should accept png files. I would store the images inside your public/ directory (or your public_html like what @nickkecooper said if you've installed it like that) and then link them that way: -- public ------ assets ------------ img --------------- ranks ------------------- rank1.png then link them like this: http://YOURSITE/assets/img/ranks/rank1.png or if you do want to get them via code, something like this should work: <img src="{{ asset('/assets/img/ranks/rank1.png') }}" alt="Rank 1" />
  19. Do you mean when you click on the "View" route button? I think you may be missing the 'jqmodal' class on the button as that is what it needs for the JS to pick it up: <a class="cc_hubadm_link_tbl_pir" href="<?php echo SITE_URL?>/admin/action.php/operations/viewmap?type=pirep&id=<?php echo $pirep->pirepid;?>">View Map</a> should be: <a class="cc_hubadm_link_tbl_pir jqModal" id="dialog" href="<?php echo SITE_URL?>/admin/action.php/operations/viewmap?type=pirep&id=<?php echo $pirep->pirepid;?>">View</a> and it won't hurt to throw in the id either. Will you be using this on the front end or the admin side? If it's the admin then it should work like that. If it's the front end then there are some scripts that need to be loaded to get it to work, namely the .jqmodal related ones in this file: https://github.com/DavidJClark/phpvms_5.5.x/blob/master/admin/lib/phpvmsadmin.js
  20. I think the admin uses 'baseurl' instead of 'url' that is used in the base_map.js file so if you just added it in I figured it should fix that up. Glad it's working 👍 What's the issue? If I can't help then maybe someone else will jump in.
  21. No it should be working, I meant that the conversion was only for the front end so I don't think anyone actually thought about the admin map there. It's weird that it's not working. Not sure if anyone's swapped that part over but it's a good thought. What happens if you put this: <script> var url = "<?php echo SITE_URL; ?>"; </script> above this in your route_map.php file: <script src="<?php echo SITE_URL?>/lib/js/base_map.js"></script>
  22. Is that in your admin/templates/route_map.php file? It looks like you may have just copied the front end version across and I don't think the OSM conversion includes the admin part. Can you check whether you have the leaflet.js/leaflet.css files in your source code for that page (do a Ctrl + F for 'leaflet.js')? You may try replacing this: <script src="<?php echo SITE_URL?>/lib/js/base_map.js"></script> <script src="<?php echo SITE_URL?>/lib/js/acarsmap.js"></script> with this: <script src="<?php echo SITE_URL?>/lib/js/leaflet/leaflet.js"></script> <script src="<?php echo SITE_URL?>/lib/js/base_map.js"></script> or better yet in your admin/lib/layout/header.php file after this: <?php Template::Show('core_htmlhead.php'); ?> put this: <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/js/leaflet/leaflet.css" /> <script src="<?php echo SITE_URL?>/lib/js/leaflet/leaflet.js"></script> and then you probably don't need the acarsmap.js <script> in admin/templates/route_map.php anymore as the map loading should be done in base_map.js.
  23. Nothing immediately jumps out, but it looks like it can't load the scripts properly. Have you updated the contents of your lib/js/acarsmap.js and lib/js/base_map.js? I'm going to assume so as the maps are working on the other pages. The first error L is not defined means it cannot find/cannot load the lib/js/leaflet/leaflet.js file. The createMap error means it cannot find/load the lib/js/base_map.js file. The runtime error is particularly odd, that shouldn't be there. Maybe check that your lib/js and lib/js/leaflet directory permissions to 755, clear your browser cache and reload? Seems weird that they work on all the other pages.
  24. It gets that from the submitdate column of the first PIREP in your database. Now that you mention it, it could be related to your financial expenses so potentially one of your PIREPS may have a submit date that's not actually a valid date in yyyy-mm-dd hh:mm:ss so you may want to check that (or run a query), first check the very first PIREP in your database. If that doesn't work, try this: Change this line in admin/maintenance.php: FinanceData::updateAllExpenses(); put this: CodonCache::delete('start_date'); CodonCache::delete('months_since_start'); FinanceData::updateAllExpenses(); and now run the cron. If that doesn't work, see if the error goes away by commenting this out in admin/maintenance.php FinanceData::updateAllExpenses(); TO THIS: // FinanceData::updateAllExpenses();
  25. Just create a module (or add to an existing module) in core/modules/MODULE NAME/MODULE NAME.php and inside it add a function with your data in it. See the example here (the code for what you provided) https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/modules/PIREPS/PIREPS.php#L517 Then you can use <?php MainController::Run('MODULE NAME' 'FUNCTION NAME', ADDITIONAL PARAMETERS); ?>
  • Create New...