Jump to content

in2tech

Members
  • Posts

    292
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by in2tech

  1. After all these years using FSX I have never created a helicopter flight plan until today. Apparently it won't register from helipad to helipad, only runway to runway for acars to log flight. Is this the only way to record a flight runway to runway?

    Thanks!

  2. FSX30HD,

    That did not work either. Now I have the code below and it's not working either. Also, when I connect via acars no image shows up when on the ground, but the image does show when I am in the air, although it is the wrong image because the code is not working in acarsmap.js .

    Here is my complete code as of now. I think I have changed things so much I have just messed up the code completely.

    /**
    * phpVMS - Virtual Airline Administration Software
    * Copyright (c) 2008 Nabeel Shahzad
    * For more information, visit www.phpvms.net
    * Forums: http://www.phpvms.net/forum
    * Documentation: http://www.phpvms.net/docs
    *
    * phpVMS is licenced under the following license:
    *   Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
    *   View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/
    *
    * @author Nabeel Shahzad
    * @copyright Copyright (c) 2008, Nabeel Shahzad
    * @link http://www.phpvms.net
    * @license http://creativecommons.org/licenses/by-nc-sa/3.0/
    *
    * Rewritten for Google Maps v3
    */
    
    var flightMarkers = [];
    var routeMarkers = [];
    var flightPath = null;
    var depMarker = null, arrMarker = null;
    var info_window= null;
    var run_once = false;
    
    var defaultOptions = {
    autozoom: true,
    zoom: 4,
    center: new google.maps.LatLng(-25.363882,131.044922),
    mapTypeId: google.maps.MapTypeId.TERRAIN,
    refreshTime: 12000,
    autorefresh: true
    };
    
    var options = $.extend({}, defaultOptions, acars_map_defaults);
    var map = new google.maps.Map(document.getElementById("acarsmap"), options);
    
    // They clicked the map
    google.maps.event.addListener(map, 'click', function()
    {
    //clearPreviousMarkers();
    });
    
    liveRefresh();
    if(options.autorefresh == true)
    {
       setInterval(function () { liveRefresh(); }, options.refreshTime);
    }
    
    function liveRefresh()
    {
    $.ajax({
    type: "GET",
    url: url + "/action.php/acars/data",
    dataType: "json",
    cache: false,
    success: function(data) 
    {
    populateMap(data);
      }
    });
    };
    
    function populateMap(data)
    {
    clearMap();
    $("#pilotlist").html("");
    
    if (data.length == 0) {
    return false;
    }
    
    var lat, lng;
    var details, row, pilotlink;
    var bounds = new google.maps.LatLngBounds();
    
    for (var i = 0; i < data.length; i++) 
    {
    if(data[i] == null || data[i].lat == null || data[i].lng == null
      || data[i].lat == "" || data[i].lng == "")
    {
    continue;
      }
    
    lat = data[i].lat;
    lng = data[i].lng;
    
    if(i%2 == 0)
    data[i].trclass = "even";
    else
    data[i].trclass = "odd";
    
    // Pull ze templates!
    var map_row = tmpl("acars_map_row", {flight: data[i]});
    var detailed_bubble = tmpl("acars_map_bubble", {flight: data[i]});
    
    $('#pilotlist').append(map_row);
    
    /* var pos = new google.maps.LatLng(lat, lng);
    flightMarkers[flightMarkers.length] = new google.maps.Marker({
    position: pos,
    map: map,
    icon: url+"/lib/images/inair2/"+data[i].heading+".png",
    flightdetails: data[i],
    infowindow_content: detailed_bubble
    });
    
    /* inair images for different airlines */
    
    if (data[i].code == "AIO"){
     var pos = new google.maps.LatLng(lat, lng);
    flightMarkers[flightMarkers.length] = new google.maps.Marker({
    position: pos,
    map: map,
    icon: url+"/lib/images/inair"+data[i].code+"/"+data[i].heading+".png",
    flightdetails: data[i],
    infowindow_content: detailed_bubble
    });
     }
    else if (data[i].code == "PAG"){
     var pos = new google.maps.LatLng(lat, lng);
    flightMarkers[flightMarkers.length] = new google.maps.Marker({
    position: pos,
    map: map,
    icon: url+"/lib/images/inair"+data[i].code+"/"+data[i].heading+".png",
    flightdetails: data[i],
    infowindow_content: detailed_bubble
    });
     }    
    /* inair images for different airlines */
    
    bounds.extend(pos);
    
    google.maps.event.addListener(flightMarkers[flightMarkers.length - 1], 'click', function() 
    {
    clearPreviousMarkers();
    
    var focus_bounds = new google.maps.LatLngBounds();
    // Flight details info window
    info_window = new google.maps.InfoWindow({ 
    content: this.infowindow_content,
    position: this.position
    });
    
    info_window.open(map, this);
    
    // Add polyline, and start/end points
    var dep_location = new google.maps.LatLng(this.flightdetails.deplat, this.flightdetails.deplng);
    var arr_location = new google.maps.LatLng(this.flightdetails.arrlat, this.flightdetails.arrlng);
    
    depMarker = new google.maps.Marker({
    position: dep_location,
    map: map,
    icon: depicon,
    title: this.flightdetails.depname,
    zIndex: 100
    });
    
    arrMarker = new google.maps.Marker({
    position: arr_location,
    map: map,
    icon: arricon,
    title: this.flightdetails.arrname,
    zIndex: 100
    });
    
    // Now the flight path, if it exists
    var path = new Array();
    path[path.length] = dep_location;
    focus_bounds.extend(dep_location);
    if(this.flightdetails.route_details.length > 0)
    {
          $.each(this.flightdetails.route_details, function(i, nav)
          {
              var loc = new google.maps.LatLng(nav.lat, nav.lng);
    
              if(nav.type == 3)
                  icon = "icon_vor.png";
              else
                  icon = "icon_fix.png";
    
              var navpoint_info = tmpl("navpoint_bubble", {nav: nav});
              routeMarkers[routeMarkers.length] = new google.maps.Marker({
              position: loc,
              map: map,
              icon: url + "/lib/images/"+icon,
              title: nav.title,
              zIndex: 100,
              infowindow_content: navpoint_info
              });
    
              google.maps.event.addListener(routeMarkers[routeMarkers.length - 1], 'click', function() 
      {
      info_window = new google.maps.InfoWindow({ 
      content: this.infowindow_content,
      position: this.position
      });
    
      info_window.open(map, this);
      });
    
              path[path.length] = loc;
              focus_bounds.extend(loc);
          });
      }
    
    path[path.length] = arr_location;
    focus_bounds.extend(this.position);
    focus_bounds.extend(arr_location);
    
    flightPath = new google.maps.Polyline({
    path: path,
    strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2
    });
    
    map.fitBounds(focus_bounds); 
    flightPath.setMap(map);
    });
    }
    
    // If they selected autozoom, only do the zoom first time
    if(options.autozoom == true && run_once == false)
    {
    map.fitBounds(bounds); 
    run_once = true;
    }
    }
    
    function clearPreviousMarkers()
    {
    if(info_window)
    {
    info_window.close();
    info_window = null;
    }
    
    if(depMarker != null)
    {
    depMarker.setMap(null);
    depMarker = null;
    }
    
    if(arrMarker != null)
    {
    arrMarker.setMap(null);
    arrMarker = null;
    }
    
    if(routeMarkers.length > 0)
    {
      for(var i = 0; i < routeMarkers.length; i++) {
    routeMarkers[i].setMap(null);
    }
    }
    
    routeMarkers.length = 0;
    
    if(flightPath != null)
    {
    flightPath.setMap(null);
    flightPath = null;
    }
    }
    
    function clearMap()
    {
    if(flightMarkers.length > 0)
    {
    for(var i = 0; i < flightMarkers.length; i++) {
    flightMarkers[i].setMap(null);
    }
    }
    
    flightMarkers.length = 0;
    
    if(routeMarkers.length > 0)
    {
      for(var i = 0; i < routeMarkers.length; i++) {
    routeMarkers[i].setMap(null);
    }
    }
    
    routeMarkers.length = 0;
    }
    

  3. I am trying to have different images for different airline ICAO and only one part is working.

    In the acarsmap.js I replaced this:

    var pos = new google.maps.LatLng(lat, lng);

    flightMarkers[flightMarkers.length] = new google.maps.Marker({

    position: pos,

    map: map,

    icon: url+"/lib/images/inair/"+data.heading+".png",

    flightdetails: data,

    infowindow_content: detailed_bubble

    });

    with this and it does not work:

    if (data.code == "AIO"){

    var pos = new google.maps.LatLng(lat, lng);

    flightMarkers[flightMarkers.length] = new google.maps.Marker({

    position: pos,

    map: map,

    icon: url+"/lib/images/inair"+data.heading+".png",

    flightdetails: data,

    infowindow_content: detailed_bubble

    });

    }

    else if (data.code == "PAG"){

    var pos = new google.maps.LatLng(lat, lng);

    flightMarkers[flightMarkers.length] = new google.maps.Marker({

    position: pos,

    map: map,

    icon: url+"/lib/images/inair2"+data.heading+".png",

    flightdetails: data,

    infowindow_content: detailed_bubble

    });

    }

    When I make a test flight no images at all show up. I have AIO images in the inair folder and the PAG images in the inair2 folder. I've checked permissions on my folders and that is fine. I know the image path's are working because when I switch out inair with inair2 in the image path of the original code, I get the correct images from the folder I am referencing in the original code. However the code that should select the image depending on ICAO code does not work!

    What could be the problem?

    Any help appreciated!

  4. *Not Tested But Should Work Or Get You Close

    In acarsmap.js

    change line 104 from

    icon: url+"/lib/images/inair/"+data[i].heading+".png",
    

    to

    icon: url+"/lib/images/inair/"+data[i].flightnum.substr(0,3)+".png",
    

    Put your flight image you want to use in the /lib/images/inair/ folder.

    Example if you have a flight ABC1234 then put an image for it in the folder named ABC.png

    Would this work for different images for different airlines? I need an image on the live map for airline ABC and a different image on the live map for airline DEF by airline ICAO! Would this work, or is there another way this has to be done?

  5. Was changing the images in the inair folder, all 360 with the script found on the forums, and everything was working fine and all of a sudden no images are showing at all. Cleared all my computer caches, but do not have a Flush Cache in the cpanel at TFDi. Just weird that it worked for about 3 different images I was testing and all of a sudden they stopped showing up. Could it be a folder permission? No images at all are showing now.

    This part SOLVED!

    Thanks!

    Now I need to know if I can have different image(s) for say cargo and regular flights. Like black plane image for cargo and blue plane image for regular flights. How would I do that?

  6. When uploading a copy of phpVMS to a sub domain on my site for testing I noticed that the default crystal skin worked and my skins did not without changing the path to the skin, but the crystal skin has the layout.php instead of layout.tpl . Can someone explain exactly what this does?

    Thanks!

  7. For phpVMS in general and getting the site back online. I hadn't been online in a few days and when I saw the error when trying to access the pphpvms.net site and the forums, I immediately was worried that it might not come back at all for some reason. I would just like to know as a community how we should or can help with phpVMS being around for a long time and the site too?

    I know some people come and go (with flight simulation in general) as thing's change in life, me being one of them, but like the fact that I have FSX or X-Plane ready to reload at any time, and enjoy very much phpVMS and would like to see it around for a very long time.

    If I knew anything worth while about coding in php I would love to help keep it relevant (like some members here do) for years to come. Unfortunately, I do not at this time. But hey I didn't know anything about HTML and CSS until phpVMS got me interested.

    I am just saying if I needed to help with manuals, or anything I am capable of to help keep phpVMS going I would be more than happy too. If it is allowed or possible for this community to get together to either update the software more (I know members already do this) , or update it with new features and such? I know you have a new Terms Of Service, and am assuming that this could be done, but was just checking.

    Thanks again Nabeel and all the coding members, moderators, community, etc.... that keep phpVMS going.

    • Like 3
  8. Where do you change the prices for charter flights? at the moment it is charging £1 per person

    I don't remember changing anything to do with the price if this is what you are talking about. Still have to work on the images I added. Some don't make sense, like the calendar in some places :) I am still having some problems with alignment and hiding the CH, Charter flight during registration.

    http://screencast.com/t/ypXsYPrRa

  9. I'm back again, but still having the issue. I've double checked and everything looks like it is installed in the correct location. There is one folder called charter in core/, a folder called Charter in core/modules/, a folder called charter in core/templates/, and the last is charter in lib/images/. The only other thing I can think of is that I don't have any flights yet. Could that be causing this?

    I've also attached a screenshot of the webpage.

    post-45765-0-37952900-1421021231_thumb.jpg

    The only way I was able to find most of the items to change according to the documentation ( still have a few issue's myself) was to use the Find and Replace option in my text editor. I looked for these items forever till I realized I had an easier way to do it. Having said that I am having issues with the code that hides the CH, Charter, airline from new registrations.

    Good Luck...

    Here is my Charter System I am in the process of customizing and fixing things that do no work:

    http://simbreak.com/index.php/charter

    Some screen shots:

    http://screencast.com/t/73Ln2qWU8oV

    http://screencast.com/t/OmaeUjxsD

    http://screencast.com/t/QyiFOHxO3

    Still have a lot of customizing and fixing to do!

  10. Of all the post I have made on phpVMS forums the most popular are the ones about html,css, and bootstrap. Although I have been on the phpVMS forums and making skins since around 2010, I never really understood what I was doing until the last 6 months to a year. I mean I could change things and add phpVMS code (which I still do) to templates but I didn't know how to make one from scratch or understand most of what was going on.

    Let me say although I do help some phpVMS sites with tweaks and such, and sell a few templates once in awhile. I still consider myself fairly new to the process compared to a lot of others that create phpVMS sites here for virtual airlines.

    So I am creating a brand new site for people to interact about coding in html, css, php, bootstrap, etc... I am only learning html and css right now so others will have to discuss actually coding in php, bootstrap, javascript, etc... This site is just meant for an overall area for us wanting to learn to code and help others with general coding. Them you can apply them to phpVMS or maybe just make a website for a family member, friend, church, etc...

    I have a temporary sub domain on a site I only use for email so it may seem weird, but hey it's there. If it takes off I will buy a new domain or add it to my SimBreak domain (in my signature) in the near future.

    Brand new site literally with no content to speak of and new forums with no members or content. The actual site is a site I am working on from a tutorial I found and I am learning phpBB forums too!

    If interested visit the beta site:

    http://www.sportsdep...c.com/SimBreak/

    I know it a weird url but it gets the job done for now! The template is one I just followed a tutorial and it was a Responsive site and I added a drop down menu (original theme didn't have one) and took out the responsive stuff cause I don't really need it.

    Hopefully we can all help each other learn general coding!

    • Like 3
  11. I have an html and css tutorial that I have added a drop down menu to and i am trying to position the navigation to the right side of the top of page. I can't figure out the correct css code to do so. Trying to align where the navigation lines up with the right side.

    • Like 3
  12. Does the file exist within /Desktop/sitepoint/css and is it called bootstrap.css?

    Always check the console in your browser it'll help you.

    Figured out the CDN version, sneaky little http: :) Now I have to get the local version to work. Yes I have the files in my local project folder and they are named correctly. For now I am going to use the CDN version since it is working and figure out the local later.

    Here was my problem with the CDN version:

    Header Code:

    <!-- Latest compiled and minified CSS -->

    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">

    <!-- Optional theme -->

    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">

    Above </body> code:

    <!-- jQuery (necessary for Bootstrap's Javascript plugins) -->

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

    <!-- Latest compiled and minified Javascript -->

    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

    Now it looks correct. Although a different tutorial:

    http://screencast.com/t/x5VxFbyqW7LO

    And the mobile version:

    http://screencast.com/t/qwF2F8mA

    Well not really version, but when I pull the browser screen in close it switches to mobile, or when viewed on mobile device!

    Thanks, it always the little things like a colon , semi-colon, http: , { curly brackets }, etc.....

  13. I am trying to learn a little bit about HTML, CSS, and Bootstrap at the moment. I have completed some tutorials on creating a basic website by hand coding with html and css, and now want to learn Bootstrap a little.

    I am having a problem getting started. I can't get the tutorial (have tried several on youtube, etc..) to display properly.

    Currently I am following this beginners tutorial:

    http://www.sitepoint.com/twitter-bootstrap-tutorial-handling-complex-designs/

    Instead of the navbar looking like the tutorial when I get started mine looks like this:

    http://content.screencast.com/users/in2tech/folders/Jing/media/351dc02a-4890-4cde-900b-b151840bdf95/00000015.png

    Should look like this:

    http://screencast.com/t/NYebf7wfn

    I have tried both the CDN links, getting files and have installed them locally in my folder and can not get it to display properly.

    Tried different browser's even and still not looking correct.

    Any ideas what is wrong in my code. I though I followed all the tutorials to the letter but maybe I am missing something simple.

    Thanks for you help!

    • Like 4
  14. Hello.I'm How to Edit Live Map and How to Edit Live Map Width ?

    Question.md.png

    To change the map size look in the local.config.php file in the Core folder and edit the size until it fits!

    Your looking for this area in the local.config.php file:

    # Google Map Options

    Config::Set('MAP_WIDTH', '800px');

    Config::Set('MAP_HEIGHT', '600px');

    # Valid types are G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, G_PHYSICAL_MAP

    Config::Set('MAP_TYPE', 'G_PHYSICAL_MAP');

    Config::Set('MAP_LINE_COLOR', '#ff0000');

    Config::Set('MAP_CENTER_LAT', '45.484400');

    Config::Set('MAP_CENTER_LNG', '-62.334821');

    Config::Set('MAP_ZOOM_LEVEL', 12);

    Change the width and the height to your liking! I think he gives the dimensions in the instructions somewhere.

    • Like 1
  15. All of a sudden I can't access http://www.pagvirtual.net via my wifi network on any device, computer, wifi iPad, but can access it via an iPad with cellular. Anyone have any idea why that would be? It's the only site I can't access every, any other site works fine. I know it is being hosted at http://tfdidesign.com . This is just the strangest thing. I never had this happen before. Other people can access it but not me. I don't mean login or anything, ( I can do that when on iPad cellular only) , I mean I can't even even get the site to come up, it just times out!

    I called my broadband company Xfinity, cleared the cache and cookies, and even did a clean install on my laptop! It's the only site I can't access!

    Just weird,

    Thanks!

  16. I am getting what I call echo's of reply airmail, several copies of the replies, instead of just the one reply. Also, doesn't it quote the original airmail message, as I can see the reply but not the original message they replied too, or am I missing something!

    Thanks!

  17. Thanks, I appreciate the help.

    Now I want the Last Flight data:

    Date:

    Flight Number:

    Departure:

    Arrival:

    Distance:

    Flight Time:

    Landing Rate:

    Status: (accepted, etc...)

    I guess this info is in the acars file, right? Can I strip the code from there? Guess we will see!

    And how do I get the text at the bottom of the award given? Figured out the text code but it's an alignment issue now.

    Want the text at the bottom of the award.

    http://screencast.com/t/78JcZ1nq3s

    Like I have here, but for the awards:

    http://screencast.com/t/rAD3hrR7pE

    This is the award code I have:

    <?php foreach($allawards as $award){ ?>

    <img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /><?php echo $award->name ?>

    <?php } ?>

    Thanks again for your help!

  18. I have searched and not found this on the forums. I know it's here somewhere. I am wanting the code for pilot signature similar to the ranks where it will show the signature image for each pilot in the pilot center I am creating! Not just a link but the actual image for each pilot logged in.

    Should be something like the rank right?

    <?php echo $userinfo->rank; ?>

    I have tried:

    <?php echo $userinfo->signature; ?>

    <?php echo $userinfo->badge; ?>

    But neither one works!

  19. Is that the code they supplied in the demo?

    Yes, and when you clicked on number's 2-6 on the demo it took you to the template site. So you think it is meant to be external links only, or something like an internal page link, say like an about page or something? Seems odd and there is no more code like a slider would have, that is it.

  20. I am working on converting a template to a phpVMS skin. What I thought was a slider for images turns out to be something I have not come across. Here is a screenshot of the area in question, and the code is below:

    Screenshot:

    http://screencast.com/t/ce1i3VFnf

    And here is the code, that has me totally confused. As you can see the Piper Cub is a static image for slot 1, I am trying to figure out how to change the image when you press the different numbers 1-6. If I put a image path in it opens in a new tab instead of the image area. I am confused to say the least.

    <!-- Main -->

    <div id="main">

    <!-- Top Image -->

    <ul class="navigate">

    <li class="active"><a href="#">1</a></li>

    <li><a href="#">2</a></li>

    <li><a href="#">3</a></li>

    <li><a href="#">4</a></li>

    <li><a href="#">5</a></li>

    <li><a href="#">6</a></li>

    </ul>

    <div class="transparent-frame">

    <div class="frame"> </div>

    <img src="/lib/skins/runway/css/images/cub.png" alt="" /> </div>

    <div class="cl"> </div>

    <!-- End Top Image -->

×
×
  • Create New...