The given code doesn't work with an error saying the function wfMsgForContent() is unknown. Per here, the function seems to have been removed - the recommended is simply to remove the function. I would edit the page myself to add a corrected code snippet, but I'm no great shake at PHP so I wouldn't like to provide something else that's wrong :b
Topic on Manual talk:FAQ
The function that's mentioned in that thead is wfLoadExtensionMessages, not wfMsgForContent!
wfMsgForContent( 'key' );
must be replaced by
wfMessage( 'key' )->inContentLanguage()->text();
I've changed the code to reflect that. But I haven't tested if it works
The extension gives no errors and now adds the link to the main page, like it should. It doesn't remove the 'Discussion' tab but that's a different issue I think.