Jump to content

pilot profile recent flights on google maps?


md82

Recommended Posts

  • Members

Now i understand thx flynryan692

Hi everyone! I have the Great Circle Maps currently on my pilot profiles. I would like to use google maps to show the last 15 flights instead.

Thanks

At the moment there is no easy way you can do it except if you write a function to do it

Link to comment
Share on other sites

  • Members

Ignore my latest post it was quite fast to do it

Open PIREPS.php in core/modules/PIREPS

paste this code in it

public function publicroutesmap($pilotID)
   {


    $this->title = 'Flight Map of'.$pilotID;

    $pireps = PIREPData::findPIREPS(array('p.pilotid' => $pilotID));

    if(!$pireps)
    {
	    $this->set('message', 'There are no PIREPs for this pilot!!');
	    $this->render('core_error.tpl');
	    return;
    }

    $this->set('allschedules', $pireps);
    $this->show('flown_routes_map.tpl');
   }

now in pilot_public_profile.tpl and in profile_main.tpl

paste this where ever you want the map to be shown

<?php PIREPS::publicroutesmap($userinfo->pilotid) ?>

And you should have this result like on my test page

www.http://www.baggelis.com/phpvms/index.php/profile/view/2

  • Like 1
Link to comment
Share on other sites

  • Members

With that code you can

Open PIREPS.php in core/modules/PIREPS

paste this code in it

public function publicroutesmap($pilotID,$limit='')
   {


       $this->title = 'Flight Map of'.$pilotID;

       $pireps = PIREPData::findPIREPS(array('p.pilotid' => $pilotID),$limit);

       if(!$pireps)
       {
           $this->set('message', 'There are no PIREPs for this pilot!!');
           $this->render('core_error.tpl');
           return;
       }

       $this->set('allschedules', $pireps);
       $this->show('flown_routes_map.tpl');
   }

now in pilot_public_profile.tpl and in profile_main.tpl

paste this where ever you want the map to be shown

<?php PIREPS::publicroutesmap($userinfo->pilotid,NumberOfFlightsyouwant)?>

Link to comment
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...