public function getPromoBox( $imgSize = 28, $helpTranslateDomain = TSINT_HELP_CURRENT ) {
		// Logo
		if ( is_int( $imgSize ) && $imgSize > 0 ) {
			$src = '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Tool_labs_logo.svg/'
				. '/' . $imgSize . 'px-Tool_labs_logo.svg.png';
			$src_2x = '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Tool_labs_logo.svg/'
				. '/' . ( $imgSize * 2 ) . 'px-Tool_labs_logo.svg.png';
			$img = IntuitionUtil::tag( '', 'img', [
				'src' => $src,
				'srcset' => "$src 1x, $src_2x 2x",
				'width' => $imgSize,
				'height' => $imgSize,
				'alt' => '',
				'title' => '',
				'class' => 'int-logo',
			] );
		} else {
			$img = '';
		}

		// Promo message
		$promoMsgOpts = [
			'domain' => 'tsintuition',
			'escape' => 'html',
			'raw-variables' => true,
			'variables' => [
				'<a href="//translatewiki.net/">translatewiki.net</a>',
				'<a href="' . $this->dashboardHome . '">Intuition</a>'
			],
		];
		$poweredHtml = $this->msg( 'bl-promo', $promoMsgOpts );

		// "Help translation" link
		$translateGroup = null;
		if ( $helpTranslateDomain === TSINT_HELP_ALL ) {
			$translateGroup = 'tsint-0-all';
			$twLinkText = $this->msg( 'help-translate-all', 'tsintuition' );

		} elseif ( $helpTranslateDomain === TSINT_HELP_CURRENT ) {
			$domain = $this->getDomain();
			$translateGroup = $this->isLocalDomain( $domain ) ? "tsint-{$domain}" : "int-{$domain}";
			$twLinkText = $this->msg( 'help-translate-tool', 'tsintuition' );

		} elseif ( $helpTranslateDomain !== TSINT_HELP_NONE ) {
			// Custom domain
			$domain = $this->normalizeDomain( $helpTranslateDomain );
			$translateGroup = $this->isLocalDomain( $domain ) ? "tsint-{$domain}" : "int-{$domain}";
			$twLinkText = $this->msg( 'help-translate-tool', 'tsintuition' );
		}

		$helpTranslateLink = '';

		if ( $translateGroup ) {
			// https://translatewiki.net/w/i.php?language=nl&title=Special:Translate&group=tsint-0-all
			$twParams = [
				'title' => 'Special:Translate',
				'language' => $this->getLang(),
				'group' => $translateGroup,
			];
			$twParams = http_build_query( $twParams );
			$helpTranslateLink = '<small>(' . IntuitionUtil::tag( $twLinkText, 'a', [
				'href' => "https://translatewiki.net/w/i.php?$twParams",
				'title' => $this->msg( 'help-translate-tooltip', 'tsintuition' )
			] ) . ')</small>';
		}

		// Build output
		return '<div class="int-promobox"><p><a href="' .
			htmlspecialchars( $this->getDashboardReturnToUrl() )
			. "\">$img</a> "
			. "$poweredHtml {$this->dashboardBacklink()} $helpTranslateLink</p></div>";
	}
public function getPromoBox( $imgSize = 28, $helpTranslateDomain = TSINT_HELP_CURRENT ) {
		// Logo
		if ( is_int( $imgSize ) && $imgSize > 0 ) {
			$src = '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Tool_labs_logo.svg/'
				. '/' . $imgSize . 'px-Tool_labs_logo.svg.png';
			$src_2x = '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Tool_labs_logo.svg/'
				. '/' . ( $imgSize * 2 ) . 'px-Tool_labs_logo.svg.png';
			$img = IntuitionUtil::tag( '', 'img', [
				'src' => $src,
				'srcset' => "$src 1x, $src_2x 2x",
				'width' => $imgSize,
				'height' => $imgSize,
				'alt' => '',
				'title' => '',
				'class' => 'int-logo',
			] );
		} else {
			$img = '';
		}

		// Promo message
		$promoMsgOpts = [
			'domain' => 'tsintuition',
			'escape' => 'html',
			'raw-variables' => true,
			'variables' => [
				'<a href="//translatewiki.net/">translatewiki.net</a>',
				'<a href="' . $this->dashboardHome . '">Intuition</a>'
			],
		];
		$poweredHtml = $this->msg( 'bl-promo', $promoMsgOpts );

		// "Help translation" link
		$translateGroup = null;
		if ( $helpTranslateDomain === TSINT_HELP_ALL ) {
			$translateGroup = 'tsint-0-all';
			$twLinkText = $this->msg( 'help-translate-all', 'tsintuition' );

		} elseif ( $helpTranslateDomain === TSINT_HELP_CURRENT ) {
			$domain = $this->getDomain();
			$translateGroup = $this->isLocalDomain( $domain ) ? "tsint-{$domain}" : "int-{$domain}";
			$twLinkText = $this->msg( 'help-translate-tool', 'tsintuition' );

		} elseif ( $helpTranslateDomain !== TSINT_HELP_NONE ) {
			// Custom domain
			$domain = $this->normalizeDomain( $helpTranslateDomain );
			$translateGroup = $this->isLocalDomain( $domain ) ? "tsint-{$domain}" : "int-{$domain}";
			$twLinkText = $this->msg( 'help-translate-tool', 'tsintuition' );
		}

		$helpTranslateLink = '';

		if ( $translateGroup ) {
			// https://translatewiki.net/w/i.php?language=nl&title=Special:Translate&group=tsint-0-all
			$twParams = [
				'title' => 'Special:Translate',
				'language' => $this->getLang(),
				'group' => $translateGroup,
			];
			$twParams = http_build_query( $twParams );
			$helpTranslateLink = '<small>(' . IntuitionUtil::tag( $twLinkText, 'a', [
				'href' => "https://translatewiki.net/w/i.php?$twParams",
				'title' => $this->msg( 'help-translate-tooltip', 'tsintuition' )
			] ) . ')</small>';
		}

		// Build output
		return '<div class="int-promobox"><p><a href="' .
			htmlspecialchars( $this->getDashboardReturnToUrl() )
			. "\">$img</a> "
			. "$poweredHtml {$this->dashboardBacklink()} $helpTranslateLink</p></div>";
	}
