RogerB Posted July 24, 2012 Report Posted July 24, 2012 Mark, a while back you made a post about flight report delay with kacars. You removed the listener for top pilots and made it a cron. Can you share how you did that? Quote
Moderators joeri Posted July 24, 2012 Moderators Report Posted July 24, 2012 http://forum.phpvms.net/topic/6776-filing-pireps-delays-solved/#entry50916 isn't this what you are looking for Quote
RogerB Posted July 25, 2012 Author Report Posted July 25, 2012 That code isn't doing the trick, since I removed the listener and cronned that code it's still not working. I'm getting a sytax error and top pilot isn't updating now. Quote
Guest lorathon Posted July 25, 2012 Report Posted July 25, 2012 Roger, Sorry but I do not use the module. I am sure that Mark should be able to help you out. Quote
Moderators mark1million Posted July 26, 2012 Moderators Report Posted July 26, 2012 HI Roger yes it wasn't specific to kACARS it was when any pirep was filed. I tracked it down to the top pilot module, I think David was going to release a fix for it not sure if he updated or not yet. Basically this is what i did, removed the listener >Core>Modules>TopPilot like this at the top section, <?php //by:simpilot //www.simpilotgroup.com class TopPilot extends CodonModule { public $title = 'Top Pilots'; //public function __construct() { // CodonEvent::addListener('TopPilot', array('pirep_filed')); //} public function EventListener($eventinfo) { if($eventinfo[0] == 'pirep_filed') { self::refresh_pilot_stats(); } } Then i put that function in to a php file in the admin directory, <?php define('ADMIN_PANEL', true); include dirname(dirname(__FILE__)).'/core/codon.config.php'; Auth::$userinfo->pilotid = 0; /* error_reporting(E_ALL); ini_set('display_errors', 'on'); */ set_time_limit(0); ini_set('memory_limit', '-1'); TopPilot::refresh_pilot_stats(); echo 'Top Pilot Stats Updated'; ?> Then set up the cron the same way as its usually run for maintenance. php -f /srv/www/xxx/xxx/admin/YOUR_FILE_NAME.php Just change the YOUR_FILE_NAME.php to whatever you call the file you create and should be good to go. Quote
RogerB Posted July 26, 2012 Author Report Posted July 26, 2012 Getting a message no input file selected...I have never run a cron before so I'm totally lost. I'll do some reading up. Quote
Moderators mark1million Posted July 26, 2012 Moderators Report Posted July 26, 2012 Ok so first thing call the page directly in your browser to see if it works, then you can add it as a cron or a timed script, there are other ways to get that to run without a cron if you dint have access. Quote
RogerB Posted July 26, 2012 Author Report Posted July 26, 2012 I got it, had the path wrong. works now. Thanks Mark!! Quote
Moderators mark1million Posted July 26, 2012 Moderators Report Posted July 26, 2012 Glad to help Roger. Quote
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.