Jump to content

gio1961

Members
  • Posts

    252
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by gio1961

  1. Hello and sorry for my english ... I tried to edit the file by entering acars.php

    viewmapbig public function ()

    {

    $ this-> set ('acarsdata', ACARSData :: GetACARSData ());

    $ this-> render ('acarsmapbig.tpl');

    }

    .

    I also created the file "acarsmapbig.tpl" copied and pasted the code I found here, unfortunately it does not work ... how to solve? thanks in advance for any response ... Regards

    Ok, I've coded the full screen module for you ;)

    Put this in your ACARS.php Module:

    public function viewmapbig()
    {
    $this->set('acarsdata', ACARSData::GetACARSData());
    $this->render('acarsmapbig.tpl');
    
    }
    

    Then you have to create a new template file in your "phpvms/lib/skins/YOURSKINFOLDER/" folder named acarsmapbig.tpl which contains the following stuff:

    <head>
    <style type="text/css">
    html { height: 100% }
    body { height: 100%; margin: 0; padding: 0 }
    </style>
    </head>
    <?php
    /**
    * These are some options for the ACARS map, you can change here
    *
    * By default, the zoom level and center are ignored, and the map
    * will try to fit the all the flights in. If you want to manually set
    * the zoom level and center, set "autozoom" to false.
    *
    * You can use these MapTypeId's:
    * http://code.google.com/apis/maps/documentation/v3/reference.html#MapTypeId
    *
    * Change the "TERRAIN" to the "Constant" listed there - they are case-sensitive
    *
    * Also, how to style the acars pilot list table. You can use these style selectors:
    *
    * table.acarsmap { }
    * table.acarsmap thead { }
    * table.acarsmap tbody { }
    * table.acarsmap tbody tr.even { }
    * table.acarsmap tbody tr.odd { }
    */
    ?>
    <script type="text/javascript">
    <?php
    /* These are the settings for the Google map. You can see the
    Google API reference if you want to add more options.
    
    There's two options I've added:
    
    autozoom: This will automatically center in on/zoom
    so all your current flights are visible. If false,
    then the zoom and center you specify will be used instead
    
    refreshTime: Time, in seconds * 1000 to refresh the map.
    The default is 10000 (10 seconds)
    */
    ?>
    <script type="text/javascript"
    src="https://maps.googleapis.com/maps/api/js?libraries=weather&sensor=false">
    </script>
    <script type="text/javascript">
    var acars_map_defaults = {
    autozoom: false,
    zoom: 4,
    center: new google.maps.LatLng("<?php echo Config::Get('MAP_CENTER_LAT')?>", "<?php echo Config::Get('MAP_CENTER_LNG')?>"),
    mapTypeId: google.maps.MapTypeId.SATELLITE,
    refreshTime: 10000
    };
    </script>
    <div id="acarsmap" style="margin: 0; width: 100%; height: 100%; position: absolute;"></div>
    </div>
    <script type="text/javascript" src="<?php echo fileurl('/lib/js/acarsmap.js');?>"></script>
    <?php
    /* This is the template which is used in the table above, for each row.
    Be careful modifying it. You can simply add/remove columns, combine
    columns too. Keep each "section" (<%=...%>) intact
    
    Variables you can use (what they are is pretty obvious)
    
    Variable:	 Notes:
    <%=flight.pilotid%>
    <%=flight.firstname%>
    <%=flight.lastname%>
    <%=flight.pilotname%> First and last combined
    <%=flight.flightnum%>
    <%=flight.depapt%>	 Gives the airport name
    <%=flight.depicao%>
    <%=flight.arrapt%>	 Gives the airport name
    <%=flight.arricao%>
    <%=flight.phasedetail%>
    <%=flight.heading%>
    <%=flight.alt%>
    <%=flight.gs%>
    <%=flight.disremaining%>
    <%=flight.timeremaning%>
    <%=flight.aircraft%> Gives the registration
    <%=flight.aircraftname%> Gives the full name
    <%=flight.client%>	 FSACARS/Xacars/FSFK, etc
    <%=flight.trclass%>	 "even" or "odd"
     <%=flight.realid%>
    <%=flight.percomplete%>
    <%=flight.onlineimage%>
    
    You can also use logic in the templating, if you so choose:
    http://ejohn.org/blog/javascript-micro-templating/
    */
    
    ?>
    <script type="text/html" id="acars_map_row">
    <tr height="10px" class="<%=flight.trclass%>">
    </tr>
    </script>
    <?php
    /* This is the template for the little map bubble which pops up when you click on a flight
    Same principle as above, keep the <%=...%> tags intact. The same variables are available
    to use here as are available above.
    */
    ?>
    <script type="text/html" id="acars_map_bubble">
    <span style="font-size: 10px; text-align:left; width: 100%" align="left">
    <b><%=flight.pilotid%> - <%=flight.pilotname%></b><br />
    <strong>Flight <%=flight.flightnum%></strong> (<%=flight.depicao%> to <%=flight.arricao%>)<br />
    <strong>Aircraft: </strong><%=flight.aircraftname%><br />
    <strong>Status: </strong><%=flight.phasedetail%><br />
    <strong>Dist/Time Remain: </strong><%=flight.distremaining%> <?php echo Config::Get('UNITS');?> / <%=flight.timeremaining%><br />
    </span>
    </script>
    
    
    

    The map should be accessible with a link looking like this:

    http://www.YOURLINK/YOURPHPVMSFOLDER/index.php/acars/viewmapbig
    

    or if you have installed phpvms into your root folder

    http://www.YOURLINK/index.php/acars/viewmapbig
    

    You will only have to put a normal button or link to your default livemap linking to the fullscreen one.

    I have a live demo here if you want to check it out:

    http://skyline-va.de...cars/viewmapbig

    Hope this helps ;)

  2. I have the same problem. Past 120 days, the pilots do not pass to retired status., my setup

    in local.config.php

    # After how long to mark the pilot inactive, in days

    Config :: Set ('PILOT_AUTO_RETIRE', true);

    Config :: Set ('PILOT_INACTIVE_TIME', 120);

    But the picture appears green, ie as if I was ok.

    Can you help me?

    Best regards

    Problem solved ... Good morning ... I have another problem with the addon does not update the data profile of the pilot ... Thanks for a possible answer

    Immagine.png

×
×
  • Create New...