public function getPromoBox ( $ imgSize = 28 , $ helpTranslateDomain = TSINT_HELP_CURRENT ) { // Logo if ( is_int ( $ imgSize ) && $ imgSize > 0 ) { $ src = '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Tool_labs_logo.svg/' . '/' . $ imgSize . 'px-Tool_labs_logo.svg.png' ; $ src_2x = '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Tool_labs_logo.svg/' . '/' . ( $ imgSize * 2 ) . 'px-Tool_labs_logo.svg.png' ; $ img = IntuitionUtil :: tag ( '' , 'img' , [ 'src' => $ src , 'srcset' => "$src 1x, $src_2x 2x" , 'width' => $ imgSize , 'height' => $ imgSize , 'alt' => '' , 'title' => '' , 'class' => 'int-logo' , ] ) ; } else { $ img = '' ; } // Promo message $ promoMsgOpts = [ 'domain' => 'tsintuition' , 'escape' => 'html' , 'raw-variables' => true , 'variables' => [ '<a href="//translatewiki.net/">translatewiki.net</a>' , '<a href="' . $ this -> dashboardHome . '">Intuition</a>' ] , ] ; $ poweredHtml = $ this -> msg ( 'bl-promo' , $ promoMsgOpts ) ; // "Help translation" link $ translateGroup = null ; if ( $ helpTranslateDomain === TSINT_HELP_ALL ) { $ translateGroup = 'tsint-0-all' ; $ twLinkText = $ this -> msg ( 'help-translate-all' , 'tsintuition' ) ; } elseif ( $ helpTranslateDomain === TSINT_HELP_CURRENT ) { $ domain = $ this -> getDomain ( ) ; $ translateGroup = $ this -> isLocalDomain ( $ domain ) ? "tsint-{$domain}" : "int-{$domain}" ; $ twLinkText = $ this -> msg ( 'help-translate-tool' , 'tsintuition' ) ; } elseif ( $ helpTranslateDomain !== TSINT_HELP_NONE ) { // Custom domain $ domain = $ this -> normalizeDomain ( $ helpTranslateDomain ) ; $ translateGroup = $ this -> isLocalDomain ( $ domain ) ? "tsint-{$domain}" : "int-{$domain}" ; $ twLinkText = $ this -> msg ( 'help-translate-tool' , 'tsintuition' ) ; } $ helpTranslateLink = '' ; if ( $ translateGroup ) { // https://translatewiki.net/w/i.php?language=nl&title=Special:Translate&group=tsint-0-all $ twParams = [ 'title' => 'Special:Translate' , 'language' => $ this -> getLang ( ) , 'group' => $ translateGroup , ] ; $ twParams = http_build_query ( $ twParams ) ; $ helpTranslateLink = '<small>(' . IntuitionUtil :: tag ( $ twLinkText , 'a' , [ 'href' => "https://translatewiki.net/w/i.php?$twParams" , 'title' => $ this -> msg ( 'help-translate-tooltip' , 'tsintuition' ) ] ) . ')</small>' ; } // Build output return '<div class="int-promobox"><p><a href="' . htmlspecialchars ( $ this -> getDashboardReturnToUrl ( ) ) . "\">$img</a> " . "$poweredHtml {$this->dashboardBacklink()} $helpTranslateLink</p></div>" ; }
Show a promobox on the bottom of your tool.

@param int $imgSize [optional] Defaults to 28px.
Set to 0 to omit the image from the promobox.
@param bool|string|null $helpTranslateDomain [optional] Provide a link to translatewiki.net
where this tool can be translated.
- TSINT_HELP_CURRENT (null): Link to translations for the current domain.
- TSINT_HELP_ALL (true): Link to translations for all domains.
- TSINT_HELP_NONE (false): Disable this link.
- string value: Link to translations for the specified domain.
@return string The HTML for the promo box.
Show a promobox on the bottom of your tool .