Jump to content

Vangelis

Members
  • Content Count

    1024
  • Joined

  • Last visited

Everything posted by Vangelis

  1. Vangelis

    APVacars problems

    This one is the one that i have tested and working
  2. Vangelis

    APVacars problems

    Please make sure you have the latest version of phpvms also make sure your schedules are complete (airline's fleet etc) with first change I will make the error handling in a better way
  3. Vangelis

    Pilot ID Bagde

    Hello For the needs of my VA i created a Pilot badge with a modiefied version of signature function This is the code this is for users that do know a litle bit of php and because it is a litle complicated i will NOT provide any support on that the picture will be saved in the same folder as your signatures in the format id-PILOTID Below is a screenshot where i use it as a possible use for you and the code. The Name the rank and the date are coming dynamic from the database the picture above the name comes dynamic from the avatar that the user has selected if none is selected then the default will show the picture of the rank comes dynamic from the rank that you have as a pilot YOU MUST USE RELATIVE PATH in your admin section or else no pic will come on like with the signature you must have a template so that everything comes to place you have to put it in /lib/signatures/backround/ with the name id.png When you have done everything you need to call the function where ever you think for example whenever you send a pirep . Good luck modiefing it public function generateid($pilotid) { $pilot = PilotData::getPilotData($pilotid); $pilotcode = PilotData::getPilotCode($pilot->code, $pilot->pilotid); if(Config::Get('TRANSFER_HOURS_IN_RANKS') === true) { $totalhours = $pilot->totalhours + $pilot->transferhours; } else { $totalhours = $pilot->totalhours; } $mysqldate = date( 'Y-m-d ', $pilot->joindate ); # Configure what we want to show on each line $output = array(); $output[] = $pilot->firstname.' '.$pilot->lastname; $output[] = $pilotcode; $output[] = $pilot->rank; $output[] = $pilot->retired; $output[] = $mysqldate; if(Config::Get('SIGNATURE_SHOW_EARNINGS') == true) { $output[] = 'Total Earnings: ' . $pilot->totalpay; } # Load up our image # Get the background image the pilot selected if(empty($pilot->bgimage)) $bgimage = SITE_ROOT.'/lib/signatures/background/id.png'; else $bgimage = SITE_ROOT.'/lib/signatures/background/id.png'; if(!file_exists($bgimage)) { # Doesn't exist so use the default $bgimage = SITE_ROOT.'/lib/signatures/background/id.png'; if(!file_exists($bgimage)) { return false; } } $img = @imagecreatefrompng($bgimage); if(!$img) { $img = imagecreatetruecolor(300, 50); } $height = imagesy($img); $width = imagesx($img); $txtcolor = str_replace('#', '', Config::Get('SIGNATURE_TEXT_COLOR')); $color = sscanf($txtcolor, '%2x%2x%2x'); $textcolor = imagecolorallocate($img, $color[0], $color[1], $color[2]); $font = 3; // Set the font-size $xoffset = "150"; # How many pixels, from left, to start $yoffset = "200"; # How many pixels, from top, to start $font = Config::Get('SIGNATURE_FONT_PATH'); $font_size = Config::Get('SIGNATURE_FONT_SIZE'); if(function_exists('imageantialias')) { imageantialias($img, true); } /* Font stuff */ if(!function_exists('imagettftext')) { Config::Set('SIGNATURE_USE_CUSTOM_FONT', false); } # The line height of each item to fit nicely, dynamic if(Config::Get('SIGNATURE_USE_CUSTOM_FONT') == false) { $stepsize = imagefontheight($font); $fontwidth = imagefontwidth($font); } else { // get the font width and step size $bb = imagettfbbox ( $font_size, 0, $font, 'A'); $stepsize = $bb[3] - $bb[5] + Config::Get('SIGNATURE_FONT_PADDING'); $fontwidth = $bb[2] - $bb[0]; } $currline = $yoffset; $total = count($output); if(Config::Get('SIGNATURE_USE_CUSTOM_FONT') == false) { imagestring($img, $font, $xoffset, $currline, $output[$i], $textcolor); } else { // Use TTF $tmp = imagettftext($img, $font_size, 0, 30, 220, $textcolor, $font, $output[0]); $tmp = imagettftext($img, $font_size, 0, 265, 335, $textcolor, $font, $output[2]); $tmp = imagettftext($img, $font_size, 0, 215, 390, $textcolor, $font, $output[4]); if ($output[3]==1) { $tmp = imagettftext($img, $font_size, 0, 240, 230, $textcolor, $font, 'Pilot Retired'); $tmp = imagettftext($img, 40, 50, 130, 300, $textcolor, $font, 'INVALID ID'); } else { $tmp = imagettftext($img, $font_size, 0, 240, 230, $textcolor, $font,'Active Pilot'); } // Flag is placed at the end of of the first line, so have that bounding box there if($i==0) { $flag_bb = $tmp; } } $currline+=$stepsize; # Add the Avatar Picture, line it up with the first line, which is the # pilot code/name if(file_exists(SITE_ROOT.'/lib/avatars/'.$pilotcode.'.png')) { $avatarimg = imagecreatefrompng(SITE_ROOT.'/lib/avatars/'.$pilotcode.'.png'); if(Config::Get('SIGNATURE_USE_CUSTOM_FONT') == false) { $ret = imagecopy($img, $avatarimg, strlen($output[0])*$fontwidth, ($yoffset+($stepsize/2)-5.5), 0, 0, 50, 50); } else { # figure out where it would go $ret = imagecopy($img, $avatarimg, 70, 100, 0, 0, 50, 60); } } else $avatarimg = imagecreatefrompng(SITE_ROOT.'/lib/images/noavatar.png'); if(Config::Get('SIGNATURE_USE_CUSTOM_FONT') == false) { $ret = imagecopy($img, $avatarimg, strlen($output[0])*$fontwidth, ($yoffset+($stepsize/2)-5.5), 0, 0, 50, 50); } else { # figure out where it would go $ret = imagecopy($img, $avatarimg, 70, 100, 0, 0, 50, 50); } # Add the Rank image $ext = substr($pilot->rankimage, strlen($pilot->rankimage)-3, 3); # Get the rank image type, just jpg, gif or png if($ext == 'png') $rankimg = @imagecreatefrompng($pilot->rankimage); elseif($ext == 'gif') $rankimg = @imagecreatefromgif($pilot->rankimage); else $rankimg = @imagecreatefromjpg($pilot->rankimage); if(!$rankimg) { echo '';} else { $ret = imagecopy($img, $rankimg, 250, 260, 0, 0, 100, 60); // imagecopy($img, $rankimg, $width-$r_width-$xoffset, $yoffset, 0, 0, $r_width, $r_height); } if(Config::Get('SIGNATURE_SHOW_COPYRIGHT') == true) { # # DO NOT remove this, as per the phpVMS license $font = 1; $text = 'powered by phpvms, '. SITE_NAME.' '; imagestring($img, $font, $width-(strlen($text)*imagefontwidth($font)), $height-imagefontheight($font), $text, $textcolor); } imagepng($img, SITE_ROOT.SIGNATURE_PATH.'/id-'.$pilotcode.'.png', 1); imagedestroy($img); echo $pilot->retired; }
  4. Vangelis

    Things about VA Site

    You need a cms for this and phpvms is one of many available. I would suggest to see how wamp or xamp works in order to set it up locally and see what the platform can do
  5. Vangelis

    Spam messages

    Just wondering can we do something with the spam posts?
  6. Vangelis

    Sim Brief for phpvms

    I know that many of you where waiting for it, i would like to thank Ashley Jones from virtualthomson - TuiVirtual for the motivitation to make it. You are free to download it at http://baggelis.com/...mbrief-briefing What it does is adding a button to your briefing template and fetch all the info from the simbrief to your website. In order to use it you have to contact with simbrief via email at contact@simbrief.com in order to get an API key for free. Also your pilots need to be registered with simbrief in order to use their services. As it is free please consider buying me a coffee with the donate button Any questions will be answered throught the forum Download has been updated with new instructions as the old one was incorect sorry for the trounble
  7. Vangelis

    Spam messages

    I have some free time to moderate if you want
  8. Vangelis

    Fuel and ACARS | phpVMS v7

    For start phpvms v7 is still in alpha stage and you should not use it for a live website . can yoy provide a username a password and the link of your site to have a look at the error ?
  9. Vangelis

    Sim Brief for phpvms

    Do you have any schedules ? i can seem to find any
  10. Vangelis

    Sim Brief for phpvms

  11. Vangelis

    Help

    it depends on the complexity for example is the template from scratch or a ready html template convertion ?
  12. Vangelis

    port

    All the acars for phpvms 5.* use the post and get protocol with the included php bridge file
  13. Vangelis

    [SOLVED] APVacars V2 Not Working

    can you send me a admin username and password ?
  14. Vangelis

    [SOLVED] APVacars V2 Not Working

    Uninstall all versions and then install with the new exe and press ok on this message it says that the installer is for evaluation purposes
  15. Vangelis

    [SOLVED] APVacars V2 Not Working

    New version up for APVacars V2 for PHPvms 7 https://forum.phpvms.net/files/file/14-acars-software-for-phpvms-version-7/
  16. Vangelis

    [SOLVED] APVacars V2 Not Working

    at the moment there is an issue with the api not sending the bids i have opened an ticket fo nabeel to have a look at it
  17. Vangelis

    Problem z APVacars V2

    even if you update at the moment there is an issue in phpvms where the api for some reason does not send me the bids
  18. Vangelis

    Problem z APVacars V2

    both
  19. Vangelis

    Problem z APVacars V2

    You are using an old version
  20. Vangelis

    All Acars Not Working

    You forgot to mention witch phpvms version you use
  21. Vangelis

    Acars problem

    will check with latest version
  22. Vangelis

    Acars problem

    Patience is a virtue my mother always said For start we need a test username and password for you va in order to check what might be the problem.
  23. Version 0.0.0.6

    1065 downloads

    Acars Software For PHPvms Version 7
  24. Vangelis

    Acars Software For PHPvms Version 7

    Can you open a post in the forum as at the moment you are commenting under the download thanks
  25. Vangelis

    Acars Software For PHPvms Version 7

    for start display a screenshot off the error
×