Jump to content

Recommended Posts

Posted

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

  • Moderators
Posted

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

Posted

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

  • Moderators
Posted

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.

Posted

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

Posted

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

  • 1 month later...
  • Moderators
Posted

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.

Posted

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

  • Moderators
Posted

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

  • 2 weeks later...
Posted

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
		        }
                     ?>

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