Jump to content

web541

Members
  • Posts

    700
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by web541

  1. Interesting, I got the one from ProAvia (which is the one I think you were talking about) and the date lines only showed the date('m'), etc. and not the lines above. Anyway, glad you got it sorted!
  2. http://forum.phpvms.net/topic/22819-pilots-stats/#entry120882
  3. Try this version https://github.com/web541/Tcal It's just going into the data class and changing public function to public static function EDIT: Now that I look at your post now, not sure where you got the supplied date line from.
  4. I've seen this before when you use multiple lines when posting news, etc. So fi you say: Grand Opening Tuesday... It will go into the database like Grand Opening r/n/r/n/Tuesday... I fixed the issue by replacing the textareas with WYSIWYG editors, have you used these while posting? In the template file, it will look like this (ish) <textarea name="content" id="editor" style="width: 90%; height:350px;"></textarea> If it does, then I'm unsure
  5. Go into core/templates and find any templates which start with email_xxx.php and then edit those ones. Copy them to your skin folder before editing as well.
  6. EDIT: I have uploaded the complete module now onto github https://github.com/w...AirchartsModule Make sure you are familiar with the aircharts license agreement then follow the instructions to install
  7. lol, managed to give you the line numbers from the version above without thinking. Try admin/modules/PIREPAdmin/PIREPAdmin.php And add it On line 151 after the } On line 318 after the StatsData::UpdateTotalHours(); # Add correct pay for the pilot OperationsData::pilot_pay(Auth::$userinfo->pilotid); Be mindful though (as stated above by servetas) that you will have to include reference in the code to add the data to the Ledger table in your database.
  8. Try admin/modules/PIREPAdmin/PIREPAdmin.php And add it On line 39 after the } On line 301 after the # Update Pilot Stats # Add correct pay for the pilot OperationsData::pilot_pay(Auth::$userinfo->pilotid); And make sure you add the code above from parkho into your core/common/OperationsData.class.php
  9. core/common/StatsData.class.php try and replace line 171 with this $key_month = date('i', $start); If that doesn't work try this $key_month = date('MY', strtotime($start)); If that doesn't work, on the line before it can you add this print_r($start); Or var_dump($start); And post the output. NOTE: The above is a "NOTICE" so it shouldn't matter and still work so you can ignore that part, but the "Invalid Permissons" intrigues me, but it sounds like the AUTH might not be transferring if you're getting invalid permissions. Was the script working before?
  10. For the platform, in your acarsmap.php file, you can add this <%=flight.online%> But to show the sim is paused, your ACARS client must be configured to do so. If you're using smartCARS, I don't think they've enabled this option. Any other ACARS might be able to do it, but you'd have to check with the developer.
  11. Yep, I can confirm that this works perfectly as well! Go ahead and make that pull request. In the original post though, when you said there should be "two items" go me confused for a second (but did get there after processing it a few times ), so you might want to mention that it should be in the add and edit (save) functions.
  12. If you want to keep your previous skin, then just do this http://forum.phpvms.net/topic/23979-free-crewcenter-modern-and-responsive-pilot-center/page__st__20#entry126231 and it may fix it. If not, you may have to go digging between files.
  13. Can you try these and see if any work? http://forum.phpvms.net/topic/21887-recent-update-to-phpvms-55x/ http://forum.phpvms.net/topic/23486-solved-pirep-and-signature-rank-error/#entry123889
  14. For those who are having issues with "no route passed", I believe I've fixed that issue. Would someone care to test this out on their server https://github.com/web541/CrewCenter If it works, then I'll submit a pull-request with Mark Swan and get this onto his original repo. Changes I've Made ------------------------- Styling Changes here and there Added Pilot's roster, schedule details, schedule briefing pages (for those who want them) Removed all references to requiring the app_top and bottom on each page (little code hack, might work for you, might not) and defined it globally in the layout.php file Fixed the "no route passed" jQuery issue (I think) Fixed the "not able to delete bids" (I think [might not have been an issue before]) Fixed the redirection on the frontpage only redirecting to /... (in case you had extra folders before the index) Fixed default registration page to work with phpvms 5.5.x So far I've tested it on two different servers and they both worked. I had an issue with the recaptcha at some points, but I believe that was because I have turned off a few settings with my host. All other components (filing pirep, schedule search form/results, bids, downloads, etc.) have remained untouched with the exception of a few styling changes. NOTE: This is for the phpVMS 5.5.x version of phpVMS, if you are using the .tpl version, please see the OP for the link to download that. NOTE: If you are testing this, please BACKUP ALL FILES beforehand in case you need to restore, I won't take any responsibility for you losing your files.
  15. web541

    skyBlue v1

    If you want to change to phpVMS 5.5.x, the link is here https://github.com/DavidJClark/phpvms_5.5.x There is no real "easy" way of porting over as you have to change not only the file extensions in your skin, but quite a chunk of the code form the .tpl version has changed in the .php version. You could also just merge your pilots, pireps, aircraft and airlines table into the .php database, but then you've have to (as stated above) change most of your files around and it could become a pain. If you've just started, the easiest thing to do would be to set it up again.
  16. It's a customfield so it should automatically show up in the profile/edit section of your website. Go to http://yourvaurl.com/index.php/profile/edit And it should already be there.
  17. Where exactly (what file?) do you want to put this in, and what is the exact name of your customfield? The wrong variable might be declared. Try this one <?php echo PilotData::GetFieldValue($userinfo->pilotid, 'VATSIM ID'); ?>
  18. Easiest solution, upgrade to this https://github.com/D...rk/phpvms_5.5.x Otherwise 1. Re-add these files to the location https://github.com/D...e/lib/recaptcha specifically this file https://github.com/D...ecaptchalib.php but try the rest as well add them to core/lib/recaptcha 2. https://www.google.c...ntro/index.html get your API Keys 3. Add this code to your local.config.php (Make sure it's not already in there otherwise it will cause issues) /* Keys for recaptcha, you can change these if you want to your own but it's a global key so it should just work */ Config::Set('RECAPTCHA_PUBLIC_KEY', 'YOUR PUBLIC API KEY'); Config::Set('RECAPTCHA_PRIVATE_KEY', 'YOUR PRIVATE API KEY'); 4. Go into your registration_mainform.tpl file and find this <?php //Put this in a seperate template. Shows the Custom Fields for registration Template::Show('registration_customfields.tpl'); ?> <dt>reCaptcha</dt> <dd> <?php echo recaptcha_get_html(Config::Get('RECAPTCHA_PUBLIC_KEY'), $captcha_error); ?> </dd> And replace it with this <?php //Put this in a seperate template. Shows the Custom Fields for registration Template::Show('registration_customfields.tpl'); ?> <dt>reCaptcha</dt> <dd> <?php if(isset($captcha_error)){echo '<p class="error">'.$captcha_error.'</p>';} ?> <div class="g-recaptcha" data-sitekey="<?php echo $sitekey;?>"></div> <script type="text/javascript" src="[url="https://www.google.com/recaptcha/api.js?hl=<?php"]https://www.google.c...api.js?hl=<?php[/url] echo $lang;?>"> </script> </dd> 5. Then in core/modules/Registration/Registration.php find this function protected function VerifyData() And in there you will find this $resp = recaptcha_check_answer (Config::Get('RECAPTCHA_PRIVATE_KEY'), $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if(!$resp->is_valid) { $error = true; $this->set('captcha_error', $resp->error); } else $this->set('captcha_error', ''); replace it with this //Google reCaptcha //updated to Google noCaptcha 1/15 $resp = null; $reCaptcha = new ReCaptcha(RECAPTCHA_PRIVATE_KEY); // Was there a reCAPTCHA response? if ($_POST["g-recaptcha-response"]) { $resp = $reCaptcha->verifyResponse( $_SERVER["REMOTE_ADDR"], $_POST["g-recaptcha-response"] ); } //check if reCaptcha response was valid if ($resp == null) { $error = true; $this->set('captcha_error', 'reCaptcha Validation Error'); } And that should work. Remember that anything (within reason) is doable, but sometimes you have to look hard to find the answers.
  19. I've tested it and this one works. There were a few other bugs I had to iron out as well, but they should be fixed in this one as well. FlightBookingSystem.V1.1-modifiedTPL.zip
  20. Usually when this happens, it is because of a jQuery version mis-match. All of your jQuery references should be in your core_htmlhead.php and not anywhere else (e.g. layout.php) So in your layout.php remove these <!-- jQuery 2.2.3 --> <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/jQuery/jquery-2.2.3.min.js"></script> <!-- jQuery UI 1.11.4 --> <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script> And see if it works. If it doesn't, try messing around with the other js (adding/removing) files until you get the addbid working. If that still doesn't work, you could re-write the bidding code to support an updated jQuery library or just add an AJAX request.
  21. admin/template/pilots_details.php <tr> <td>Total flights</td> <td><input type="text" name="totalflights" value="<?php echo $pilotinfo->totalflights;?>" /></td> </tr> <tr> <td>Total hours</td> <td><?php echo $pilotinfo->totalhours;?> <input type="hidden" name="totalhours" value="<?php echo $pilotinfo->totalhours;?>" /> </td> </tr> <tr> <td>Transfer hours</td> <td><input type="text" name="transferhours" value="<?php echo $pilotinfo->transferhours;?>" /></td> </tr> <tr> <td>Transfer Flights</td> <td><input type="text" name="transferflights" value="<?php echo $pilotinfo->transferflights;?>" /></td> </tr> pilot_public_profile.php <th width="25%">Total Flights</font></b></th> <td width="25%"><?php echo $userinfo->totalflights + $userinfo->transferflights; ?></td> admin/modules/PilotAdmin/PilotAdmin.php Line 146 add this 'transferflights' => $this->post->transferflights, That should make it work. ------------------------------------------- I think it would be easier to make a custom field and then echo it out like this though <th width="25%">Total Flights</font></b></th> <td width="25%"><?php echo $userinfo->totalflights + PilotData::GetFieldValue($userinfo->pilotid, 'transferflights'); ?></td> But it's up to you
  22. Not sure what you mean exactly, you mean it's resetting the flights every time someone files a PIREP? Or is this something you want to manually add for your VA? This is the answer to above <th width="25%">Transfer Flights</font></b></th> <td width="25%"><?php echo $userinfo->transferflights; ?></td> And that should work provided that you have set everything up right. Make sure that the transferflights column is in the _pilots table
  23. Ok, made a small mistake here, Go to admin/modules/FBSV/FBSV.php and find this line $allpilots = PilotData::getAllPilots(); After it add this $this->set('allpilots', $allpilots); Agreed, and in addition to this you would have to work other modules around this one (e.g. randomflights) and integrate the "currentlocation" into it.
  24. I've updated the post above for the TPL version.
×
×
  • Create New...