Jump to content

web541

Members
  • Posts

    700
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by web541

  1. Remove these two lines <!-- 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> Or try this one https://raw.githubusercontent.com/swan58/CrewCenter/master/php_templates/layout.php
  2. Yep as shrikar said, "no route passed" is a jquery issue. Have you modified any of the files at all? Can you please post your layout.php file.
  3. As I said before, I'm unsure now. But I do know that it is probably the <br> tag that is causing the issue. Try this in your output template <?php $buffer = str_replace('\r\n', '<br>', $buffer); echo $buffer; ?> Or you could use the trim() function <?php $buffer = trim($buffer); echo $buffer; ?> And see if that works. As for the Chicago\'s, the data is probably using the DB::escape method so yeah, it'd be stripping slashes /** * Format a mySQL string correctly for safe mySQL insert * (no matter if magic quotes are on or not) * * @param string $str String to escape * @return string Returns the escaped string * */ public function escape($str) { return mysql_real_escape_string(stripslashes($str), $this->dbh); }
  4. 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!
  5. http://forum.phpvms.net/topic/22819-pilots-stats/#entry120882
  6. 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.
  7. 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
  8. 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.
  9. 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
  10. 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.
  11. 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
  12. 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?
  13. 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.
  14. 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.
  15. 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.
  16. 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
  17. 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.
  18. 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.
  19. Are you able to post your full code (module if needed), where is the $name->icao variable coming from? $query = "SELECT * FROM phpvms_schedules WHERE depicao='$name->icao'";
  20. 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.
  21. 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'); ?>
  22. 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.
  23. 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
  24. 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.
×
×
  • Create New...