Date: Wed, 18 Jan 2017 17:32:29 +1000
From: "K. Peachey" <p858snake(a)gmail.com>
To: MediaWiki announcements and site admin list
<mediawiki-l(a)lists.wikimedia.org>
Subject: Re: [MediaWiki-l] Using a hook to change the logo
Message-ID:
<CADnECnVS=G+KY0aZDA2echVCf4LaQenyq24SXO1_
mTJXcc64EA(a)mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
You can set a blank logo, then use [[Mediawiki:Group-user.css]] to
overwrite the displayed logo.
Thanks, Peachey, that worked great. I used the following:
/* CSS placed here will affect registered users only */
#p-logo a {
background-image:
url(http://wiki.com/w/wiki_logo.png)
!important;
}
Now, my next question is, how do I make the wiki sitename only visible to
logged-in users? Is there a hook that runs after the User object is set,
but before the <title> is set (or is there some better way to do it)? I
tried the following, and was able to change the text that appears in the
searchbox, but the title remains the same. Is there something I can change
in MediaWiki:Pagetitle to accomplish this?
$wgHooks['BeforePageDisplay'][] = 'changesitename';
function changesitename( $out, $skin ) {
global $wgSitename, $wgUser;
$wgSitename = $wgUser;
}