Jump to content

Nabeel

Administrators
  • Posts

    8148
  • Joined

  • Last visited

  • Days Won

    39

Everything posted by Nabeel

  1. Nabeel

    Schedules

    Well, only the flights set to fly today will show then, since that's the default behavior on the template
  2. Wow, only 4? What OS is your server? And how are you uploading the files?
  3. Nabeel

    Schedules

    Are they all set to fly on Monday?
  4. Nabeel

    Schedules

    Here is fine, until it's a confirmed bug. Can you link me to your search with a few examples? They seem to load ok on the dev site.
  5. Nabeel

    Schedules

    Ah yes, that's a bit of a bug - they're the same form, and both fields are filled in, so it ends up searching by whichever one comes last (the distance)
  6. http://bugs.phpvms.net/ticket/119
  7. You can do: <?php if(Auth::LoggedIn()) { echo '<a href="/routes.html">Routes</a>'; } ?> And that will only show if logged in
  8. Uh oh. Just avatars and flags? The other data is ok?
  9. Hey $params = array( 's.depicao' => array ('$this->post->depicao'), 's.arricao' => array ('$this->post->arricao'), 's.enabled' => 1, ); Should be: $params = array( 's.depicao' => $this->post->depicao, 's.arricao' => $this->post->arricao, 's.enabled' => 1, ); No need to assign them to arrays. And putting variables in single quotes doesn't parse the variable, it will literally put $value
  10. I don't have the manual, but in the SDK docs, in the fsacars settings, there is an option to change the unit. Did you use that?
  11. There's a setting in the fsacars_config.tpl which I just noticed actually: UnitSystem=GB I'm assuming that means great britain. I'll have to check out their docs once I get a chance, I think I over looked that setting from the local.config perspective
  12. Revision 821: fixed #116 fixed #118, vaCentral updates20 December 2009, 8:34 pmfixed #116 fixed #118, vaCentral updatesSource: Revisions of /Download from http://downloads.phpvms.net/phpvms.beta.zip
  13. It's finally open! I've opened up registrations for everyone running beta build 821 or later. There still might be some issues, but I guess that's the purpose of a beta. I'm still adjusting many things, including the rankings, but the data exports, etc, should all be working. Enjoy the friendly competition The site is: http://beta.vacentral.net There's also a dedicated board towards the bottom of the page, enter any issues there. Thanks!
  14. No problem. The best example I guess would be the Profile module, the view function (it uses a few different data functions, returns the data and sets them to a template), or for processing, the RouteMap module (I think the video tutorial goes over this), or the XML module. I'm gonna be re-doing a tutorial on this sometime this week to coincide with the release, but definitely, any questions let me know. There's all sorts of info strewn around, so I have to try to get it all together.
  15. Hey, The data classes should only be to get/retrieve data, no template calls. So, the $this->set and $this->render's won't run in data classes. Check out the other data classes to see how I do it, that will help Do this: return DB::get_results($sql); And process the results in the controller. You can refer to the Frontmap module too, those are a little easier to see. The invalid argument means the DB didn't return properly, after DB::get_results() do DB::debug() to see the errors. And you should do: if($count != '') { $sql. = ' LIMIT '.$count; } To only include the LIMIT param is $count ins't blank. That's probably your error there
  16. It seems to me ACARS isn't reporting fuel in the proper units. I'm guessing the setting is right?
  17. It'll be out in a couple of weeks, so you could wait if you'd like. There were major changes in the backend which can't really be ported backwards easily.
  18. Instead of 10%, I would take the width ofyour page in pixels, divide by the number of columns, and use that, if you're using fixed width. But I might just be confusing you more
  19. Nope, the core_nav is included with the header. I don't understand the resizing every 400 ms bit? I don't really do iframes so... can't really help ya there
  20. Sorry, the link should be actionurl, not just url Then it should be all good. I fixed it in my original post
  21. Ah, this code will only work on the latest betas/next release
  22. Ok, 3 steps: 1. create a new module called IVAOFlightPlan (so create a module in core/modules called that), then inside that create IVAOFlightPlan.php, then inside that, paste this: <?php class IVAOFlightPlan extends CodonModule { public function download_ivao($schedule_id='') { // Make sure they specified a schedule if($schedule_id == '') { $this->set('message', 'No Schedule specified'); $this->render('core_error.tpl'); return; } $schedule = SchedulesData::findSchedules(array('s.id'=>$schedule_id), 1); // Make sure the schedule was valid/exists if(!$schedule) { $this->set('message', 'The schedule doesn't exist!'); $this->render('core_error.tpl'); return; } // Now write out our template file $this->set('schedule', $schedule[0]); $file = $this->get('ivao_flightplan.tpl'); // And send it to the browser to download Util::downloadFile($file, 'ivao_flightplan.fpl'); } } The Util::downloadFile() function will be available after tonight's commit. If you don't want ot wait, replace that line with: # Set the headers so the browser things a file is being sent $filename = 'ivao_flightplan.fpl'; header('Content-Type: text/plain'); header('Content-Disposition: attachment; filename="'.$filename.'"'); header('Content-Length: ' . strlen($file)); echo $file; You can change the filename to what you want it to be, I'll let you figure that out 2. Create in core/templates a file called 'ivao_flightplan.tpl', and paste your flightplan code into it [FLIGHTPLAN] ID=<?php echo $schedule->code.$schedule->flightnum; ?> RULES=I DEPICAO=<?php echo "{$schedule->depicao}"; ?> DEPTIME=<?php echo "{$schedule->deptime}"; ?> LEVELTYPE=F LEVEL=<?php echo "{$schedule->flightlevel}"; ?> ROUTE=<?php echo "{$schedule->route}"; ?> DESTICAO=<?php echo "{$schedule->arricao}"; ?> EET=<?php echo "{$schedule->flighttime}"; ?> 3. Add a link to your briefing page: <a href="<?php echo actionurl('/IVAOFlightPlan/download_ivao/'.$schedule->id);?>">Download IVAO Flight Plan</a> Then you should be all set. You can add different flight plan types the same way (adding a public function download_XXXX($schedule_id) and then you can have different flight plan types within the same module. Hope that helps, it might not work exactly, but should be the general gist of it
  23. Hey, So where do you want this downloadble from? How do you know which schedule?
×
×
  • Create New...