Jump to content

Topic on Project:Support desk/Flow

Alternative for depreciated SkinTemplateOutputPageBeforeExec

1
Summary by Spiros71

Just in case this is useful for anyone, the only way I could make it work was with

$wgHooks['SkinAddFooterLinks'][] = function ( Skin $skin, string $key, array &$footerlinks ) {
        if ( $key === 'places' ) {
			$footerlinks['page-id'] = '<a href="https://lsj.gr/wiki/LSJ:Learn_Greek" title="Learn Greek">Learn Greek</a>';
        };
    };
Spiros71 (talkcontribs)

I have been using the following code in LocalSettings.php which was removed and not available in 1.39, is there some other way to achieve the same? I know one can use Manual:Hooks/SkinAddFooterLinks but I am not sure how to adapt the code and using the example code in that page did not produce any result.

$wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) {
	$tpl->set( 'learngreek', $sk->footerLink( 'learngreek', 'learngreekpage' ) );
	$tpl->data['footerlinks']['places'][] = 'learngreek';
	return true;
};