Jump to content

Badge Edit - Help


CN@ndo

Recommended Posts

Please help me.

Layou am changing the badge of the pilot, but the data are not showing up

so I can make adjustments, can someone help me?

My PilotData.Class.php

public function generateSignature($pilotid)
{
	$pilot = self::getPilotData($pilotid);
	$pilotcode = self::getPilotCode($pilot->code, $pilot->pilotid);

	if(Config::Get('TRANSFER_HOURS_IN_RANKS') === true)
	{
		$totalhours = $pilot->totalhours + $pilot->transferhours;
	}
	else
	{
		$totalhours = $pilot->totalhours;
	}

	# Configure what we want to show on each line
	$output = array();
	$output[] = $pilotcode.' '. $pilot->firstname.' '.$pilot->lastname;
	$output[] = $pilot->rank.', '.$pilot->hub;
	$output[] = 'Total Flights: ' . $pilot->totalflights;
	$output[] = 'Total Hours: ' . $totalhours;

	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/background.png';
	else
		$bgimage = SITE_ROOT.'/lib/signatures/background/'.$pilot->bgimage;

	if(!file_exists($bgimage))
	{
		# Doesn't exist so use the default
		$bgimage = SITE_ROOT.'/lib/signatures/background/background.png';

		if(!file_exists($bgimage))
		{
			return false;
		}
	}

	$img = @imagecreatefrompng($bgimage);
	if(!$img)
	{
		$img = imagecreatetruecolor(250, 350);
	}

	$height = imagesy($img);
	$width = imagesx($img);

	$txtcolor = str_replace('#FFFFFF', '',  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 = Config::Get('SIGNATURE_X_OFFSET'); # How many pixels, from left, to start
	$yoffset = Config::Get('SIGNATURE_Y_OFFSET'); # 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);
	}

Translation

Nome = Name

Matricula = Pilot ID

Cargo = Rank

My link of the Badge View now

At the moment there appears no information

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...