User:Goldbishop/Sidebar

Reason
In response to one of my sites that I host, i needed to lock-down certain sections from the normal user/anon viewers. One way i did this was, to create two forms of the sidebar, Anon_sidebar and Sidebar. Obviously, the Sidebar form is hard-coded into the wiki site and I used this for those registerd users of the site. The second form, Anon_sidebar, is for those that are viewing the site and do not feel the need to register.

Sidebar
This form is very similar to most, I setup various sections of the sidebar. As my site has three navigation sections outside of the normal (information, toolbox, etc), I setup the main Parents in here, as such:

MediaWiki:Sidebar
* SEARCH

* navigation ** mainpage|mainpage-description ** Production|Production ** Core|Core

* source

* project

* Information ** portal-url|portal ** currentevents-url|currentevents ** recentchanges-url|recentchanges ** randompage-url|randompage ** helppage|help

* TOOLBOX

* LANGUAGES

MediaWiki:Anon_sidebar
(viewable at Silverlight 3D wiki)
 * SEARCH


 * navigation
 * Home|mainpage-description
 * Administrativo|Production


 * information
 * portal-url|portal
 * currentevents-url|currentevents
 * helppage|help

1.19
Reviewed the new structure and noted the correct location for this version.

1.15
After developing these two pages, went into the Skin.php page and edited the following section (Manual:Interface/Sidebar)

Common.js
In reference to Manual:Interface/Sidebar, I changed up the code tee-tiny bit to allow me to visibly manage what is available for the anon/users to the site.

Only part i really changed is the way the addOnloadHook function is used, as you will see below. I will not repeat what has already been stated but will simply show you the changes that i made to accomidate what i was using it for.

This file can be accessed through your wiki via  http:// /MediaWiki:Common.js 

I changed the "add" and "remove" actions to "addC", "addP", "removeC" and "removeP" only to clarify if the items being added/removed was a Child (C) or Parent (P).

Parent nodes are those that contain mutliple children, such as "navigation", "toolbox", "information", etc. Child nodes are those that are contained within a Parent node.

WORD OF ADVISE If you are looking to have several parent-child-grandchild relationships, it is best to get an extension that utilizes ajax or java to overlay a menu structure. When using the Sidebar, it should be noted that it should contain only parent-child relationships, going only 1 deep. Any further than that and the reader may not be able to effectively browse your content. Think of the Sidebar as more of a Category-Topic relationship. As long as you keep to a simple 1 tier menu structure, this hack should work just fine.

Suggested Extension(s)
For further lockdown by action (create, edit, delete, etc), it has been suggested to me to use an extension that post-processes the wiki information before being shown to the user. I personally used th(is/ese) on my wiki sites and have had a relatively good outcome. Most of the time the not-so-good outcomes were due to my lack of knowledge of the action groups and as such learned everything i could about that and then the results came out just fine and as i expected.

Lockdown