Jump to content
FSVKenny

How to add the Acars map to an xeternal html page

Recommended Posts

Hello.

This has probably been asked about before, but I want to add the Acars map to an page that is outside of the phpVMS folders.

FSVintageAIR.com

I don't understand why the Acars map wont work on my external page The front page news, front page reports and newest pilots work.

Here's the line I used for the Acars map 

Quote

<?php
  include('FSV_phpvms/core/codon.config.php');
  include('FSV_phpvms/core/local.config.php');
?>

<p style="color: rgb(46, 59, 62);">
<?php Template::Show('acarsmap.php'); ?></p> 
 

Thank for the help.

Share this post


Link to post
Share on other sites

Not sure if this still works, but you could try this

<?php MainController::Run('ACARS', 'index'); ?>
// or
// <?php MainController::Run('ACARS', 'viewmap'); ?>

Your includes look fine, but you may have to adjust them to this

<?php include('/home/YOURUSERNAME/public_html/FSV_phpvms/core/codon.config.php');?>

 

Share this post


Link to post
Share on other sites

Thank you for the reply.

Here's what I've did for testing, but no joy...

<?php include('http://www.fsvintageair.com/FSV_phpvms/core/local.config.php');?>
<!DOCTYPE html>

<div>

<?php MainController::Run('ACARS', 'index'); ?>
</div>
<div>
<?php MainController::Run('ACARS', 'viewmap'); ?>

</div>

</html>

Share this post


Link to post
Share on other sites

Is there anything in your PHP error_log file?

Also, not sure if that's from your code or from view source, but your include statements should look like this

<?php
include('/home/YOURUSERNAME/public_html/core/codon.config.php');
include('/home/YOURUSERNAME/public_html/core/local.config.php');
?>

where YOURUSERNAME should be your cPanel username (it could be FSV_phpvms?), you are on shared hosting?

And confirm which version of phpVMS (v2 or 5.5.x) and PHP (5.5, 5.6, 7.0, etc.) you are using?

Edited by web541

Share this post


Link to post
Share on other sites

Thanks again for the help.

Yes I'm on shared hosting and php 5.5.2

I've been using on my index page and is working for News, frontpage reports and other snips.

<?php
  include('FSV_phpvms/core/codon.config.php');
  include('FSV_phpvms/core/local.config.php');
?>

Acars map  is outside of the phpVMS folder. Is this ok or should the map_in.php be in the templates folder?

 001010Flight%20Sim.png

___________________________________________________________

OK here's my coding. Everything is working except the map.

Quote


<?php
  include('FSV_phpvms/core/codon.config.php');
  include('FSV_phpvms/core/local.config.php');
?>
<!DOCTYPE html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  <title>FSVintageAIR</title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="author" content="Kenny">
  <link rel="SHORTCUT ICON" href="http://www.fsvintageair.com/FSV_phpvms/lib/images/favicon.ico"/>
  <link rel="stylesheet" type="text/css" href="styles/cover_page_1.css">
  <link rel="stylesheet" type="text/css" href="styles/noscrollbar-index.css">
  <link rel="stylesheet" type="text/css" href="FSV_phpvms/lib/skins/ocean_blue/styles/ocean.css" />  
  <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/ocean_blue/assets/css/bootstrap.css" rel="stylesheet">
</head>
<body id="index">
 
<div class="art-layout-wrapper">
<div class="art-content-layout">
<div class="art-content-layout-row">
<div class="indextable">
<table align=center>
<tr>
<td>
<!-- Begin Live Flights -->
<div class="art-postcontent art-postcontent-0 clearfix"><div class="art-content-layout-wrapper layout-item-0">
<div class="art-content-layout layout-item-1">
<div class="art-content-layout-row">
<div class="art-layout-cell layout-item-2" style="width: 100%" >
<div class="art-blockheader">
<h3 class="t">Live Flight Tracker</h3>
</div>
<?php MainController::Run('airlinemap', 'index'); ?>
</div>
</div>
</div>
</div>
<!-- End Live Flights -->
</td>
</tr>
<tr>
<td>
<!-- Begin Latest Flights -->
<?php Template::Show('frontpage_reports.php'); ?>
</div>
</div>
</div>
</div>
</div>
<!-- End Latest Flights -->
</td>
</tr>
</table>
</div>
</div>
</body>
</html>

 

Edited by FSVKenny

Share this post


Link to post
Share on other sites

That is not the acars map that comes with phpVMS. That is a payware addon by CrazyCreatives named Airline Map (if version 1 using Google Maps) or Airline Route Map (if version 2 using OSM). 

If you are having issues with that addon working as described on the Crazy Creatives website, you will need to ask in their forums for assistance. If you are wanting to get the correctly working addon to just display on an external webpage, someone here may be able to assist you in getting it working. Chances are they will need to have the exact same addon. In any case, it may be better to chat with others about this via PM or email.

Share this post


Link to post
Share on other sites

@FSVKenny

It's also important not to use the absolute path to the file written by yourself.
You can use the magic constants from php to solve this.

__DIR__ for example points to the directory of the file you're using this constant.
In map_in.php it will be something like

include(__DIR__.'/FSV_phpvms/core/codon.config.php');

With this you have a dynamic absolute path.

Edited by Karamellwuerfel

Share this post


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