I'm trying to add a "Terms of Service" link to https://freephile.org/wiki following the example at https://www.mediawiki.org/wiki/Manual:Footer but for some reason it's not happening.
In LocalSettings.php ...
// Add a TOS to the footer // https://www.mediawiki.org/wiki/Manual:Hooks/SkinTemplateOutputPageBeforeExec global $wgHooks; $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfTOSLink'; function lfTOSLink( &$skin, &$template ) { // define that msg MediaWiki:Termsofservice shall link to MediaWiki:Termsofservicepage Title $template->set( 'termsofservice', $skin->footerLink( 'termsofservice', 'termsofservicepage' ) ); $template->data['footerlinks']['places'][] = 'termsofservice'; return true; }
I created both the 'interface message'
https://freephile.org/wiki/MediaWiki:Termsofservice
And the page nomination
https://freephile.org/wiki/MediaWiki:Termsofservicepage
I've run maintenance/runJobs.php
There aren't any errors in my log, but the footer remains unchanged.
Any idea why this isn't working?
Thanks,
Greg Rundlett https://eQuality-Tech.com https://freephile.org
Hi,
// Add a TOS to the footer // https://www.mediawiki.org/wiki/Manual:Hooks/SkinTemplateOutputPageBeforeExec global $wgHooks; $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfTOSLink'; function lfTOSLink( &$skin, &$template ) { // define that msg MediaWiki:Termsofservice shall link to MediaWiki:Termsofservicepage Title $template->set( 'termsofservice', $skin->footerLink( 'termsofservice', 'termsofservicepage' ) ); $template->data['footerlinks']['places'][] = 'termsofservice'; return true; }
This worked for me on 1.27. In the *lfTOSLink* function in the code here[0], there is no *&* for the variable *skin* as in your above code. Perhaps try using the same variable names to see if it works and then change to whatever you wish.
mediawiki-l@lists.wikimedia.org