shaun105 Posted March 29, 2011 Report Share Posted March 29, 2011 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. Quote Link to comment Share on other sites More sharing options...
James142 Posted March 29, 2011 Report Share Posted March 29, 2011 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? Quote Link to comment Share on other sites More sharing options...
Tom Posted March 29, 2011 Report Share Posted March 29, 2011 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 Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted March 29, 2011 Report Share Posted March 29, 2011 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. Quote Link to comment Share on other sites More sharing options...
shaun105 Posted March 29, 2011 Author Report Share Posted March 29, 2011 Cheers Guys much appreciated... with the existence of the code I take it others do have a problem with download file reapers? Thanks again Quote Link to comment Share on other sites More sharing options...
5SA CEO Posted March 30, 2011 Report Share Posted March 30, 2011 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. Quote Link to comment Share on other sites More sharing options...
shaun105 Posted March 30, 2011 Author Report Share Posted March 30, 2011 Cheer Dean I knew about that one. It was not just aircraft but all the other downloads. Cheers 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.