I think this topic has been brought up before, but I have searched the forums up and down and couldn’t
find it anywhere…
Is there a way to tie the downloads to rank, so the pilot can’t download a certain plane until he reaches a certain rank. Even though the dowloads are there, they can’t access them
until they reach the rank that the download is attached to.
if(Auth::$userinfo->ranklevel > your required rank level)
{
//give em the download
}
This would be based on the numerical value of your ranking system.
That would work if ALL downloads are reachable after a certain rank is achieved. I suppose what he actually meant was to restric the download of certain items depending on the rank level which sounds logical to me. For example, if your fleet has Turboprops and Jets, the Jets packages/liveries wouldn’t be available for download until the user achieved the rank appropriate for flying the jets.
Another issue (???) is that once the download link is known, a “privileged” (in terms of rank achieved) user can pass the download link (or post it) to a lower “pilot”. Anyways, that isn’t important.
I want to control what downloads they can get at certain ranks. so pilots don’t sign up for the VA and download all the stuff and then jump ship
i’m not sure how it works in the FS world, but we all run xplane and it happens pretty often, pilots just see what they can get and then leave
we maintain our own fleet and design our own scenery, so we only want to make that available to pilots who are commited to the VA and actually have to “fly” to rank up and get more stuff
// This is that foreach line from above:
foreach($allcategories as $category) {
// If this is the category turboprops, and their rank level is less than 2, then don't show this
if ($category->name == 'Turboprops' && Auth::$userinfo->ranklevel < 2) {
continue;
}
...
}
// This is that foreach line from above:
foreach($allcategories as $category) {
// If this is the category turboprops, and their rank level is less than 2, then don’t show this
if ($category->name == ‘Turboprops’ && Auth::$userinfo->ranklevel < 2) {
continue;
}
…
}
Possible and quite valid but in some airlines (like mine-to-be) you don’t want them to download the Dash 8-Q400 until they have enough rank and many hours of flight (per rank), otherwise they are stuck with a smaller Turboprop like the delicious Twin Otter.
I think what the other VA guy wants can be done with adding a new column to the Downloads table “minrank” and then if it is 0 it has no restriction, otherwise the rank level has to be at least that.
Anyway, that is how I would do it but the software isn’t mine. He can do the change in the database but in an upgrade it would be gone or probably cause problems.
Possible and quite valid but in some airlines (like mine-to-be) you don’t want them to download the Dash 8-Q400 until they have enough rank and many hours of flight (per rank), otherwise they are stuck with a smaller Turboprop like the delicious Twin Otter.
I think what the other VA guy wants can be done with adding a new column to the Downloads table “minrank” and then if it is 0 it has no restriction, otherwise the rank level has to be at least that.
Anyway, that is how I would do it but the software isn’t mine. He can do the change in the database but in an upgrade it would be gone or probably cause problems.
It’s open source, you can change it to work exactly how you’d like it to work.
i almost got this thing working…is the “rank level” based on hrs that the pilot has, or is that the ranks that i have, i.e., i have 8 ranks, so the rank level would be 1 - 8?
in addition to controlling the categories, i just used the same code and changed it for the downloads, now i can control the individual downloads based in rank also
thanks so much for the help guys
nick
<?php
if(!$allcategories)
{
echo 'There are no downloads available!';
return;
}
foreach($allcategories as $category) {
// If this is the category scenery, and their rank level is less than 2, then don’t show this
if ($category->name == ‘Scenery’ && Auth::$userinfo->ranklevel < 2) {
continue;
}
// If this is the category add-ons, and their rank level is less than 2, then don’t show this
if ($category->name == ‘Add-Ons’ && Auth::$userinfo->ranklevel < 2) {
continue;
}
?>
<?php echo $category->name?>
<?php
# This loops through every download available in the category
$alldownloads = DownloadData::GetDownloads($category->id);
if(!$alldownloads)
{
echo 'There are no downloads under this category';
$alldownloads = array();
}
foreach($alldownloads as $download)
{
// If this is the download a319, and their rank level is less than 2, then don't show this
if ($download->name == 'A319' && Auth::$userinfo->ranklevel < 4) {
continue;
}
?>