Jump to content

Sim Brief for phpvms


Vangelis

Recommended Posts

  • 1 month later...
  • 3 weeks later...

I'd apperciate any help. Running phpVMS 5.5.x on php 5.5.45 using oceans_blue skin. Tried to intergrate, changed .tpl to .php, edited the files per the instructions however when I press the Generate Simbrief button nothing happens. Double checked the layout.php script format was slightly different so I tried changing it to:

<script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/ocean_blue/js/simbrief.apiv1.js"></script>

www.flyelite.org

Thank you,

-Ken

Link to comment
Share on other sites

  • Members

you need to place the js file in /lib/js/ folder and change

<script type="text/javascript" src="[url="http://www.flyelite.org/phpvms/lib/skins/ocean_blue/js/simbrief.apiv1.js"]http://www.flyelite.org/phpvms/lib/skins/ocean_blue/js/simbrief.apiv1.js[/url]"></script>[font=monospace]

to

 <script type="text/javascript" src="<?php echo fileurl('lib/js/simbrief.apiv1.js');?>"></script>

also make sure you have inserted an api key

Link to comment
Share on other sites

also make sure you have inserted an api key

I have this module implemented and working on my website, great work Baggeli! Nase kala.....

However, I would like to implement it on the actual "MyBids" page and not on the brief (before you book the flight). When I move the Generate SimBreif on the BRIEF page, it all works great. However when I move the "generate simbrief" button to the "MyBids" page (along with a whole form around it) It says parameters missing. What do I need to do to be able to move this button on the My Bids page? like here: http://i.prntscr.com/3b4e425d88c642369b77b174f2415ea9.jpeg

Currently this button here works great...on the brief page http://i.prntscr.com/edb58e919b7f46efa6d7929d8d03c9dd.jpeg

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Hi all,

I have recently transferred my VA to a new URL and have managed to kind of get the simbrief module working. I have an API key from simbrief and have changed the reference url in the simbrief.js file, however, when the simbrief ofp is returned the output page is the old Virgin Atlantic url. I can't see where this redirect can be happening from. Any ideas?

Could it be to do with simbrief itself and the API key settings at their end?

Thanks

Link to comment
Share on other sites

Honest answer, I don't know but I assume it is. I emailed Derek from Simbrief originally and he gave me the API key. I then entered the API into the simbrief.apiv1.php file.

My schedule_briefing.php doesn't contain any reference to our site url at all. In Baggelis' original post he talks about amending line 195 in schedule_briefing but my file doesn't go up to that.

Link to comment
Share on other sites

Do you have the form like this?

<form id="sbapiform">

<table>
<tr>
 <?php $planedata=(OperationsData::getAircraftByReg($schedule->registration)) ;?>
 <td><input type="hidden" name="type" size="5" type="text" placeholder="ZZZZ" value="<?php echo $planedata->icao ;?>"></td>
		 </td>
<tr>
<tr>

 <td><input type="hidden" name="orig" size="5" type="text" placeholder="ZZZZ" maxlength="4" value="<?php echo $schedule->depicao ; ?>"></td>
<tr>
<tr>

 <td><input type="hidden" name="dest" size="5" type="text" placeholder="ZZZZ" maxlength="4" value="<?php echo $schedule->arricao ; ?>"></td>
<tr>
<tr>

 <td><input type="hidden" name="route" placeholder="Enter your route here"></td>
</tr>
<tr>
 <td colspan=2></td>
</tr>
<tr>

 <td><input type="hidden" name="units" size="5" type="text" placeholder="ZZZZ" maxlength="4" value="KGS"></td>
	 </tr>
<tr>

</table>


<br><br>

<input type="hidden" name="airline" value="<?php echo $schedule->code?>">
<br>

<input type="hidden" name="fltnum" value="<?php echo $schedule->flightnum?>">
<?php $today = date("dMy");?>
<input type="hidden" name="date" value="<?php echo $today?>">
<?php $deptimes = explode(":", $schedule->deptime); ?>
<input type="hidden" name="deph" value="<?php echo $deptimes[0]?>">
<input type="hidden" name="depm" value="<?php echo $deptimes[1]?>">
<?php $arrtimes = explode(":", $schedule->arrtime); ?>
<input type="hidden" name="steh" value="<?php echo $arrtimes[0]?>">
<input type="hidden" name="stem" value="<?php echo $arrtimes[1]?>">
<input type="hidden" name="reg" value="<?php echo $schedule->registration?>">

<input type="hidden" name="navlog" value="1">
<input type="hidden" name="selcal" value="GR-FS">
<input type="hidden" name="planformat" value="lido">

<input type="button" onclick="simbriefsubmit('http://www.YourWebSite.com/index.php/SimBrief');" style="font-size:30px" value="Generate Simbrief">

</form>

Where http://www.YourWebSite.com/index.php/SimBrief is your site url? Is there a schedule_briefing.php in your skin folder overriding the core/templates one?

Link to comment
Share on other sites

Ok, for those that are interested, I have created a form on my website so that you can adjust various options before generating the SimBrief OFP. I have written a post about it. Below is the link to the post.

http://forum.phpvms.net/topic/23385-simbrief-form-to-tailor-ofp-result/

I use it in conjunction with Vangelis' module and it works perfectly. In essence it utilises the hidden form elements to allow tailoring of the resulting OFP. I have put the files on Github. I've not used Github before so I'm not sure if I've uploaded them correctly. Any problems, message me.

Thanks Vangelis, keep up the great work :)

Link to comment
Share on other sites

The airac supplied in the free simbrief account will be an out of date one. That is probably why it will give you a route that is different to what you want. You either need to buy and navigraph subscription to get the latest airac or, if you go to the simbrief website itself, you can use their dispatch centre and enter the route you want. It may throw errors though if waypoints are out of date.

Link to comment
Share on other sites

  • 1 month later...

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