Jump to content

web541

Members
  • Posts

    700
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by web541

  1. Disregard. This module is kinda getting old though, so probably won't work with newer versions of phpVMS.
  2. Try calling it like this (might not work for your version) <?php $allnews = new PopUpNews(); $allnews->PopUpNewsList(5); ?> Instead of this <?php PopUpNews::PopUpNewsList(5); ?> Which should eliminate (or at least hide) the $this error and also calls the function statically, this works for me on PHP 5.6.8 If you want my final version but not much has changed, just the way it's accessed.
  3. I edited this into a module if you are interested. https://github.com/web541/phpvms-BadgeView Should do pretty much the same thing, but includes the phpVMS core layout so you can skin it up and add/remove stuff more easily.
  4. I just whipped this up quickly so it might or might not work (bit hacky) Make a php file called imgcount.php <?php $directory = 'lib/signatures/background/'; $ext = '.png'; $files = glob($directory.'*'.$ext); if($files !== false) { $filecount = count($files); } else { $filecount = 0; } $num = 1; while($num <= $filecount && $num > 0) { echo '<img src="'.$directory.$num.$ext.'" alt="'.$num.'" />'; $num++; } ?> Being a bit 'hacky' so to speak, you need to have a few things in place for it to work Permissions set correctly on the images and the folder itself to allow the script to read it The filename of the images must be set to a number in order (as in 1.png, 2.png, etc.) The script must be placed in the root directory of the installation The script can be accessed by going to http://url.com/imgcount.php Of course, you can modify this all you like as there are many ways to re-code this, and even make it into a module (and utilize some of the API functions if you can find some) and change directories and file extensions, etc. but this was just a quick sketch.
  5. Try changing this line $fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); To this line $fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'Vatsim ID'); Might be case-sensitive (can't remember though)
  6. Confirm you mean when selecting the dep time? If so, go into your schedule_briefing.php file and find this foreach ($r as $hour) { and replace it with this foreach ($r as $hour) { if(strlen($hour) < 2) { $hour = str_pad($hour, 2, "0", STR_PAD_LEFT); }
  7. In core_navigation.php Remove this line <?php echo $MODULE_NAV_INC;?> You could also remove the navbar function out of the pages module but that's up to you and not necessary. That should fix it.
  8. Check your browser console. I suspect it may be a jQuery conflict issue. I could be wrong though. Never owned this so doing it blindly.
  9. I disagree, if you really wanted to merge the two (as in have the crew center only for the dispatch page and have lance for everything else), then all you would have to do is make the layout.php file for lance and then make the profile_main.php the crew center (meaning the code that is already there + the code already in the crew center's layout.php) and possibly call it via action.php. This would then apply to all of your other templates that you would want to port over. Not an easy job, but I guess this situation is aimed at those who really want to do it.
  10. Or strtolower() if he really wants it to think it's in lowercase
  11. Try this <select name="aircraft"> <?php foreach($aircraft as $ac) { if($ac->id == $route->aircraft) { $sel1 = "selected"; } else { $sel1 = ""; } if($ac->enabled == '0') { continue; } echo '<option value="'.$ac->id.'" '.$sel1.'>'.$ac->name.' - '.$ac->registration.'</option>'; } ?> </select>
  12. np In regards to the fuel calculator, that is not needed to operate this module due to the "wacky" code going one, but if you want something more decent, then you could merge the two. If thats what TFDI said, then you should be fine, as said before, can't remember the change (if any) I had to make.
  13. I believe you're trying to say that the pop-up window (modal) doesn't stay open, is this correct? If so, go into core/templates/Fltbook/search_results.php page and find this at the top <script type="text/javascript" src="<?php echo SITE_URL;?>/lib/js/bootstrap.js"></script> And replace it with this (if you already have bootstrap referenced in your master template) <script type="text/javascript> // Clear Modal On Hide // =================== // no cache data loaded to modal popup (by default it's cached) $('body').on('hidden.bs.modal', '.modal', function (event) { $(this).removeData('bs.modal'); }); $(document).on("hidden.bs.modal", function (e) { $(e.target).removeData("bs.modal").find(".modal-content").empty(); }); </script> If that doesn't work, try removing one of the $(document) or $('body') sections and see if it works. And that should work (clears the bootstrap modal cache on exit which isn't done automatically). And to get it to work with smartCARS, there is a specific line in their code which you have to add (can't remember off the top of my head) but it was something to do with the bidding of the flights and setting the aircraft to the aircraftid in a foreach or something, might be better to ask the developer of smartCARS. Beware that some of the code is a bit messy to work with phpVMS (can be re-written, but don't have time atm) but it does work if done the right way.
  14. core/modules/Registration/Registration.php find this $this->render('registration_mainform.tpl'); replace it with this if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { $this->render('registration_mainform.tpl'); } else { echo 'Not Authorised!'; } I see now, they are not logged in, ha. (get forgetful once every while)
  15. Make sure all file has been uploaded again. I checked out your site again and there are no more errors, but that could be wrong considering there may not be anyone flying.
  16. It should be in public_html but could also be in core/. If it's not there, then you may not have a PHP error. Did you only upload action.php and nothing else? Make sure the permissions on that file are set.
  17. Now you're getting a Failed to load resource: the server responded with a status of 500 (Internal Server Error) Which I can't fix by telling you what to do as there could be many different things going wrong. Try first looking in your error_log file
  18. You've got a few errors in your browser console Failed to load resource: the server responded with a status of 404 (Not Found) http://www.omanair-va.org//action.php/acars/data?_=1478028089242 GET http://www.omanair-va.org//action.php/acars/data?_=1478028099246 404 (Not Found) There is a double slash there, so in your core/local.config.php just check that your SITE_URL is like this http://www.omanair-va.org without the / at the end Also, I can't seem to pick up action.php on your site, so make sure you have uploaded all the files or maybe re-upload them.
  19. Ah yes, you are probably using the version from here http://downloads.phpvms.net/ and as such, the main repo on github should work for you as the OP has discussed. The version in the php_templates folder is for the phpvms 5.5.x version which I believe you don't have. Right after clarifying that now, try this once more http://forum.phpvms.net/topic/23979-free-crewcenter-modern-and-responsive-pilot-center/page__st__40#entry126550 And then in your core_htmlhead.tpl file, change <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> To <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> And see if that did anything
  20. phpVMS 5.5.x is this one https://github.com/DavidJClark/phpvms_5.5.x which if you are using the .php files, you are running this version. If you are not on this version and don't want to update, then use this one without the php_templates https://github.com/swan58/CrewCenter And while you are in your files, can you post your core_htmlhead.tpl/.php file.
  21. Are you using phpvms 5.5.x? Can you try re-uploading the enter skin folder? The tabs are working for me as I've had to re-arrange some of the files, but all the additions I've made have worked and have been pulled onto the main github. Can you check your browser console for any errors and post them here.
  22. 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
  23. 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.
  24. 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); }
×
×
  • Create New...