Hello people, so I want to make a custom MainController::Run like this example here:
\<?php MainController::Run('PIREPS' 'RecentFrontPage', 5); ?\>
so that will go and insert the 5 newest flights, but I want to make a custom one, How could I do that?
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); ?\>
1 Like
I got code working, but not correctly. It is just showing 5 in sequence by flight number. And I think I know why, when you add a schedule there is no date associated with the entry in the db But there is in the PIREPS table. I will work on it and try to get it to work. When I do I will upload the code to my github account.
1 Like
Okay, Thank you, I will try now!
I haven’t finished it yet.
1 Like
Oh, Yeah, I just said that I will try what said
Thank you, I got it working and is looking very cool now
Picture