Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. Are you either pilot id #1 in the database (the default exam admin) or has pilot #1 assigned you as an admin of the exam center?
  2. You can use the recent pireps function for the individual pilot and then echo out the 'dep' and 'arr' fields into the url for the map.
  3. I found a small glitch in the sql command - update your function to this -> public static function TopRoutes($airline_code='') { $key = 'top_routes'; if($airline_code != '') { $key .= '_'.$airline_code; } $top_routes = CodonCache::read($key); if($top_routes === false) { $sql = 'SELECT * FROM `'.TABLE_PREFIX.'schedules`'; if($airline_code != '') { $sql = $sql . " WHERE `code`='{$airline_code}'"; } $sql = $sql .' ORDER BY `timesflown` DESC LIMIT 10'; $top_routes = DB::get_results($sql); CodonCache::write($key, $top_routes, 'medium'); } return $top_routes; } Also, you will not be able to echo this command out as you are trying to do. You will need to use a foreach statement to break up the array, for example -> <?php $stats = StatsData::TopRoutes(''); foreach($stats as $stat) { echo $stat->code.$stat->flightnum.' - Times Flown '.$stat->timesflown.'<br />'; } ?> Remember to clear your cache after updating this code.
  4. Hi Chris, You can contact me at admin(at)simpilotgroup.com or I am on msn messenger most nights (2000 - 000 EST), user id capecodcontroller(at)gmail.com Dave
  5. simpilot

    Signature

    The text for the signature badge is located in the PilotData.class.php file starting at line 958. You will need to go through it form there to change things. Example, on line 976 is $output[] = 'Total Flights: ' . $pilot->totalflights; You can change the 'Total Flights: ' to your needs. Remeber that any changes will be overwritten in an update. You could also tie it to the language file and store your translations there so it would not get over-written in the future. Hope this helps
  6. Got to your admin section, all the links to accomplish these items are in the menu on the left. www.yoursite.com/admin
  7. You could create a custom profile field for the pilots where they could insert the callsign using the edit function in the pilot center, then include the custom field in front of the pilot number wherever it is displayed. The pilot number is tied to just about every function in the system (the database id) so changing that would have to be accomplished the same way, and used only as a display field. All records for the pilot, including the ability to log in and file pireps need to be tied to the database id of the pilot.
  8. You need to place the link for the exam center within the "Logged in" section of links in the core_navigation.tpl file. Use the Pilot Center link already in the file as an example.
  9. Add this to your local.config.php /* For PILOT_ORDER_BY use p.[column_name] [ASC/DESC] */ Config::Set('PILOT_ORDER_BY', 'p.ranklevel DESC');
  10. simpilot

    Slideshow

    There is not much info to go on, but if I were to take a shot in the dark, I would say it is your link paths. You are probably using relative paths for your js links. The template files are buried in the file tree and most times you need to use the absolute path to the script you are using within the framework.
  11. I will probably release this as a module on my site sometime in early 2011. The one catch on a script like this is that you must have root access to the server in order to set up a cron job. If you are on a shared plan you may not have this access and will have to have the host, if they want to, set it up for you. The cron job runs every 10 minutes in order to update the badges.
  12. Well... seeing as Nabeel offers hosting here in the forum to try and help with the expenses of running the site and supplying this great software at no charge, and that would be directing members to use someone else.... I wouldnt do it, but it is a free world.
  13. Try replacing that line with: echo $pilot->firstname.' '.$pilot->lastname; It just looks like a syntax error. Also I made a quick layout for a module to try to show the relationship of the three pieces (Model(data class), Controller(module files), View(templates)) here -> http://forum.phpvms.net/topic/4095-solved-with-many-thanks-coding-noob-need-help/page__view__findpost__p__27456 See what you think. I am also on msn most evenings (Eastern USA), feel free to add me.
  14. I believe body is a good variable throughout the module. You would replace the "echo $body" verbage with the new code in order to limit the characters output to the display.
  15. What template are you using, or is it one you have built? Also, what version phpvms are you on currently?
  16. If you want to pm me your ftp and database info I will take a look and try to get it installed for you. I can not get the site to do anything at this point.
  17. Yes, it is the order of your ranks and will change if you add or remove ranks to the system. lowest would be 1 and go up from there.
  18. There are a few functions available in the native stats class of phpVMS. StatsData.class.php::PilotAircraftFlownCounts($pilotid) will get you an array of the aircraft that the pilot has flown and how many times he has flown each one. StatsData.class.php::AircraftUsage() will return an array that shows how many times each aircraft in the fleet has been flown on a route To get other customized stats it would be much easier to build a data class within phpVMS, it would alread be connected to the database and would make things a lot easier on you.
  19. It will depend on what you are working on as to what to use for a variable. In the popupnews module if you are trying to limit the characters of the subject line the data is presented in the template using the $subject variable. If you wanted to limit the subject to just say 10 characters you could do something like this in the template. <?php echo substr($subject, 0 , 9).'...'; ?>
  20. There is something going on with the server you are on, even trying to check the whois of the domain comes up with an error. Have you contacted the host about the problems, will any other php application (forum, cms, etc) run on the server?
  21. The "no route passed" error is a template issue. And again, what errors did you fix? It may help for us to solve your new problem.
  22. I created a data call for vACA for individual pilot stats in my touchdownstatsData.php file like this -> public function get_pilot_landingstats($pilot, $howmany) { $query = "SELECT * FROM phpvms_pireps WHERE landingrate <'0' AND pilotid = '$pilot' ORDER BY landingrate DESC LIMIT $howmany;"; return DB::get_results($query); } Then in your module you can set the variable using something like -> $this->set('stats' = TouchdownstatsData::get_pilot_landingstats($pilotid, 5); You will just need to load the $pilotid ahead of it to call the pilot you are looking for, and the '5' is how many records you want returned in the array.
  23. Was the system able to send email using just the default php mail function prior to setting the SMTP to true?
  24. I have to agree with these comments. For a person that presents himself as a 20+ year developer of software, you offer very little help, only criticism of other people's work. I could understand your critical nature if this was a commercial software package, but it is open source, maybe you need to look up what that means. It is community based, no one here is paid for the work they contribute to the project. If you want to complain, that's fine, but be part of the solution, although it seems that you are not capable at this point of participating in a constructive aspect. It seems that being critical of everything is your nature in life, by your comments of requiring va pilots to pass numerous tests to join your va and then constant oversight of every little aspect is not going to win you many members. These are virtual airlines, they are for fun, not for people that need to feel important and micro manage others like yourself. I certainly hope your new va is perfect when it goes live, because it will certainly be scrutinized by the members here after your constant condemnation of phpVMS and the people here. PS: Sorry to hijack the thread Jeff.
  25. I guess my first question would to ask what errors needed to be fixed? Have you changed the core of the module? The module is built around one aircraft, one looping route. You can extend the code to acomplish what you are looking for but it is not built into the module as it stands.
×
×
  • Create New...