Moderators servetas Posted November 27, 2012 Moderators Report Posted November 27, 2012 Pilot Career Page v1.1 This module is going to show your pilot ranks and awards on phpVMS. It was developed by php-mods and it is registered under Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. How to Install? Copy and upload the files same as the structure as your phpvms files. If you want to link your website's visitors/users to this module, use this: www.yoursite.com/index.php/career -or- <?php echo url('/career'); ?> Screenshots Download The module has been uploaded on github and you can download it here. Support will be offered by this forum. If you have any questions do not hesitate to contact us. PS: For those you are using Pilot Awards System (by phpmods), this module needs some customization in order to work in collaboration with your module. 1 Quote
Txmmy83 Posted December 29, 2012 Report Posted December 29, 2012 don't know if my following question is possible to be realized! is it possible to make the listing to show the ICAO or Aircraft Type allowed for specific Rank? best regards Thomas Quote
Moderators servetas Posted January 4, 2013 Author Moderators Report Posted January 4, 2013 UPDATE 1.1 (03/01/2013) Added the aircraft column on the ranks table (as per Txmmy83 request). The download link can be found on the first post. 1 Quote
Junior Posted June 3, 2014 Report Posted June 3, 2014 Cool module mate, thanks! im getting an error - Warning: Invalid argument supplied for foreach() in /home/voovirtu/public_html/va/core/templates/career.tpl on line 57 Quote
Moderators servetas Posted June 3, 2014 Author Moderators Report Posted June 3, 2014 Have you added any award on your phpvms system? Quote
OmerAslan Posted May 24, 2016 Report Posted May 24, 2016 Hello, I got this codes. Help please. Strict Standards: Non-static method CareerData::getgenaward() should not be called statically, assuming $this from incompatible context in /home/pilotomeraslan/public_html/a/core/modules/Career/Career.php on line 13 Strict Standards: Non-static method CareerData::getranks() should not be called statically, assuming $this from incompatible context in /home/pilotomeraslan/public_html/a/core/modules/Career/Career.php on line 14 Strict Standards: Non-static method CareerData::getaircrafts() should not be called statically, assuming $this from incompatible context in /home/pilotomeraslan/public_html/a/core/templates/career.php on line 31 E190 Quote
web541 Posted May 24, 2016 Report Posted May 24, 2016 Open core/common/CareerData.class.php find this public function getgenaward() { $sql = "SELECT * FROM " . TABLE_PREFIX . "awards"; return DB::get_results($sql); } public function getranks() { $sql = "SELECT * FROM " . TABLE_PREFIX . "ranks ORDER BY minhours"; return DB::get_results($sql); } public function getaircrafts($rankid) { $sql= "SELECT distinct icao FROM " . TABLE_PREFIX . "aircraft WHERE minrank=" . $rankid; return DB::get_results($sql); } And replace it with this public static function getgenaward() { $sql = "SELECT * FROM " . TABLE_PREFIX . "awards"; return DB::get_results($sql); } public static function getranks() { $sql = "SELECT * FROM " . TABLE_PREFIX . "ranks ORDER BY minhours"; return DB::get_results($sql); } public static function getaircrafts($rankid) { $sql= "SELECT distinct icao FROM " . TABLE_PREFIX . "aircraft WHERE minrank=" . $rankid; return DB::get_results($sql); } Quote
Moderators servetas Posted May 24, 2016 Author Moderators Report Posted May 24, 2016 Alternatively, just re-download the module from github. I have made all the required changes. 1 Quote
web541 Posted May 24, 2016 Report Posted May 24, 2016 Alternatively, just re-download the module from github. I have made all the required changes. I just submitted a pull-request on this one. Changed $this->shoe('career'); to $this->show('career'); In your github files to make sure that the template is correctly rendered. Quote
Moderators servetas Posted May 25, 2016 Author Moderators Report Posted May 25, 2016 Just a mistyping. Merged your pull request. 1 Quote
KenG Posted September 3, 2016 Report Posted September 3, 2016 For ranks with multiple aircraft is there a way to add a comma and space between each aircraft. else { foreach($rankai as $ran) {echo $ran->icao; } } ?></td> Fairly certain I need to modify this area, but I am not sure how to place a ", " between each call of the foreach command. Quote
web541 Posted September 3, 2016 Report Posted September 3, 2016 Try this foreach($rankai as $ran) { echo $ran->icao.','; } Quote
TAV1702 Posted November 28, 2016 Report Posted November 28, 2016 I made a pull request on this module. it is a small fix for the error on the page when no awards have been assigned in the system yet. Quote
Moderators servetas Posted November 28, 2016 Author Moderators Report Posted November 28, 2016 I made an extra update into the file and merged the pull request. Thank you Quote
TAV1702 Posted November 29, 2016 Report Posted November 29, 2016 I made an extra update into the file and merged the pull request. Thank you Not a problem at all. My only headache was that I can not get the sorry message below the table headers. As of now it is sitting on top of the table headers. if I move the php, I get errors that I can not fix. I'm not the slickest with php but I do get lucky on that rare occasion. I really wish I could fix it the rest of the way. Quote
Moderators servetas Posted November 29, 2016 Author Moderators Report Posted November 29, 2016 That's what I did. I added a table row and column (with an extended colspan) to shown the error inside the table. 1 Quote
TAV1702 Posted November 29, 2016 Report Posted November 29, 2016 (edited) Nice! I'll run over to git and view the change. I am curious. I tried like mad man and all I got was errors. I was probably one little simple step away from correct. **EDIT** Looking at your code change, I was real close in my thinking. Where I was going wrong was not adding the 2nd } in the <?php } } ?> Lesson learned. I thank you much! Edited November 29, 2016 by TAV1702 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.