Jump to content

Adding to


Lotus

Recommended Posts

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!

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...