Topic on Project:Support desk

Jump to navigation Jump to search
128.125.52.71 (talkcontribs)

On Manual:Footer, it says to put this in the LocalSettings.php to get a "Terms of Use" in the footer:

$wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) {

$tpl->set( 'termsofuse', $sk->footerLink( 'termsofuse', 'termsofusepage' ) );

    // or to add non-link text:

    $tpl->set( 'footertext', 'Text to show in footer' );

$tpl->data['footerlinks']['places'][] = 'termsofuse';

return true;

};

From there you can put "Terms of Use" in the page MediaWiki:Termsofuse on your wiki, for the link's text and in MediaWiki:Termsofusepage define the title of the page that you want the Terms of Use link to point to. Note, if you do not create these pages on your wiki, then nothing will appear in the footer.


I don't understand this. I made a page MediaWiki:Termsofuse, and in it I put "Terms of Use". This changed the button in the footer to "Terms of Use." But it links to the page mywiki.org/wiki/⧼termsofusepage⧽. How do I get it to link to the page mywiki.org/wiki/Terms_Of_Use without having to use a redirect? In other words, how do I "define the title of the page" that I want the Terms of Use link to point to? I'm using Mediawiki 1.33.0.

128.125.52.71 (talkcontribs)

I got it! I just put "Terms_Of_Use" into body of the page mywiki.org/wiki/MediaWiki:termsofusepage

Thank you for reading

Reply to "Using Manual:Footer"