Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. There are a couple of ways to do this -> 1 - [bEST WAY] open PIREPData.class.php and find line 783 ".PIREP_PENDING.", and change to ".PIREP_ACCEPTED.", This will mark any filed PIREP as accepted. Just remember that it will get overwritten in updates and you will have to change it again. 2 - You could also mess with the settings in app.config.php namely this section define('PIREP_PENDING', 0); define('PIREP_ACCEPTED', 1); define('PIREP_REJECTED', 2); define('PIREP_INPROGRESS', 3); although I wouldnt recommend it, as a matter of fact, forget i said it....
  2. I can't believe that this was even questionable....
  3. Try <?php if(!Auth::LoggedIn()) { echo '<h4>Greased Landings</h4>'; MainController::Run('TouchdownStats', 'top_landings', '10'); } ?>
  4. If I remember correctly I did not include any code to limit the day of the week. I think the theory behind it was not to strand a pilot without a flight due to the day of the week. Is this something you would want in the future?
  5. if(!Auth::LoggedIn()) { Do stuff if your not logged in }
  6. I have gotten it working using the info from the phpVMS database for the VA, but I have yet to get the city names to display other than when you hover on them... http://www.westjetvirtual.net/index.php/ammap
  7. 1 - To only show menu items when a pilot is logged in you need to wrap them in -> if(Auth::LoggedIn()) { Items you want seen by only logged in members } 2 - Link to phpvms buttons thread - http://forum.phpvms.net/topic/23-promote-phpvms/ 3 - My cystal ball says you wanted a cheeseburger.
  8. simpilot

    kACARS - Feedback

    A small request: Would it be possible to include the version number in the pirep report? Maybe at the end just have a "VER:1.0.1.0" or something of the like. I am starting to run into pilot issues and am having a time tracking things back not being able to see what version they are reporting with. Us pilots are not always the smartest group.
  9. You have to create the tables in your database for the mod to work, they are not already there. The easiest way to do it is to open your database with phpmyadmin then import the sql file from the download and hit the go button. Phpmyadmin will build all the tables you need then from the file that is included with the download.
  10. You can limit the number of characters returned in a string using substr substr($data,0,100) would return the characters from position 0 to position 100 in the $data string. To echo a link to your news item you could add $this->set('id', $row->id); on the blank line 46 in news.php in root/core/modules/news then in your template echo it out something like echo '<a href="'.url(my_custom_news).'/'.$id.'">Click For Full Story</a> That would point to a module you have built "my_custom_news", you can name it whatever you want, that would collect the news id number and you can point it to a tpl that will show the entire news story. Or you could just use - Simpilot PopUpNews Module
  11. The stats module on WestJets is actually a very modified version of the the orignal VAStatsData module I put together about a year ago. I dont think it would be wise to post that code as it is connected to other custom classes and db tables within WestJets and would be a mess. What you could/should do is add another sql query to TouchdownStatsData.class.php to pull the unique month you want and then sort as you wish. Dont forget to add the year into the query as well, or you will have a mess when you get to looking at a month that has stats for multiple years.
  12. I am about half through intergrating this into my site. It is free as long as you do not want to remove the link to the creators. Works nicely with phpvms. http://www.ammap.com/examples/flight_routes
  13. My bad - it is actually line 45. I was looking at a customized version of the custom module of a ... .... errr...... you get the idea. Way too many files floating around on my box, time to start deleting some I think.
  14. My guess is that you are not using the standard phpvms_ table prefix in your db. If this is the case, you will have to change the sql commands on lines 52 & 58 in TopPilotData.class.php in root/core/common/ to reflect your db prefix, or you could insert the TABLE_PREFIX command, which I should have done in the first place...
  15. It probably needs to be wrapped in php tags <?php MainController::Run('FrontBids', 'RecentFrontPage', 5); ?>
  16. Open PilotAdmin.php in root/admin/modules/PilotAdmin Find Line 360 $edit = '<a href="'.adminurl('/pilotadmin/viewpilots?action=viewoptions&pilotid='.$row->pilotid).'">Edit</a>'; Add a blank line under it and add $last = PIREPData::getLastReports($row->pilotid, '1', ''); Find line 375 (will be 374 if you have not done above) $row->lastip, Add a blank line under it and add $last->arricao, Open pilots_list.tpl in root/admin/templates Find line 16 colNames: ['','First', 'Last', 'Email', 'Location', 'Status', 'Rank', 'Flights', 'Hours', 'IP', 'Edit'], and change it to colNames: ['','First', 'Last', 'Email', 'Location', 'Status', 'Rank', 'Flights', 'Hours', 'IP', 'Last Location', 'Edit'], Find line 27 {index: 'lastip', name : 'lastip', sortable : true, align: 'center', searchoptions:{sopt:['in']}}, Add a blank line below it and add {index: 'lastlocation', name : 'lastlocation', sortable : true, align: 'center', searchoptions:{sopt:['in']}}, Save everything and it should give you the last arr icao in the view all pilots table. Remember: this will get overwritten in updates and will have to be done again.
  17. You should be able to just use -> <?php MainController::Run('TouchdownStats', 'top_landings', '5'); ?> within your template and it will show the table. You can adjust the view in the touchdownstats_index.tpl file as to what/how you want to see things.
  18. To include transfer hours in the totals -> open TopPilotData.class.php find line 58 $query = "SELECT pilotid, totalhours FROM phpvms_pilots ORDER BY totalhours DESC LIMIT $howmany"; and change to $query = "SELECT pilotid, totalhours, transferhours FROM phpvms_pilots ORDER BY totalhours DESC LIMIT $howmany"; Open tp_index.tpl find line 70 echo $row->totalhours; and change to echo ($row->totalhours + $row->transferhours);
  19. The sql file is to create the needed table in your database. You need to go into phpMyAdmin and either import it into your database with the import function or copy the text of the file into the sql box and run it that way. The file does not need to be on your server, once you have loaded it into the database you should not need it again.
  20. The addon is here - http://forum.phpvms.net/topic/1954-pilotshop-releases-tracking/ It should include all the files you need. The developer is not around much anymore, so if there are issues with the module you will have to work it out through community support or on your own.
  21. Not sure what you have there, but it does look like you have the tpl files inside the module folder and I do not see the PilotShop.php in the folder. All the tpl files should be in: root/core/template or root/lib/skins/yourskin
  22. Looks like you do not have the module in the correct path, be sure it is root/core/modules/PilotShop/pilotshop.php
  23. I did not respond to it as it did not make sense to me to include transfered hours every month to a pilots stats. If you want to, you can: Open TopPilotData.class.php find line 54 $totaltime=0; and change to $totaltime=$pilot->transferhours; That will add the transfer hours to the pilots time each month.
  24. I think it is something to do with the end of the month and the time difference from the server and GMT... It always seems to correct itself after the 1st of the month, on my site anyway. I have not messed with this mod for a bit, I am not sure what or if I tracked it down.
  25. Looks like you have the old LandingStats module which does not work with 2.1 without some modification. There is a link to a newer TouchdownStats module eariler in the thread that works with 2.1
×
×
  • Create New...