Jump to content
CarlosEduardo2409

Crewcenter modifications

Recommended Posts

Hi,

From time to time I've made several changes to the crewcenter of mark swan, in fact I modified more the visualization of the pirep, pilot settings, bids, in the dashboard part I did not change much, I'm not very good in php but I tried to do with that's good.

 

Flight report - Pirep

Flight report - Pirep

One cool thing about the pirep was that I added on the map an image that goes from the place of departure until the arrival, to better understand view this gif: https://gyazo.com/87b24dd1832c644c7d428a892f98f730

 

Reservations - Bids

UfOska92RruJuZjrZsJhew.png

One cool thing about the bid was that I added the 'Stream on Twitch' button, it works like this: When a pilot presses it appears a form (http://prntscr.com/hwlu0q) telling him to put his twitch user, when he saves it appears in the VA news saying that this pilot is doing live in twitch, I had the idea of this system because of vAMSYS, because they have it, then I decided to do it too.

It was to have the same map system in the bids but it is not working on this page, I do not know why, it just goes blank.

 

I also changed airmail, airmail was one of the most difficult.

Airmail - Inbox

Z6XEmJpPQsiH9ki8WX4A_w.png

 

Airmail - Message Thread

HiTG5nxvQmiHG7FQvlWNkA.png

 

Airmail - Compose

_mze2R9zSxa8g-a8mIxP4Q.png

 

Airmail - Folder Menu

RL5YGLX-SA_W3lyos1x2ag.png

I created a page just for the things of folders, so it has how to create a folder, delete and edit.

 

Airmail - Reply Message

XgYB1PP3Q9yFcgUp-cZmiA.png

 

Airmail - Settings

Kt_lAriXRECASeLZvFOXZA.png

 

Airmail - Message Success

BHRuOHvBQCyhgNOk2eh8VA.png

 

I want to thank you again for @LeonardIGO4036, @web541, @RuiMiguel, who helped me make the custom map. There are many more people who helped me to do other things, but I can not name everyone but thank you.

Edited by CarlosEduardo2409

Share this post


Link to post
Share on other sites

@Waters10 The waypoints on the map appear automatically, the one I automatically say is that in the map code it already has this waypoint system. But you need to put a sql from navdata, you download that .sql file and upload it in your database.

 

SQL Download: CLICK HERE

 

Sorry if that was not what you wanted to ask.

Edited by CarlosEduardo2409
  • Like 1

Share this post


Link to post
Share on other sites
28 minutes ago, CarlosEduardo2409 said:

@Waters10 The waypoints on the map appear automatically, the one I automatically say is that in the map code it already has this waypoint system. But you need to put a sql from navdata, you download that .sql file and upload it in your database.

 

SQL Download: CLICK HERE

 

Sorry if that was not what you wanted to ask.

Brilliant! I'll give that a go. Thanks a million!

Share this post


Link to post
Share on other sites
16 hours ago, CarlosEduardo2409 said:

It was nothing! Which doubt, you should know, just tell me.

So I've installed the navdata, and verified the waypoints are in the database. However, the route still shows a straight line :unsure: https://prnt.sc/ivdv7t

I couldn't get puTTY to connect to my site, is that likely the issue?

Edited by Waters10

Share this post


Link to post
Share on other sites
3 minutes ago, CarlosEduardo2409 said:

No, route_map.php in lib/skins/crewcenter

Ah okay, completely missed that one! :D

<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>
<?php

// SKINNED FOR CREWCENTER - OPTIMISED FOR PIREPVIEW

?>
<div id="routemap" style="width: 100%; height: <?php echo Config::Get('MAP_HEIGHT')?>"></div>
<?php
/**
 *
 * This is the new Google Maps v3 code. Be careful of changing
 * things here, only do something if you know what you're doing.
 *               
 * These are some options for the map, you can change here.
 *
 * This map is used for schedules and PIREPS
 *
 * 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.
 *
 * If you want to adjust the size of the map - Look at the above
 * "routemap" div with the CSS width/height parameters. You can
 * easily adjust it from there.
 *
 * And for reference, you want to tinker:
 * http://code.google.com/apis/maps/documentation/v3/basics.html
 */
 
if(isset($pirep))
    $mapdata = $pirep;
if(isset($schedule))
    $mapdata = $schedule;
?>
<?php
/*    This is a small template for information about a navpoint popup
    
    Variables available:
    
    <%=nav.title%>
    <%=nav.name%>
    <%=nav.freq%>
    <%=nav.lat%>
    <%=nav.lng%>
    <%=nav.type%>    2=NDB 3=VOR 4=DME 5=FIX 6=TRACK
 */
?>
<script type="text/html" id="navpoint_bubble">
    <span style="font-size: 10px; text-align:left; width: 100%" align="left">
    <strong>Name: </strong><%=nav.title%> (<%=nav.name%>)<br />
    <strong>Type: </strong>
    <?php    /* Show the type of point */ ?>
    <% if(nav.type == 2) { %> NDB <% } %>
    <% if(nav.type == 3) { %> VOR <% } %>
    <% if(nav.type == 4) { %> DME <% } %>
    <% if(nav.type == 5) { %> FIX <% } %>
    <% if(nav.type == 6) { %> TRACK <% } %>
    <br />
    <?php    /* Only show frequency if it's not a 0*/ ?>
    <% if(nav.freq != 0) { %>
    <strong>Frequency: </strong><%=nav.freq%>
    <% } %>
    </span>
</script>

<?php
/*    Below here is all the javascript for the map. Be careful of what you
    modify!! */
?>
<script type="text/javascript">
var options = {
    mapTypeId: google.maps.MapTypeId.ROADMAP
}

var map = new google.maps.Map(document.getElementById("routemap"), options);
var dep_location = new google.maps.LatLng(<?php echo $mapdata->deplat?>,<?php echo $mapdata->deplng;?>);
var arr_location = new google.maps.LatLng(<?php echo $mapdata->arrlat?>,<?php echo $mapdata->arrlng;?>);

var bounds = new google.maps.LatLngBounds();                                                                                                     
bounds.extend(dep_location);
bounds.extend(arr_location);

var depMarker = new google.maps.Marker({
    position: dep_location,
    map: map,
    icon: depicon,
    title: "<?php echo $mapdata->depname;?>"
});
<?php
/* Populate the route */
if(is_array($mapdata->route_details))
{
    $list = array();
    
    foreach($mapdata->route_details as $route)
    {
        if($route->type == NAV_VOR)
            $icon = fileurl('/lib/images/icon_vor.png');
        else
            $icon = fileurl('/lib/images/icon_fix.png');
        
        /*    Build info array for the bubble */
        ?>
        var v<?php echo $route->name?>_info = {
            freq: "<?php echo $route->freq ?>",
            name: "<?php echo $route->name ?>",
            title: "<?php echo $route->title ?>",
            type: "<?php echo $route->type ?>",
            lat: "<?php echo $route->lat ?>",
            lng: "<?php echo $route->lng ?>"
        };
        
        var v<?php echo $route->name?>_navpoint_info = tmpl("navpoint_bubble", {nav: v<?php echo $route->name?>_info});
        var v<?php echo $route->name?>_coords = new google.maps.LatLng(<?php echo $route->lat?>, <?php echo $route->lng?>);
        var v<?php echo $route->name?>_marker = new google.maps.Marker({
            position: v<?php echo $route->name?>_coords,
            map: map,
            icon: "<?php echo $icon; ?>",
            title: "<?php echo $route->title; ?>",
            infowindow_content: v<?php echo $route->name?>_navpoint_info
        })
        
        bounds.extend(v<?php echo $route->name?>_coords);
        
        google.maps.event.addListener(v<?php echo $route->name?>_marker, 'click', function()
        {
            info_window = new google.maps.InfoWindow({
                content: this.infowindow_content,
                position: this.position
            });
            
            info_window.open(map, this);
        });
        
        <?php
            
        // For the polyline
        $list[] = "v{$route->name}_coords";
    }
}
?>
var arrMarker = new google.maps.Marker({
    position: arr_location,
    map: map,
    icon: arricon,
    title: "<?php echo $mapdata->arrname;?>"
});

var flightPath = new google.maps.Polyline({
    path: [dep_location, <?php if(count($list) > 0) { echo implode(',', $list).','; }?> arr_location],
    strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2
}).setMap(map);

// Resize the view to fit it all in
map.fitBounds(bounds);
</script>

<?php
// CLOSING FOR PIREPVIEW
?>

                </div>
            </div>
        </section>
    </div>
</section>

Share this post


Link to post
Share on other sites
18 minutes ago, CarlosEduardo2409 said:

Are you sure all the files in the database were importing correctly for phpvms_navdata?

As far as Im aware. Is there a way you recommend to confirm? 

Looking in the database, there's 293,841 rows in the "phpvms_navdata" table (25MiB)

Edited by Waters10

Share this post


Link to post
Share on other sites
Sincerely ...
I do not know what is the grace that the person has to come to the forum, show all the modifications she has done in a free script and then turn around and talk that she can not share because it is from her VA.

So, what did you come to show everyone then?

Oh really! This is selfishness!
I see no other synonym for this.

The person wastes his time, showing the images of the site and comes saying that he can not share because it is from his VA, he is serious.

Share this post


Link to post
Share on other sites

Olá (Hello) @VAsdoBrasilSA,

Portuguese

Sendo sincero também...

Várias pessoas já fizeram isso também, eu sou apenas mais uma dessas pessoas que fizeram isso, agora eu não posso postar? Se eu não posso fala também para outras pessoas, não só para mim. Outra coisas, eu tenho certeza que não tem nenhuma regra contra isso no fórum, agora se você não quiser ver isso mais nos tópicos, é só não olhar. Essas imagens pode até dar ideias para outras pessoas, podem ser inspirar, etc. Um exemplo dessas pessoas sou eu, eu me inspirei em alguns tópicos que fizeram a mesma coisa que eu.

Eu não estou querendo arranjar briga, esses negócios, até porque eu gosto do site de vocês. É muito bom, parabéns.

Mais se eu não tenho direito de postar, fala para os outros também.

E eu posso ate posso liberar daqui um tempo, pois eu já mudei de skin, mas para isso eu também precisa de permissões do Swan.

 

English

Being sincere too ...

Several people have already done this too, I'm just one more of those people who did this, now I can not post? If I can not talk to other people too, not just to me. Other things, I'm sure you have no rules against this in the forum, now if you do not want to see this more in the threads, just do not look. These images can even give ideas to other people, they can be inspire, etc. An example of these people is me, I was inspired by some topics that did the same thing as me.

I do not want to get into a fight, these deals, because I like your website. It's very good, congratulations.

Plus if I do not have the right to post, talk to others as well.

As I can, I can release right now, because I've already changed my skin, but for this I also need Swan's permission.

Edited by CarlosEduardo2409

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