Hello

and thank you, Jonathan, for your suggestion.

To make the example [1] work in LocalSettings.php I had to use the following 
code:

$wgHooks['SkinAddFooterLinks'][] = function( $skin, $key, &$footerlinks ) {
       if ( $key === 'places' ) {
               $footerlinks['test1'] = '<A href=#>Test Link 1</a>';
               $footerlinks['test2'] = '<A href=#>Test Link 2</a>';
       }
};

Kind regards
N.

[1] https://www.mediawiki.org/wiki/Manual:Hooks/SkinAddFooterLinks#Example


On 30.12.20 01:18, Jonathan M wrote:
On Mon, Dec 28, 2020 at 2:31 PM Noob <
mediawiki_noob_20201...@ito.in-berlin.de> wrote:


The errors are:
PHP Parse error:  syntax error, unexpected 'public' (T_PUBLIC), expecting
end of
file in /etc/mediawiki/LocalSettings.php on line 186


I think "public static function" goes inside classes, and in
LocalSettings.php just "function" might work. That gets rid of the error,
but I haven't upgraded to 1.35 so can't check whether the code works.


PHP Fatal error:  Uncaught Error: Class 'WebRequest' not found in
/usr/share/mediawiki/includes/HeaderCallback.php:63\nStack trace:\n#0
[internal
function]: MediaWiki\\HeaderCallback::callback()\n#1 {main}\n  thrown in
/usr/share/mediawiki/includes/HeaderCallback.php on line 63


This might disappear when the other error does but the same error appeared
here: https://www.mediawiki.org/wiki/Topic:W02ztr7ierd0ff9l

Best wishes

Jonathan


_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l



_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to