I think that’s the only change necessary. I’m on mobile right now and can’t easily do a file compare to be sure. If the above doesn’t fix it, I will do a file compare once I am near my computer.
I think that’s the only change necessary. I’m on mobile right now and can’t easily do a file compare to be sure. If the above doesn’t fix it, I will do a file compare once I am near my computer.
5.5.2 - that is the same version I use. Not sure what you mean by “he adds icao and doesn’t scale”.
As far as current location being blank, you must fly at least one flight to a destination in your db for that field to show your current location. I guess there may be a way around that, but my pilots can’t use the random flights generator until they reach a certain rank - and will have flown several flights before then.
Did you try what I posted and did the error disappear?
5.5.2 - that is the same version I use. Not sure what you mean by “he adds icao and doesn’t scale”.
As far as current location being blank, you must fly at least one flight to a destination in your db for that field to show your current location. I guess there may be a way around that, but my pilots can’t use the random flights generator until they reach a certain rank - and will have flown several flights before then.
Did you try what I posted and did the error disappear?
I will review my files later when I am home and on the computer - and let you know what I have. There may be other changed I made to get it working correctly.
I will review my files later when I am home and on the computer - and let you know what I have. There may be other changed I made to get it working correctly.
There are only 3 files for the RandomFlights module
In /templates/randomsearch.php - the change I listed above is the only code change in mine from the original file.
In /template/randomflights.php - my file is the same as the original
In /modules/Randomflights/RandomFlights.php - my file is the same as the original
Have you actually completed at least one flight to a destination in your DB with the pilot sign-on you are using to test the module? I just checked mine, and with a sign-on that has not completed a flight, the current location is blank - but with a sign-on that has completed at least one flight, the current location is listed.So, basically, that pilot needs at least one PIREP submitted and approve that landed at an airport in your DB before the current location will show in Random Flights.
this location is automatically filled with the airport hud, so much so that in the old code it generates normal flights but in its code you it does not generate
There are only 3 files for the RandomFlights module
In /templates/randomsearch.php - the change I listed above is the only code change in mine from the original file.
In /template/randomflights.php - my file is the same as the original
In /modules/Randomflights/RandomFlights.php - my file is the same as the original
Have you actually completed at least one flight to a destination in your DB with the pilot sign-on you are using to test the module? I just checked mine, and with a sign-on that has not completed a flight, the current location is blank - but with a sign-on that has completed at least one flight, the current location is listed.So, basically, that pilot needs at least one PIREP submitted and approve that landed at an airport in your DB before the current location will show in Random Flights.
I think my module is outdated, could you send me what you use?
Your module is NOT outdated. It’s the exact same one I have. I went thru each file and changed any references in the files from tpl to php and then made sure all the file names ended in php. And then I added the code line I posted above. If I provided my files to you, the end result would be the same.
You still haven’t answered my question… Has the pilot filed at least one PIREP. Until the pilot files at least one PIREP, the current location will remain empty - that’s just the way the module works. The module looks at PIREP data to get the last arrival point and uses that as the pilots current location.
Another option would be to write additional code so that if the pilot hasn’t filed at least one PIREP, the module would then get the pilots assigned hub as the current location… But you are on your own there, as that’s beyond my present skill set.