Jump to content

selwynorren

Members
  • Posts

    170
  • Joined

  • Last visited

Posts posted by selwynorren

  1. Hi There

    I think the problem is only a slight one. When you setup teh image link did you add the

    <?php echo SITE_URL?>

    I.e. If you made an normal html template and then converted it for use with phpVM you link would have looked something like this

    image/image.jpg

    In php VMS that link should look like this

    <?php echo SITE_URL?>/lib/skins/yourskin/images/image.jpg

    Replace the youskin with whatever your skin name is and of course your image name accordingly.

    I cant wait to see it.

  2. Hi

    The only problem I can see with your footer tag is that you have speced a line height of 30px, no issue with that except your image does not go 30px high. from what I can see in the CSS is that there is not backgroun-repeat: norepeat; set at all.

    I would suggest either to do that, or make the image 30px high.

    I have a css inspector in Fireworks, so I am anylising based on whsat that shows me.

  3. Thanks Nabeel,

    I was introduced to php for teh first time of this year, kind bbeen forced into it, and its a steep learning curve for me, I am working through w3schools courses at teh moment, as well as a few others. I understand teh basics of teh code and can write a few apps as well, on my train sim website I created teh entire news system there in php. really simple stuff.

    But teh object programming you have used here is ingeneous, and I have never encountered that before except for phpBB, uses the same kind of templating system.

    Maybe one day when I grow up I could do this he he he.

    I am still a little lost concerning this map control however. I dont undertsand how to do teh calculations, Simpilot would you mind showing me how you did it, kina like a setp up phpvms with google maps for dummies kinda thing lol.

    Guys have a super day, I am sure Ill catch you all online later on.

    Nabeel, again, thanks fo your patience and undertsanding!! Your a great teacher!!

  4. I am a real dumb$#@

    I tried what you suggested and still could not get it right. I had used teh $icao to get data and I kept on getting zero results.

    Back and forth back and forth, but no joy.

    Untill it suddenly dawned on me, Literally as I was replying to yiou post (with other feedback than what I am writing now)

    The command

    $airport_info = OperationsData::GetAirportInfo($icao);

    Cannot be written exactly as that, somehow I need to parse what teh actual icao code is  ??? ??? :'( aarrrggg I cant believ I never saw that.

    So I moved teh lines below teh $location statement and instead of using $icao i use $location, getting teh data form the previous array. I did not even have to use teh foreach statement as teh result was not plural at all.

    so now after an etire day of stupidity teh light buld suddenlt switches on.

    Nabeel I apologise that you had to struggle this way with me, lets hope teh light buld stays on for a little while longer  ;D

    So now this is what teh complete code looks like:

    <?php
    $lastreport = PIREPData::GetLastReports($userinfo, 1);
    
    if(!$lastreport)
    {
        $location = $userinfo->hub;
    }
    else
    {
        $location = $lastreport->arricao;
    }
    
    ?>
    <?php
    $airport_info = OperationsData::GetAirportInfo($location);
    
       $airportname = $airport_info->name;
    ?>
    
    <li><strong>Current Location: </strong><?php echo $location; ?> - <?php echo $airportname; ?></li>

    For anyone who wishes to use it.

    Whats teh difference

    Teh previos correct code with only show teh result as teh icao code. This new code will show teh icao code as well as teh associated airport name i.e

    FAPN - Pilansburg

    Now just to get my spelling correct

  5. Hi Nabeel

    No thing that I can thing off, I basically used teh crystal skin, deleted everything I was not using and added a few to customise.

    But I everntually was hackling away so much with my various prjects that I just screwed it all up.

    I have now deleted everything, and will try and start from scratch again.

    I am just irritated that I cannot get this code issue right. I even tried out the bids on teh front page and I get a zero.

    Anyway maybe over teh next few weeks I can hash something kinda respectable

  6. ok that sounds good. I cant say I can put it into practice yet  :'(

    Obviously I have now got all the information. I have exactly where the pilot is . It displays the correct Icao code for his arrival airport. If he is a new pilot and has not flown yet, then his default hub location shows.

    Now What I am trying to do is more complicated. I have spent most of this afternoon trying, but I simple cannot get the information teh way I want it

    I am now using this code to retive all the airport information:

    $airports = OperationsData::GetAllAirports();

    I print_r that info and get the entire list.

    I cannot only extract the names like your example, and I think this has to do with teh fact that there are multiple field, hence having to use the foreach command

    So now I have a list of all the airport names, now here come teh dumb question!!!

    How do I ty those names up with teh location Icao.

    I.e I have a result that tells me where the pilot is now located, I now want to write that icao code as well as that specific airport name

    If I try a foreach comman as follows (my wierd logic - please excuse)

    foreach($location as $airportloaction)
    {
    echo $airportlocation->name;
    }
    

    That resurns a result Invalid argument supplied for foreach()

    In english I would have said select teh airport name where $location - $airporticao

    But that does not work either  ;D ;D

    Why can I simply not tie them together, am I being too complicated??

  7. Hey Nabeel

    Yes I replaced the names and now it works like a charm - Thanks for that when I look at teh api docs what you did makes even more sense, but also not totally. May I ask another question?

    I am struggeling to tie up two values from different tables

    Now that I have teh correct icao code based on airport location I want to ty up teh airport icao code with teh airport name.

    So when I check you api doc I see to get teh airport name I need to use the OperationData::GetAirportInfo($icao) function

    Easy enough I though

    now what I cannot do is tie up teh current location icao with teh airport name  :D

    here is what I wrote:

    <?php $lastreport = PIREPData::GetLastReports($userinfo, 1);
    $locname = OperationsData::GetAirportInfo($icao['name']);
    $userinfo->pilotid;
    $icao->id;
    $test = $icao->name;
    if(!$lastreport)
    {
        $location = $userinfo->hub;
    }
    else
    {
        $location = $lastreport->arricao;
    }
    ?>
    
    <li><strong>Current Location: </strong><?php echo $location; ?> - <?php echo $test; ?></li>
    

    I also tried shifting teh position and did teh following:

    <?php
    $lastreport = PIREPData::GetLastReports($userinfo, 1);
    if(!$lastreport)
    {
        $location = $userinfo->hub;
    }
    else
    {
        $location = $lastreport->arricao;
    }
    $locname = OperationsData::GetAirportInfo($icao['name']);
    $userinfo->pilotid;
    $icao->id;
    $test = $icao->name;
    
    ?>
    
    <li><strong>Current Location: </strong><?php echo $location; ?> - <?php echo $test; ?></li

    Would you mind giving me an example of teh print_r / Var_dump and how it works.

    I either get null or all I get it what I oput inside teh bracket, almost like teh echo command

    How far off am I in understanding your code? ;D ;D

  8. At this point I have reset all mods, even the acars.js

    The only one I have left in terms of teh js files is I have changged added to booked in phpvms.js line 32

    I defaulted back to teh normal acars.js is I was getting some wierd result between IE and FF, each one showing me a different section of our world (sam config)  ;D ;D

    So based on that small change Nabeel its really ok. I though I had done more, it was more of the same change to the same file, acars.js.

  9. Excellent Nabeel, yeah I forgot about future updates.

    Sadly my test failed and I now have an even further zoomed out map  :D

    What I have noticed however, that if you position teh map and zoom the way you like it, and you move your mouse ove the google logo in teh bottom left hand corner, then it will show teh lat and long for that view. I tried entering those coordinates, but nope did not work for me.

    Would it be possible to rather make teh JS files link back to the skins? like teh template files. I ask this as I have modded a few JS files i.e Booking instead of bidding etc.

  10. Hey Nabeel

    I am working in the acarsmap.js file

    I hope thats right, anyway when I tested it locally it was perfect, I upload to the main server and its on the east coast of America  ;D ;D

    Back to teh drawing board for me

  11. Honestly, this stuff just goes way over my head. I thought I would be able to understand it but these old brain cells are packing up  ??? ;D

    I have no idea what I am supposed to do, really. but I put those coordinates in exactly teh way you typed them and it works, then I change the 23 to a 25 and now I have exactly what I am looking for :D

    Thanks very much, I am over teh moon with teh map!!!

  12. Shucks guys, thanks for the feedback.

    Nabeel thats a great I dea Sir, I think I might just do that over the next few weeks, although whta to put as basical menus at the top I am at a loss.  ;D

    I will sharper up the layouts a little more and find some extra icons to use, thanks to everyone, Lets se in a few weeks if I can get it all together.

    If there is anyone who wants the skin I designed they are welocme to it, I have used basic stuffs and all are tables for easiers customisation, send me a message or an email and Ill get the files on over to you with the css doc.

    Cheers

  13. Hi Nabeel

    Excellent thanks so muc for your time on this. I will check teh change logs a little later today, as it means a little more to me now that I understand a little more than what I used to ;-)

    Really again I must say a job extremely well done, Just teh way teh API's and everything slot in togther, phpVMS is so much bigger than what I initailly expected. Really one for the CV!

  14. ok I have just tested a local install of teh full package and it creates groups.

    My bad I should have tested before I posted. I will load the correct version online and test locally.

    P.S. I have seen here that I cannot delete a group or rename it. Once its cvreated its done.

×
×
  • Create New...