Jump to content

Kyle

Moderators
  • Posts

    2282
  • Joined

  • Last visited

Posts posted by Kyle

  1. I'm trying to get the stats for multiple hubs to add automatically and show as one number. i.e. our North American region has 3 hubs (KATL,KBOS,KSEA) I want the stats for those hubs to be pulled as one. when I try it the way simpilot said it just shows nothing.

    Try this...

    <?php echo (HubStats::CountFlights(KATL) + HubStats::CountFlights(KBOS) + HubStats::CountFlights(KSEA));?>
    

  2. Ill give that a try.

    Thanks!

    **EDIT**

    Tried it. Still getting like 9 or more decimal places. This is flor flight hours (176.09999999999997)as well as the Top Flight Time (53.599999999999994).

    Would you paste the code where you are getting those decimal places? Something is still messed up, and it should be rounding. ;)

  3. There's some pointers here, you don't want to really be sending large attachment files to people. Try to keep it under 15-20MB as possible, depending on email providers limitations on attachments.

    Better option if you don't want to edit the core files of phpVMS, upload the attachment in your site files, and add a link in the email. (Recommended)

    But if you want to actually send attachments and knowing the risks of modifying core files, then follow along below...

    THIS REQUIRES MODIFYING CORE FILES. BACK UP BEFORE YOU MAKE CHANGES. TAKE NOTE, WHEN YOU UPDATE PHPVMS, THIS OVERWRITES! IF YOU UPDATED YOUR PHPVMS, YOU WILL HAVE TO REDO IT.

    Fortunately, phpVMS has a Mailer class that allows to send attachments, we'll have to make some changes here...

    1) Go to /core/lib/phpmailer/class.phpmailer.php and find this line... (around line 232)

    public static function SendEmail($email, $subject, $message, $fromname='', $fromemail='')
    

    Replace with this...

    public static function SendEmail($email, $subject, $message, $fromname='', $fromemail='', $attachment='')
    

    2) In the same file still, find the following lines... (around lines 294-296)

    $mail->AddAddress($email);
    $mail->Subject = $subject;
    $mail->Body = $message;
    $mail->AltBody = $alt;
    

    Add after the following lines...

    if($attachment != '')
    {
    //We need to define the root, otherwise once this runs, it will start looking in the wrong place from here.
    $mail->AddAttachment(SITE_ROOT.'/'.$attachment);
    }
    

    3) Save the file.

    4) Go to /admin/modules/PilotAdmin/PilotAdmin.php and find this line... (around line 646)

    Util::SendEmail($pilot->email, $subject, $message);
    

    Now here's what I need to explain to you. If you were to upload the welcome.zip file onto your website files, like say if you put it in your root folder along with folders named (admin, core, lib...ETC.)

    You would update the following lines as above... to this...(note the additional three parameters, the first one is the From Name, and the second one is the From Email Address, and the third one is the location of the attachment)

    Util::SendEmail($pilot->email, $subject, $message, '', '', 'welcome.zip');
    

    But if you wanted to put the attachment, welcome.zip in a folder called new_pilots in your root along with the folders named (admin, core, lib...ETC.), then the lines would be appropriate...

    Util::SendEmail($pilot->email, $subject, $message, '', '', 'new_pilots/welcome.zip');
    

    I hope this works, but this isn't tested yet, but I believe this will work.

    Let me know how you make out! ;)

    Cheers!

  4. Hello,

    I´m getting this error at admin panel when accessing to the config menu;

    Notices:
    The template file "//admin/templates/vstaff/add_staff_bar.tpl" doesn't exist in /core/classes/TemplateSet.class.php on line 248
    Notice:
    The template file "//admin/templates/vstaff/add_staff_cat_bar.tpl" doesn't exist in /core/classes/TemplateSet.class.php on line 248
    Notice:
    The template file "//admin/templates/vstaff/all_staff.tpl" doesn't exist in /core/classes/TemplateSet.class.php on line 248
    

    If you could help me ;) thanks a lot!

    Make sure you upload all of the files that you downloaded the module. If you are still getting the error, you may have a faulty downloaded file. Re-download it, and upload it again & overwrite it.

    Cheers! ;)

  5. I know this is very old, but having issues. I got this to work once before and now I can't. Can someone show me some code that is working to round off to 2 decimal places only? I have tried sound, substr and all that good stuff and nothing is working for me.

    Would love some pointers.

    Thanks!

    Ray

    You can do this way...

    <?php echo round($flighthours, 2); ?>
    

    Cheers!

  6. It was on the charts page at the bottom! I was testing the module and my site and no other page had the pop ups only the charts page, but on checking I think it was google chrome adding something as it didn't happen on IE11 or FF, so sorry for the false alarm.

    Gary

    No worries. ;)

  7. Kyle: If you upload diffrent backgrounds, will it give a random signature image to the pilots? Like: ARC100 gets background1.png and ARC101 gets background 7.png etc?

    Not really, your pilots will have to select a background image when they edit their profiles.

    Do i also have to change the setting in a file of some sort so it turns off phpvms default signature?

    I wouldn't recommend removing the background.png, because that is the default signature for each new pilot. Like I said, you can make an background image, name it background.png, and then upload and overwrite it into /lib/signature/backgrounds/ folder. ;)

  8. Upload some background images for the signatures in /lib/signatures/backgrounds/. The default file for the background signatures is background.png. If you want your pilots to use the same background, overwrite the background.png.

    Also be sure to go to your phpVMS Admin, in Maintenance, click on Reset Signatures. ;)

    • Like 1
  9. Don't really expect a speedy support here. People like us or lorathon has real-world priorities. Though, I dealt with lorathon on a few issues before, and the only thing that I did is be patient for him. He will get back with you within a reasonable time frame. So why not that can you be patient for him?

  10. There are enough cheap and unreliable web hosting companies just to rip you off...

    You can try out Site5 - I had no issues with phpVMS with them before, plus they are better in support, even support's right there on LiveChat.

    But one thing from my experience. Stay away from goDaddy, it's not even worth the headache to get phpVMS to work with them.

×
×
  • Create New...