How to hide portions of text from site visitors
I use CSS for that. Hide by default, but in the skin file add according CSS rules to show it for logged in users.
Thanks for the tip, but could you elaborate? Although I learned that in MW:Common.css or the skin's CSS you can define a class like
span.hiddentext { display:none; }
to be applied in a page in this way:
<span class="hiddentext">This text is hidden from view.</span>
so that a portion of text is hidden by default, I couldn’t find any CSS techniques to make things appear again for logged-in users.
What I've done instead is to use the 'group sidebar' from Extension:DynamicSidebar in combination with Extension:CustomSidebar.
You need to edit the skin file, e.g. Monobook.php. If user is logged in (check for userrrights, e.g. "edit") then return
<style type="text/css">
.hiddentext { display:inline !important; }
</style>
Thinking about it again, it would be best to add user status css classes to the body tag. I opened a request for that on bugzilla: https://bugzilla.wikimedia.org/show_bug.cgi?id=34413
Ah, I see, thanks. I don't use Monobook myself, but there are probably equivalent CSS sections in skins such as those of Gumax that could make it work.