Jump to content

DisposableHero

Members
  • Posts

    766
  • Joined

  • Last visited

  • Days Won

    123

Everything posted by DisposableHero

  1. I solved that problem by adding a light colored glow outside the dark colored text and by using transparent background. With that, same logo is being used on both light and dark themes without any visual differences and loss of branding. Light theme: That light anti alliased glow is not noticable at all. Dark theme: That glow makes the text (or logo) visible and separable from the black background and looks fine. Just for your info
  2. Got your point Colors are nice, grey and yellow tones look good Yeah, there was a discussion or talks about adding "time" as a core expense unit, selectable per flight but what happened to that idea I really forgot. As I am using my own module for income and expense, I stopped using core features. But if I can find that old topic (or maybe the GitHub issue) we can start talking about it again. It may come in handy, we can define expenses per flight by time then. Thanks for bringing that old/forgotten topic back, after Laravel9 maybe we can focus on and have it implemented in core (while looking at the custom expense bug). Best wishes
  3. Why do you need a text change for it ? It is the "block time cost" of an aircraft (comes from subfleet of course) and it is the correct phrase to use there. In theory, it is the cost of using that aircraft for xx minutes, defined hourly as like in real life but calculated per minute. So in short, it is correctly designed, being calculated and used. Please do not mix up things with other things and try to find a way around to have what you wish to see, by requesting changes to working features That custom expense not working is still an open bug, probably will be fixed soon (after Laravel9 switch). If you need to stick with current dev for some reason, then you can design a really simple module to pass your custom expenses, that works, only "custom expenses without a module" solution/example is failing And just wondering, why do you need to create "a cost of crew salary" ? Pilots do get their pays, it is calculated. If you are trying to simulate cabin crew salaries, then doing it with an expense is much more logical. No need to brake working block time cost for that Best wishes
  4. Are you using phpvms v7 ? If not, this may not be the correct place to get support... To me that change looks like a css/styling issue or a browser rendering problem in general.
  5. If you mean making it changeable/selectable by the user, like a language selection dropdown at frontend, no it is not possible. If you want to change the language from English to French, then it is done in env.php file. APP_LOCALE=xx setting is for that.
  6. You can check the docs about how to build addons covering your special needs, https://docs.phpvms.net/developers/addons Needs at least basic knowledge about php itself (specially php7.4 and up) and laravel framework (version 8 and up) to begin with (some database engine knowledge may be needed depending on your needs of course), rest is up to your imagination and coding skills as the webmaster. Good luck and God speed.
  7. For pilots to use their salaries/earnings there are two public ways currently, provided by Disposable Basic "Jumpseat Travel" and "Aircraft Transfer" and some penalties applied by Disposable Special. It is possible to develop many more things to spend that virtual money, like type ratings payments done by pilots, free flights tied to some payment by pilot, maybe a virtual shop for them to buy items etc. All these ideas needs to be developed by the operator or some freelancer for the operator only or a third party developer/company as modules. As far as I know core v7 will not provide this kind of features as it is focused on providing a stable backend which you can build things on and use.
  8. It all depends on how your settings are done, how often you do database cleanup (how many months back you keep records of old/non relevant data), how much data (flights/pireps) you have etc. etc. So there will be no "typical" or "normal" database size which will fit everyone or every install. For example, my live site's database is around 150 mb, I do not keep non relevant data more than 3 months old (like simbrief packs, acars position reports), performing weekly database cleanup and optimization too. So my database backups and export/import operations do not cause any timeouts or errors. But this may not be your case or this can not be called as normal/typical size.
  9. It will work At least you will not see that relationship error anymore with an updated phpVMS v7
  10. Looks like the main links you added to your menu/navbar is ok but you are missing a crucial component, your phpVMS v7 is out of date (or not updated properly, missing some critical improvements). That relationship error is a clear sign this, in other words you are using a Disposable addon which requires a more recent (preferably latest dev build of) phpVMS v7. Latest version of the module has this info in its readme, Compatible with any latest development (dev) build of phpVMS v7 released after 10.FEB.22 Anyway, that "Aircraft <> Airline" relationship was added to phpVMS v7 around the first week of November, 02.NOV.21 to be precise. So if you want to stick with an older v7 release you should also find a compatible release of my addons with that version and stick with it too. I kindly suggest you to update your core phpVMS v7 or do not use my addons as I can not support older versions Best wishes and good luck on the update process.
  11. Looks like you are missing a cache cleanup or the module is not installed properly or you have problems with dynamic links. Either way, first try cleaning your application cache (admin > maintenance > application) as it is a part of the module installation, then for us to better understand what is going on, provide details about that "500 | Server Error". Enable debugging to see it live as it happens or check you laravel logs when you see that generic page. https://docs.phpvms.net/help Good luck
  12. Well, if you just hover your mouse over the Disposable link (which should be placed at the footer and should not be removed according to license), you can see the theme version and date it gets released. Anyway, technically what you did not liked is the `$pirep->ident` generated by phpvms v7. If you do not want to use that then you need to find all instances of it being used in the blade files and change it to maybe `$pirep->flight_number` depending on your needs. Pirep/Flight Ident => Airline Code + Flight Number + "/C." + Route Code + "/L." + Route Leg => UK + 156 + /C. + FEB + /L. + 8 => UK156/C.FEB/L.8 So be advised, if you want to use only the flight number, then you need to add the airline code before it too 'cause it will look like `156` only with `$pirep->flight_number` I can not give you exact locations or file names, it is used in many different blades including module pages.
  13. Glad it worked and saved you from more trouble Safe flights
  14. Well, to be honest I do not think you can get the full expenses of a pirep at that stage with the event. So forget charging the full debit total to the pilot. Nothing is impossible and you can do that of course but not with that expense listener and not at the moment it works. What you can do is, as I wrote earlier, charging the pilot with the half of his earnings per flight hours (nice admin). This means that they will earn less and this will make them fly scheduled routes more than free flights. Technically you have the pirep model and all its relationships there in the event, no need to look other places or events to find things. It is all object/model oriented. So when you have the $event->pirep in your hands this means that you have the flight (if it is a scheduled one), you have the user and all of its relationships like rank , type ratings, subfleets he/she can fly etc. You need to study what those models provide to you, what are their relationships and what to they provide too for better understanding what is available and when, also this will give you a better picture to think about. $event->pirep->flight_time , $event->pirep->distance , $event->pirep->user->rank->acars_base_pay_rate , $event->pirep->flight->flight_number are some examples for you. To be practical, you can simply assign them to shorter names variables like $pirep = $event->pirep; $user = $pirep->user; in the beginning of your code, so from that moment on you can use $pirep->flight_time instead of $event->pirep->flight_time or $user->rank directly when needed etc. As far as I remember, the pay rate is calculated like this round($pirep->flight_time * ( $user->rank->acars_base_pay_rate / 60), 2) , you can divide that result by 2 and charge the half of his/her earnings back as a punishment of freely flying https://github.com/nabeelio/phpvms/tree/dev/app/Models You can check the models and their relationships from the link above (source code of v7) Hope this helps, good luck
  15. $amount = 300; // or calculate something with the flight time like round($event->pirep->flight_time * 5) this will result 300 for 60 mins if (filled($event->pirep->flight_id)) { // There is a flight id present, so this is a scheduled flight. // return empty expense array, do nothing more. return $expenses; } Or worse You can just take the pilot pay back for free flights By calculating exactly the same amount a pilot earns with flying that flight, or can be a nice admin, taking half of it back etc. So in theory, that amount should be calculated and must be value.
  16. As this is a free flight, there will be no $pirep->flight_id , you can use that as your condition. For the $amount, you need to find some fixed value (maybe you can calculate something with the flight time or the distance flown as per your needs) at least please explain your wish a little bit more... What does "pirep expenses/debit" mean ? Rest looks ok though
  17. He had some covid problems and development was paused, thankfully he is recovering back and keeping up with the changes done to core while he was away. Most probably generator will be back online when he feels fully ok and updated
  18. So for example, that live map widget should use "col-lg" instead of "col" alone. "col" is the default, smallest available one, "col-lg" however is auto optimized for large screens when used with other columns etc. Same applies to cards etc as far as I remember.
  19. This is a theming issue in its core. I did not worked on "responsive" logic much, but it can be easily handled with Bootstrap's responsive auto sizing tools. The latest version of DH Theme had some pages partly fixed for small displays and phones, but it still needs work I do personally not use a small screen and developing things for them is just killing my eyes to be honest Check the latest version and see how I implemented the dashboard and login/register form etc, it may give some clues. Best wishes
  20. If you delete a user from your database engine, then you need to define it back there. Restoring a database backup will NOT restore the users, it will only restore the structure and data. Database users are not stored in the database itself, they are stored by the database server. Anyway; Either create the same user back from your control panel, grant access to that user for your phpvms database. Or create a new user from your control panel, grant access to that user for your phpvms database, enter that users info to your env.php, clean the application cache manually (folders are explained here , check #3 ) Good luck
  21. Just an update... With the latest dev build as of 12FEB, we now have; CronFiveMinutes (runs every 5 minutes) CronFifteenMinutes (runs every 15 minutes) CronThirtyMinutes (run every 30 minutes, like 06:00 and 06:30 of each hour) as an addition to the already running ones as; CronHourly (runs every hour) CronNightly (runs every day at 01:00 UTC) CronWeekly (runs every week, when a new week starts at Sunday 00:00 UTC) CronMonthly (runs every first day of the month at 00:00 UTC)
  22. Easier than building up a pagination logic Glad to hear you solved the problem. Safe flights
  23. If the above page is just for searching, then maybe it needs to be re-designed and no results will be shown during initial load. Which will greatly reduce the amount of data loaded there, of course the search criteria should be altered and it should not allow both airports to use the "select all" option. With this trick, user will be forced to either select a departure and see all flights out of that airport (departure = ICAO , arrival = ALL) or he/she can pick an arrival airport and see all incoming flights. Results may need a pagination of course depending on the flights/schedules provided by the VA. If that page is directly loading all flights (like a timetable) and also allowing the user to search, pagination will be the key. Also if possible, you can reduce the initially loaded flights by loading the ones departing out from user's current location by default (this may need a pagination too). They can do a search afterwards. Good luck
  24. Hi, This is technically not a guide, but an overall explanation of v7 systems related to automation and why CRON is needed etc. What is CRON ? Basically CRON is the name of "Scheduled Tasks" in Linux systems. Imagine it like a person executing tasks in behalf of you, a helper or an automation. Why it is needed and important ? Well, if you want to execute every single script needed for automation then you do not need it, but most of us do not have that much free time, specially we can not be online 24/7 to click some links every single minute or at best every hour. So CRON is important because it does exactly this. It runs some scripts, at minimum every single minute to see if there is something needed to be done. If not it waits and then checks again, again and again without any problems. What will happen if I do not have a working CRON ? To be honest, in the first days you will notice nothing about it. There will be practically no visual clues, no problems, everything will look ok and you will think that your v7 VA is running fine. The truth is, no it is not running fine, it is just piling up some possible problems and they will hit you hard soon. Here is a simple list I can think of related with CRON in v7; Every hour it checks your bids and deletes expired ones Every hour it checks your SimBrief packs and deletes expired + non used ones Every hour it checks your live flights and deletes them if they are stuck/frozen etc Every hour it checks your pilot reports (pireps, flight reports) and delete cancelled/rejected ones Every night it re-calculates the stats of your pilots, corrects them if there is an inconsistency Every night it re-calculates the financial data of your airline(s) and pilots Every night it checks and executes your daily expenses Every night it checks your schedule and activates/deactivates flights for that day/date Every night it checks your pilots to determine if they are still active or not Every month it checks and executes your monthly expenses These were just for the core, also addons/modules may need CRON (for this I can only speak for my addons of course) but you can expect it to be extended easily with new addons/updates; Every hour it checks your fleet, fixes problems about aircraft state, grounds them if they somehow get stuck "in air" or "in use" Every hour it checks your maintenance records, releases aircraft back to service (or keeps them grounded) Every month it executes tasks for monthly flight assignments Also you can extend core CRON usage, for example it can organize sending mails in the background to speed up things and save you from mail server slowdowns etc. And of course it is possible to develop more functions to be handled automatically, image yourself doing database cleanup every week or month, or always executing same things in a timely manner, to automate all these task you need a working cron. Like in my setup, it does more than the list above, I am happy and focused on other things and enjoying flights etc. What is the minimum interval for CRON timing needed ? If it is not hurting your server and if it is allowed (some hosting companies limit this), set it to run every 1 minute or 5 minutes. If not possible use the minimum possible period, maybe 15 minutes or 30 minutes. This will not hurt v7 much, why 'because as you can see above it executes the main tasks mostly with one hour intervals. So what happens if you set your cron to run every single minute. Nothing harmful, it just checks the time and tasks then stops, when it is the correct time then it executes the tasks and then stops again. Same thing will happen if you set it to run every 30 minutes too. Only the checks will be less frequent that's all. BUT, if you are planning to use cron for e-mail scheduling, then this timing becomes more important. Imagine a scenario, you enabled cron for emails (check docs for details) and set it to run every 30 minutes; 10:00 > Cron runs, executes hourly tasks 10:03 > A new pilot registers, mail is placed in the queue and waiting 10:12 > One of your pilots send a pirep, mail is placed in the queue and waiting 10:30 > Cron runs, no hourly tasks available, so it sends the mails only 10:31 > You get mails from your system, go check and approve the pilot and reject the pirep, mails are placed in the queue and waiting 10:48 > Another pilot sends a pirep, mail is placed in the queue and waiting 11:00 > Cron runs, executes hourly tasks and sends the mails 11:02 > You get another pirep notification and so on How can I set the CRON ? This is normally done via the control panel you are using, it may be CPanel or Plesk or something custom. If you can not see anything named like CRON, CRONTAB, Scheduled Task etc in your control panel, please consult your hosting providers documents and/or support. Also you can find an example code at admin > maintenance page, but it is an EXAMPLE, it may or may not work. You can use that example as a starting point or maybe use it while speaking with your hosting support staff. How can I understand my CRON is working or not ? Simple, check your storage/logs folder. If it is working as expected you will have a log file named something like cron-2022-02-08.log , if that file is not there this is an indication of either it is not configured right or it is not working. To get more details now check your laravel logs, if you see something like `production.ERROR: The Process class relies on proc_open, which is not available on your PHP installation.` in the log then this means that the CRON is trying to work but it can not. So the setup is correct, but you are now facing a much bigger problem. Your hosting company is limiting things, you can speak with them for more details, some do help and let you proceed, some will not. *** Update ; With the improvement to development build, now it will be possible to have CRON system working with limiting hosting companies too. Please check the docs about latest changes. *** My hosting provider does not offer CRON, what can I do ? You can use the built in web cron feature of v7, there are lots of free/paid services offering you to run web based crons. If you are getting the error explained above, this solution will not work either, so do not expect miracles. I have hosting related CRON problems, what can I do to solve this ? You can write your own web cron compatible code to bypass your hosting companies limitations, but for this you need to have some php + laravel + v7 knowledge. This is nothing impossible, but it is not easy either. Honestly you are on your own there, but what you need is basically to study the core cron tasks, duplicate and enhance them for your own usage. Or you can find another host, switch to another package/service they provide, switch to VPS or rent your own server, whichever you prefer. Finally; Please remember, v7 will install and work without CRON but you will loose some of its important and really needed abilities and features. Safe flights.
×
×
  • Create New...