Wingthor Posted February 2, 2011 Report Share Posted February 2, 2011 Hi all, I currently have som spare time, and wants to refresh my PHP knowledge. I also want to have a nice frontpage showing new awards. So I need a lot of them. The deadline for the project is currently open. First question is that if this is build before? Second is I could need som input creating awards. I have pasted in the result of my brainstoring below, but need som input from the public. The system is a kind of inspired by FSX own award system. Hopefully it can contribute to an internal and friendly competition among your pilots. The awards must be based on objective data from an acars system. So the data must be there, and the data must be able to be extraced with sql, eg x number of landings. Every contribution is appreciated, I will judge if I can get out the data. You can also comment on what I have come up with so far. Espesially I need help on the naming of the awards. You will understand when reading the output on my braingstorming. Typeof awards: Landings x number of landings [several intervals] x landing on a particullary [difficult] airfield [several intervals] x landing rate below ... best landing of a month/year worst landing of the month and landing rate greater than xx (drunken pilot) x number of landings with rate lower than y in a row Time x hours flown schedueld flights ontime block to block with respect to bid.... deviance less than x time Spent to much time on the toilet with xx/xy (member 10000m club) worst scheduele miss for a given time (month). x hours flown x hrs online flying Aircraft type Most hours flown month/year longest distance month/year Most landings month/year lowest fbh a month/year max speed and landed a month Distance Most nm a month/year x nm distance flown, several numbers....like promoting most dist/hours a month/year Passenger flown x numbers Cargo flown x numbers [several intervals] Thanks in advance... Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted February 2, 2011 Moderators Report Share Posted February 2, 2011 That would be a good edition as this is all manually done at the moment apart from the ranks which are tied in to specified hours in the admin section. You would have to create a module for the admin side with the logic and definable parameters. Would be nice to see Quote Link to comment Share on other sites More sharing options...
Wingthor Posted February 2, 2011 Author Report Share Posted February 2, 2011 That would be a good edition as this is all manually done at the moment apart from the ranks which are tied in to specified hours in the admin section. You would have to create a module for the admin side with the logic and definable parameters. Would be nice to see It will be an adminstration addon, where you can activate predefined awards. Thats why I need as many predefined awards as possible. In case you want give awards for number of landings, you just define how many landings the pilot needs before he is awarded, then activate the award. Then it will activate event driven scripts which parses the awards into phpvms's ordinary award system. Think that should work. Regards Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted February 2, 2011 Moderators Report Share Posted February 2, 2011 Yeh that sounds good, i would be willing to share my limited knowledge of php to get this thing off the ground. Maybe instead of predefined awards how about admin defined awards so each va's admin could create on the fly but like you said it would need the logic coding beforehand so that wouldn't quite work in all circumstanced but for amount of landings, pax, miles etc should be fine. Quote Link to comment Share on other sites More sharing options...
Wingthor Posted February 2, 2011 Author Report Share Posted February 2, 2011 Yeah, Im considiring building a kind of SQL generator. But Im not sure if it that can be done, since I am planning to extract info from the RAW PIREPS data. There is a lot more info in these than it is is fields in the pireps table, so builing a flexible easy to use SQL generator might be difficult. Regards Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted February 4, 2011 Report Share Posted February 4, 2011 Auto awards would be sweet while having the option to make some of them manual given only. Like the ranks Nabeel has coded. Manual or auto. Quote Link to comment Share on other sites More sharing options...
Wingthor Posted February 4, 2011 Author Report Share Posted February 4, 2011 Think I will just make a module which parses to the exisitng awards table. But also make an verify option, so you actually have to confirm the award before actually given. So that the module will be more like a "awards recomendation" thing. It's kind of an irreversible ting, you don't withdraw an award likely. OT: (Like your logo though, FLST here...) Quote Link to comment Share on other sites More sharing options...
Angel Air Posted March 25, 2011 Report Share Posted March 25, 2011 I am watching this topic looks great if it can be coded. Quote Link to comment Share on other sites More sharing options...
Jeff Posted March 26, 2011 Report Share Posted March 26, 2011 I am watching this topic looks great if it can be coded. Me too. This would be great. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 I'm sure it's possible so we have to create the modules and create the parameters so it can be awarded. But it,s not like approving PIREPS with the pay awarded. We would have to create a cron job to run a award giver something like that. Quote Link to comment Share on other sites More sharing options...
Wingthor Posted March 26, 2011 Author Report Share Posted March 26, 2011 I'm sure it's possible so we have to create the modules and create the parameters so it can be awarded. But it,s not like approving PIREPS with the pay awarded. We would have to create a cron job to run a award giver something like that. I know there is a trigger function built in with Mysql, I think will have a look at that. http://dev.mysql.com/doc/refman/5.0/en/triggers.html Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 Well currently i was looking at the possibility of creating a script that looked at the hours and added awards accordingly, this was based on a cron job nightly. Quote Link to comment Share on other sites More sharing options...
Wingthor Posted March 26, 2011 Author Report Share Posted March 26, 2011 Well currently i was looking at the possibility of creating a script that looked at the hours and added awards accordingly, this was based on a cron job nightly. A cron task will do the job, for those who has linux based server. Not sure about those with a windows based server... Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 A cron task will do the job, for those who has linux based server. Not sure about those with a windows based server... With a windows server you can add a task so the result will be the same Quote Link to comment Share on other sites More sharing options...
Guest Posted April 8, 2011 Report Share Posted April 8, 2011 I did it with some if statements from pilot_profile.tpl and the public_profile.tpl Dont actually have to assign the awards from admin. The if statements check to see if the pilot meets requirment then list award pic or whatever. That's how I do my auto awards. <?php $flt = $userinfo->totalflights; if($flt < 10) { echo 'No medals yet'; } if($flt >= 200) { ?> <img src="<?php echo $allawards[38]->image?>" /> <?php } if($flt >= 100) { ?> <img src="<?php echo $allawards[39]->image?>" /> <?php } if($flt >= 10) { ?> <img src="<?php echo $allawards[40]->image?>" /> <?php } ?> Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted April 8, 2011 Moderators Report Share Posted April 8, 2011 Ok so looking at this you could adapt this for every awards you just need to create a module to search the sql 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.