Jump to content

Recommended Posts

Posted

Hi All,

Am I the only one or do other CEOs get the same problem. Do you find that some people join your VA for the sake of downloading what they can and have no intention of flying?

Is there a way to restrict download section access to pilots unless they have completed a set number of hours say...10hrs. Then this can be lifted so they can gain access to scenery, aircraft ect. Just an idea would be set the initial account to student (without download access) Once 10 hours have been flown, the account is progressed to download section access.

Posted

Hi All,

Am I the only one or do other CEOs get the same problem. Do you find that some people join your VA for the sake of downloading what they can and have no intention of flying?

Is there a way to restrict download section access to pilots unless they have completed a set number of hours say...10hrs. Then this can be lifted so they can gain access to scenery, aircraft ect. Just an idea would be set the initial account to student (without download access) Once 10 hours have been flown, the account is progressed to download section access.

I got this code from Lorathon a while back:

<?php
if(AUTH::$userinfo->totalhours > 10)
{
   // show-do your stuff here
}
else
{
   echo "You do not have enough hours to view this page";} ?>

So maybe add the code in your downloads.tpl file?

Posted

In core/modules/Downloads/Downloads.php:

public function index()
{
	if(!Auth::LoggedIn())
	{
		echo 'You must be logged in to access this page!';
		return;
	}
	if(Auth::$userinfo->totalhours < 10){
		echo 'You are not permitted access to downloads yet.';
		return;
	}

	$this->set('allcategories', DownloadData::GetAllCategories());
	$this->render('downloads_list.tpl');
}

Slightly smaller and easier to manage than the above :)

Guest lorathon
Posted

Be advised that doing it Tom's way will be overwritten during any phpVMS update. Doing it the way I gave to James (inside of the template) will not be overwritten.

Posted

HI,

I found that you can link an aircraft to a rank and there fore stop folk downloading an aircraft till they have reached a rank level.

In the admin centre page, Airline operations, add & edit Fleet, at the bottom you can set it up so that you need aminimum rank to fly thus the pilot has to fly hours to get a bigger and better aircraft.

just another way, without having to do do any coding.

hope this helps a little.

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