Jump to content

Pilot Career Page v1


Recommended Posts

  • Moderators

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

career_page.jpg

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.

  • Like 1
Link to post
Share on other sites
  • 1 month later...
  • 2 weeks later...
  • 1 year later...
  • 1 year later...

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

Link to post
Share on other sites

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);
   }

Link to post
Share on other sites

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.

Link to post
Share on other sites
  • 3 months later...

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.

Link to post
Share on other sites
  • 2 months later...

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. :(

Link to post
Share on other sites

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 by TAV1702
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...