Jump to content

Tom

Members
  • Posts

    1517
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Tom

  1. The table names have no connection to corrupt files, that's not possible. I think the best bet for now is to have someone else do it - don't worry about there being access to other sites, joeri is trusted
  2. Tom

    VAForum 2

    Simpilot, long posts are good! I love knowledge I had a look through too and ran into exactly that... annoying. I think until (if ever) the permissions system for phpVMS is changed, adding this to the admin panel just isn't practical - combining it with normal permissions working out whether users can see the admin link, then deciding what they can see: to many template (and possibly core code) edits.
  3. Just me, or is this identical to http://forum.phpvms.net/topic/4230-greenjet-airlines/
  4. It appears lots of your files are broken... check you've uploaded everything properly. Also, just to remove your confusion here: your host enforces a prefix on your database names (in this case they appear to be Danbo34_), however you do not have any table name limitations, which is what the phpvms installer is asking you. You can just leave phpvms_ in your table prefix field and it will work fine.
  5. Yep it'll work in any of the module php files. Just make sure you're putting it in the index (unless it's somewhere else you want it) - and you'll probably want to put it before any other actions.
  6. For the pilots list, open core/modules/Pilots/Pilots.php Find: public function index() { // Get all of our hubs, and list pilots by hub $allhubs = OperationsData::GetAllHubs(); if(!$allhubs) $allhubs = array(); foreach($allhubs as $hub) { $this->set('title', $hub->name); $this->set('icao', $hub->icao); $this->set('allpilots', PilotData::findPilots(array('p.hub'=>$hub->icao))); $this->render('pilots_list.tpl'); } $nohub = PilotData::findPilots(array('p.hub'=>'')); if(!$nohub) { return; } $this->set('title', 'No Hub'); $this->set('icao', ''); $this->set('allpilots', $nohub); $this->render('pilots_list.tpl'); } Replace: public function index() { if(!Auth::LoggedIn()){ $this->set('message', 'Not allowed'); $this->render('core_error.tpl'); return; } // Get all of our hubs, and list pilots by hub $allhubs = OperationsData::GetAllHubs(); if(!$allhubs) $allhubs = array(); foreach($allhubs as $hub) { $this->set('title', $hub->name); $this->set('icao', $hub->icao); $this->set('allpilots', PilotData::findPilots(array('p.hub'=>$hub->icao))); $this->render('pilots_list.tpl'); } $nohub = PilotData::findPilots(array('p.hub'=>'')); if(!$nohub) { return; } $this->set('title', 'No Hub'); $this->set('icao', ''); $this->set('allpilots', $nohub); $this->render('pilots_list.tpl'); }
  7. Because of the way the list works, you'll want to just include the title as well. Problem is if you have multiple hubs it will display the error multiple times, so this would be one of the modules where editing the php would look better. Here's the code: <? if(Auth::LoggedIn()){ ?> <h3><?php echo $title?></h3> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table id="tabledlist" class="tablesorter"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($allpilots as $pilot) { /* To include a custom field, use the following example: <td> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ // To skip a retired pilot, uncomment the next line: //if($pilot->retired == 1) { continue; } ?> <tr> <td width="1%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td> <td><?php echo $pilot->totalflights?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <?php } ?> </tbody> </table> <? } else { ?> Not allowed <? } ?>
  8. <? if(Auth::LoggedIn()){ ?> <!-- HTML for logged in here --> <? } else { ?> <!-- HTML for guests here --> <? } ?> In the tpl files for the pages you want to hide. Alternatively you can do it by editing the module code, but that can get messy with updates and if you don't know php very well.
  9. Tom

    VAForum 2

    Yeah that's exactly what I was thinking - didn't know if it would be practical - but if I do it that way I'd like to be able to make use of the existing permissions system. Does anyone know if its possible for me to add custom permissions?
  10. Have you logged in? If so and it's still not letting you in go into your database and check the phpvms_groupmembers table for the a record with pilotid 1 and groupid 1. If it doesn't exist, add it. (Don't change the one which is pilotid 1 groupid 2 - you need that too).
  11. The rank is based on your hours only. You are still an Admin (you can get to the Admin panel). If you can't see the link it's site.com/admin/
  12. The alignment is a little off (e.g. sidebar and that Upcoming Events box - would make sense for them to line up) And your footer; well... the rounding is odd, and it should be HTML... you have no link back now. Also: body{margin:0 0 8px 0;} would likely look better
  13. It's in the thread... http://forum.phpvms.net/topic/3223-brilliance-v1-with-jquery-pilot-center/page__view__findpost__p__28023
  14. Tom

    Aer

    The guy who made it has disappeared and doesn't reply to contact any more (apparently)
  15. Tom

    VAForum 2

    I think the users airline profile fits the criteria, other fields can be added there if needed. As for the border, I will add a div around everything for people to style. I'm also going to spend some time going through all the templates and removing the unnecessary tables etc to make styling easier.
  16. Tom

    now() [SOLVED]

    Instead of 'NOW()' I've used: '".date('Y-m-d H:i:s')."' And then to set your time zone put the following in local.config.php (applies it to all scripts then): date_default_timezone_set('Europe/London');
  17. Tom

    VAForum 2

    Oh even if it wouldn't sound easy to do, I can always give it a try!
  18. Right ok, so seeing as I'm doing it with XML rather than an actual program I'm going to have to set a cron to run the script? How often should that run? I believe my host sets a limit to 15 minutes - would that be a problem do you think? I think I have an fair idea for how to do it now.
  19. Stocks should totally be integrated into VACentral. It needs more features really, I never visit the VACentral site.
  20. Can't anyone help? Not even explain how the ACARS system works and which files I need?
  21. Tom

    VAForum 2

    Yay more progress! I had a day off today so I've added user-customisable signatures this morning. Any other feature requests? I want to try and pack as much as possible into an update so I don't annoy everyone with loads of them.
  22. Tom

    now() [SOLVED]

    Oh ok thanks Nabeel! I've probably missed a few instances of it anyway
  23. Tom

    now() [SOLVED]

    Oh right it's MySQL. Thanks, I've changed it to php date any way
  24. Where is this defined? It doesn't seem to be a php function and I want to change it so all the dates recorded are GMT. I've already set the php default timezone to GMT in local.config.php, however this doesn't seem to affect now(); How can I change it? Thanks
  25. Hi all, I'm looking to make a script to run as an equivalent to that of FSACARS/kACARS etc which instead gets data from online xml feed(s). I just want to be able to feed the live map from it and compile & automatically send PIREPS to the system when they're completed. After looking through the FSACARS and kACARS scripts in the modules folder I'm still not really picking up how I would do it. Would anyone be able to explain how the process works, what files are involved and what data will need to be provided? Thanks
×
×
  • Create New...