https://bugzilla.wikimedia.org/show_bug.cgi?id=30046
Web browser: ---
Bug #: 30046
Summary: Adding possibility to get a different sidebar for
logged in and not logged in users
Product: MediaWiki
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: User interface
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
It would be useful, and yet very simple to implement to add the option that the
sidebar is different for logged in and not logged in users.
According to the idea in
http://www.mediawiki.org/wiki/Manual:Interface/Sidebar#Change_sidebar_content_when_logged_in_.28PHP.29
the following changes suffice:
- add two system variables (maybe better names are to be found)
-- $wgTwoSidebars with default value false; if set to true shows a different
sidebar for users not logged in
-- $wgAlternateSidebar for the name of the sidebar for users not logged in,
which defaults to Anon_sidebar or other better name
- in includes/Skin.php, function buildSidebar():
-- at the beginning, add "global $wgUser, $wgTwoSidebars, $wgAlternateSidebar";
-- change the line "$this->addToSidebar( $bar, 'sidebar' );" into:
if ($wgUser->isLoggedIn() && $wgTwoSidebars) $this->addToSidebar( $bar,
'sidebar' );
else $this->addToSidebar( $bar, $wgAlternateSidebar );
I personally tested this solution in my wiki and it works.
Hoping it could be implemented in mediawiki code.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l