Jump to content

StartVM

Members
  • Posts

    513
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by StartVM

  1. DJRixton, that first part - irrelevant. Why are you discussing another thread?

    Firstly, what am I doing here? You have provided code for the community to use, and you are receiving feedback. I gave you feedback, i.e backing up what Tom said, and then I asked why you phrased it the way you did.

    Second of all, your argument about the demographics is invalid - hub and pilot ID do not fit the definition you provided. You cannot define someone's demographics, they are what they are. You can't tell someone where they live or what age you are.

    Thirdly, would that mean you are calling your VA perfect, especially right at the launch stage? Regardless, I was only asking what you meant. I was not challenging your word choice.

    Lastly, 'my country' is where your language originated. Given the two above examples it seems that it's in fact your country where words are tossed around differently. Or, more likely, just you.

    The demographics display exactly what the Pilot input. His hub, is something he chose. Pilot ID, uniquely identifyies him. When did I ever say that users of this code had to keep the current format. It was what I used for my VA, and generally one would assume anyone using it would customize it to their liking.

    What does backing up what Tom said have to do with this? I didn't address that part of your post. :P

  2. Agreed, don't bother.

    Why does it say demographic information? That's not demographics? That's just login details. And what did you mean by 'pristine' airline :lol:

    Lol... What do you have to do with any of this? Last few posts you have made have made are completely wrong or off topic. http://forum.phpvms.net/topic/22058-showing-all-schedules-with-searching/ maybe you need to focus on whats important yes?

    Zd5twCx.png

    I don't recall him asking for YOUR input on his design. Removing the display of his schedules had nothing to do with what he wanted. Read the post maybe? ...

    oIH2G0V.png

    If you don't think hub and pilot ID are statistical data then I can't help you.

    At the time of the post "March 01 2014" my VA Hawaiian Virtual was new and boundaries yet to be found.

    uVSylvH.png

    Best adjective? Maybe not, but I am sure my contribution helped out many people. Maybe in your country words are tossed around differently... :P

  3. I don't suppose so...

    "Support Forum

    Any questions or bug reports go here.

    Development Help

    For help and support for the development of addons

    I'm not with bug or developing an addon...

    I need a pice of code to populate a table...

    Please, If you can't help don't aswer...let the admn do this kind of observantion, because they can move this topic if necessary.

    Look through the Code Snipets forum. And see how many requests there are. And how many developers with pre-developed code... :P

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

    Thank you so much for your effort. My question, is it doesn't seem that this attachment will only be included in the registration accepted email. Seems like it would include itself in all emails.

×
×
  • Create New...