HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/templates/Generic/logo/config.php
<?php
/**
 * Logo Configuration File
 *
 * This is a PHP file that sets up variables specific for a template.
 * It can also be used to run PHP code for a template.
 *
 */

class template_logo extends LogoMaker
{
	/**
	 * TextFieldCount
	 * If a logo uses a by-line or similar, this can come in handy
	*/
	public $TextFieldCount = 2;

	/**
	 * Name of the recommended template to use this logo for.
	*/
	public $FileType = 'png';

	/*
	 * This defines a background image to be used when displaying the sample/preview logo in the control panel.
	 * i.e. If the text is white, grey or another light colour.
	 * The image path is relative to the directory this current PHP file is in. If the image is in the same directory, then use only the image name and no path information.
	 * @var string
	 */
	public $displayBgImg= 'back.png';
	/**
	 * The constructor for this logo
	 * It should set up the sample text to be used for this logo
	 *
	 * @return void
	 */
	public function __construct()
	{
		parent::__construct();
		$this->Text[0] = 'Website';
		$this->Text[1] = 'Name';
	}

	/**
	 * The configuration function for this logo. It sets up the text and images used to create this logo image.
	 *
	 * @return void
	 */
	public function GenerateLogo()
	{
		$this->NewLogo($this->FileType); // defaults to png. can use jpg or gif as well

		$this->FontPath = dirname(__FILE__) . '/fonts/';
		$this->ImagePath = dirname(__FILE__) . '/';
		$this->TransparentBackground = true;

		$img_width = 200;
		$img_height = 70;

		// we need the height of the text box to position the image and then caculate the text position
		$t_box = $this->TextBox($this->Text[0], 'fortunecity.ttf', 'FF24A4', 45, 0, 0);

		// determine the y position for the text
		$y_pos = 8+(($img_height - $t_box['height'])/2);

		if(strlen($this->Text[0]) > 0) {
			// AddText() - text, font, fontcolor, fontSize (pt), x, y, center on this width
			$text_position = $this->AddText($this->Text[0], 'fortunecity.ttf', '000000', 45, 5, $y_pos);
			$top_right = $text_position['top_right_x']+20;
		}

		if(strlen($this->Text[1]) > 0) {
			// put in our second bit of text
			$text_position2 = $this->AddText($this->Text[1], 'fortunecity.ttf', 'c50206', 45, $text_position['top_right_x'], $y_pos);
			$top_right1 = $text_position2['top_right_x']+20;
		}else{
			$top_right1 = $top_right;
		}
		$this->SetImageSize(max($top_right, $top_right1), $img_height);

		return $this->MakeLogo();
	}
}