Lotus Posted June 2, 2009 Report Share Posted June 2, 2009 Hi Nabeel, I have an idea about adding something and I want to check with you about how to do it without getting in the way of updates. I want to restrict flights available to given pilots. I think that this can be done by adding a module (I think) and add to the database. How do I do this and stay out of your way so as not to get overwritten in updates? Thanks! Quote Link to comment Share on other sites More sharing options...
homer09001 Posted June 2, 2009 Report Share Posted June 2, 2009 you could duplicate the current flight listing module I suppose and the restrict it as you wish then your not effecting any standard modules? Quote Link to comment Share on other sites More sharing options...
homer09001 Posted June 2, 2009 Report Share Posted June 2, 2009 this has acctualy given me a great idea for a module that: 1. Lists flights for a pilot that depart only from the airport they are currently positioned provided there is an aircraft there 2. Allows the pilot to Deadhead on any flight departing from that station. Quote Link to comment Share on other sites More sharing options...
selwynorren Posted June 2, 2009 Report Share Posted June 2, 2009 This is really exciting, Let me know if I can help out with anything, I am still pretty new at this, but am really willing to learn and help Cheers Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted June 2, 2009 Administrators Report Share Posted June 2, 2009 What kind of restriction? You can actually do it in the template (schedule_results.tpl) The example is there, which skips the day if it's not the current day. You can easily add code there to check any other conditions (for instance the last airport). So you can do it in the template, that way it's totally portable. I try to leave controllers to retrieve data, then dictate the template to display it. Then any (simple) display logic can go in the template. Quote Link to comment Share on other sites More sharing options...
homer09001 Posted June 2, 2009 Report Share Posted June 2, 2009 Thinking ahead Nabeel thanks, ill take a look later. Quote Link to comment Share on other sites More sharing options...
Lotus Posted June 4, 2009 Author Report Share Posted June 4, 2009 What kind of restriction? You can actually do it in the template (schedule_results.tpl) The example is there, which skips the day if it's not the current day. You can easily add code there to check any other conditions (for instance the last airport). So you can do it in the template, that way it's totally portable. I try to leave controllers to retrieve data, then dictate the template to display it. Then any (simple) display logic can go in the template. I was thinking of restricting specific airports to specific pilot levels. So for example, the newbies can fly the larger, easier airports (Kathmandu, Nepal Gunj), but not the small and very challenging ones (Lukla, Paro) so it would need to take AC/Aerodrome/and pilot level into account. So I was expecting to have to add a difficulty rating to each airport, (suppose I could modify the ICAO method) and enter that as field, I figured that AC and pilot level are there already. Can I still do it with schedule_results.tpl? (That would be great because I was expecting to have to do the whole thing.) Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted June 4, 2009 Administrators Report Share Posted June 4, 2009 You could but it wouldn't be very clean. Probably a module would be good for it, with a call to the module function within the template. You can add a column to the db, though then you would need to edit it which is an admin panel mod 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.