Last modified: 2014-06-23 16:07:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54308, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52308 - Display a Sitenotice and no Anonnotice
Display a Sitenotice and no Anonnotice
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.21.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-31 01:47 UTC by Steve
Modified: 2014-06-23 16:07 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Steve 2013-07-31 01:47:52 UTC
I'd like to display a Sitenotice for logged-in users and have no notice displayed for anonymous users.

There should be a way to disable the Anonnotice from inheriting the Sitenotice when it's not in use.
Comment 1 Andre Klapper 2013-07-31 18:10:38 UTC
http://en.wikipedia.org/wiki/MediaWiki_talk:Sitenotice says:

The "Sitenotice", found at MediaWiki:Sitenotice, is displayed at the top of all pages for all logged-in users, and for anonymous users if MediaWiki:Anonnotice is empty; this latter message can be used to display information only to readers, not editors. Alternatively, by 'blanking' the anonnotice and replacing it with <p></p>, the sitenotice can be used as a "logged-in-notice" to display information only to editors. 

I assume that fits your needs?
Comment 2 Steve 2013-07-31 23:33:06 UTC
Nope, because a larger space is created than if there was no notice. One of my Site Notices has a background, and a sliver of that shows if you use this method. When the notice is disabled, none of it should show. For the rest, it's just a larger white space.

That's a hack and not an ideal solution to the problem. Which is why this bug exists.
Comment 3 Andre Klapper 2013-08-01 10:52:30 UTC
Hmm. Even when using something like <span></span> or such, instead of a whole paragraph like <p></p>? Anyway, I'd say that this might be good question for https://www.mediawiki.org/wiki/Project:Support_desk too.
Comment 4 Steve 2013-08-01 10:59:00 UTC
Yes, because as long as the Anon Notice is not in its disabled state, extra HTML is added to the web page. Just using <span></span> adds this code:

<div id="siteNotice"><div lang="en" dir="ltr" id="localNotice">
<p><span></span></p>
</div></div>

Ideally, the Anon Notice should actually be disabled and none of that would show up. I could hide the DIV with CSS, but remember that logged-in users *do* need to see it.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links