<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mwiki.costasano.club/index.php?action=history&amp;feed=atom&amp;title=ICT%3AHooks_ClutterReduction</id>
	<title>ICT:Hooks ClutterReduction - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mwiki.costasano.club/index.php?action=history&amp;feed=atom&amp;title=ICT%3AHooks_ClutterReduction"/>
	<link rel="alternate" type="text/html" href="https://mwiki.costasano.club/index.php?title=ICT:Hooks_ClutterReduction&amp;action=history"/>
	<updated>2026-07-23T01:05:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://mwiki.costasano.club/index.php?title=ICT:Hooks_ClutterReduction&amp;diff=559&amp;oldid=prev</id>
		<title>Mngr: Created page with &quot;= ICT:Hooks/ClutterReduction = This page documents the custom MediaWiki hooks used in &#039;&#039;LocalSettings.php&#039;&#039; to reduce interface clutter for clubmembers.   The goal is to present a calm, application‑like interface while preserving full functionality for sysops.  These hooks are skin‑agnostic and work with Vector‑2022 or any other skin.  ----  == 1. Sidebar Control (SkinBuildSidebar) ==  === Purpose === Clubmembers do not need the standard MediaWiki sidebar (Tools, S...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mwiki.costasano.club/index.php?title=ICT:Hooks_ClutterReduction&amp;diff=559&amp;oldid=prev"/>
		<updated>2026-02-11T18:23:00Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= ICT:Hooks/ClutterReduction = This page documents the custom MediaWiki hooks used in &amp;#039;&amp;#039;LocalSettings.php&amp;#039;&amp;#039; to reduce interface clutter for clubmembers.   The goal is to present a calm, application‑like interface while preserving full functionality for sysops.  These hooks are skin‑agnostic and work with Vector‑2022 or any other skin.  ----  == 1. Sidebar Control (SkinBuildSidebar) ==  === Purpose === Clubmembers do not need the standard MediaWiki sidebar (Tools, S...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= ICT:Hooks/ClutterReduction =&lt;br /&gt;
This page documents the custom MediaWiki hooks used in &amp;#039;&amp;#039;LocalSettings.php&amp;#039;&amp;#039; to reduce interface clutter for clubmembers.  &lt;br /&gt;
The goal is to present a calm, application‑like interface while preserving full functionality for sysops.&lt;br /&gt;
&lt;br /&gt;
These hooks are skin‑agnostic and work with Vector‑2022 or any other skin.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 1. Sidebar Control (SkinBuildSidebar) ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
Clubmembers do not need the standard MediaWiki sidebar (Tools, Special pages, Help, etc.).  &lt;br /&gt;
This hook replaces the sidebar depending on the user’s role:&lt;br /&gt;
&lt;br /&gt;
* **Anonymous users** → no sidebar  &lt;br /&gt;
* **Clubmembers** → only a single “Dashboard” link  &lt;br /&gt;
* **Sysops** → full sidebar (default behavior)&lt;br /&gt;
&lt;br /&gt;
This prevents non‑technical users from wandering into system areas and keeps the UI focused on the archive.&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$wgHooks[&amp;#039;SkinBuildSidebar&amp;#039;][] = function ( $skin, &amp;amp;$bar ) {&lt;br /&gt;
    $user = $skin-&amp;gt;getUser();&lt;br /&gt;
&lt;br /&gt;
    # Anonymous: hide everything&lt;br /&gt;
    if ( $user-&amp;gt;isAnon() ) {&lt;br /&gt;
        $bar = [];&lt;br /&gt;
        return true;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    # Clubmembers: show only Dashboard&lt;br /&gt;
    if ( $user-&amp;gt;isAllowed( &amp;#039;edit&amp;#039; ) &amp;amp;&amp;amp; !$user-&amp;gt;isAllowed( &amp;#039;editinterface&amp;#039; ) ) {&lt;br /&gt;
        $bar = [&lt;br /&gt;
            &amp;#039;navigation&amp;#039; =&amp;gt; [&lt;br /&gt;
                [&lt;br /&gt;
                    &amp;#039;text&amp;#039; =&amp;gt; &amp;#039;Dashboard&amp;#039;,&lt;br /&gt;
                    &amp;#039;href&amp;#039; =&amp;gt; &amp;#039;/wiki/Dashboard:Home&amp;#039;&lt;br /&gt;
                ]&lt;br /&gt;
            ]&lt;br /&gt;
        ];&lt;br /&gt;
        return true;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    # Sysops: full sidebar&lt;br /&gt;
    return true;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Why this hook exists ===&lt;br /&gt;
* The standard sidebar exposes too many technical links.  &lt;br /&gt;
* Clubmembers only need one entry point into the archive.  &lt;br /&gt;
* The hook is reversible and easy for successors to understand.  &lt;br /&gt;
* No skin modifications or CSS hacks required.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 2. Action Tabs Control (SkinTemplateNavigation::Universal) ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
On system namespaces (Template, Module, MediaWiki, Category, Form, etc.), clubmembers should not see:&lt;br /&gt;
&lt;br /&gt;
* Edit  &lt;br /&gt;
* View source  &lt;br /&gt;
* History  &lt;br /&gt;
* Move  &lt;br /&gt;
* Delete  &lt;br /&gt;
&lt;br /&gt;
These actions are confusing and potentially dangerous for non‑technical users.  &lt;br /&gt;
Sysops retain full access.&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$wgHooks[&amp;#039;SkinTemplateNavigation::Universal&amp;#039;][] = function ( $skin, &amp;amp;$links ) {&lt;br /&gt;
&lt;br /&gt;
    $user = $skin-&amp;gt;getUser();&lt;br /&gt;
    if ( $user-&amp;gt;isAllowed( &amp;#039;editinterface&amp;#039; ) ) {&lt;br /&gt;
        return true; # sysop sees everything&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $title = $skin-&amp;gt;getTitle();&lt;br /&gt;
    if ( !$title ) return true;&lt;br /&gt;
&lt;br /&gt;
    $ns = $title-&amp;gt;getNamespace();&lt;br /&gt;
&lt;br /&gt;
    # System namespaces to hide tabs for&lt;br /&gt;
    $blocked = [&lt;br /&gt;
        NS_MEDIAWIKI,&lt;br /&gt;
        NS_TEMPLATE,&lt;br /&gt;
        NS_MODULE,&lt;br /&gt;
        NS_HELP,&lt;br /&gt;
        NS_PROJECT,&lt;br /&gt;
        NS_CATEGORY,&lt;br /&gt;
        defined(&amp;#039;PF_NS_FORM&amp;#039;) ? PF_NS_FORM : null,&lt;br /&gt;
    ];&lt;br /&gt;
&lt;br /&gt;
    if ( in_array( $ns, $blocked, true ) ) {&lt;br /&gt;
&lt;br /&gt;
        # Remove edit/viewsource/history tabs&lt;br /&gt;
        unset( $links[&amp;#039;views&amp;#039;][&amp;#039;edit&amp;#039;] );&lt;br /&gt;
        unset( $links[&amp;#039;views&amp;#039;][&amp;#039;viewsource&amp;#039;] );&lt;br /&gt;
        unset( $links[&amp;#039;views&amp;#039;][&amp;#039;history&amp;#039;] );&lt;br /&gt;
&lt;br /&gt;
        # Remove actions like move/delete&lt;br /&gt;
        unset( $links[&amp;#039;actions&amp;#039;][&amp;#039;delete&amp;#039;] );&lt;br /&gt;
        unset( $links[&amp;#039;actions&amp;#039;][&amp;#039;move&amp;#039;] );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Why this hook exists ===&lt;br /&gt;
* Clubmembers should not modify system pages.  &lt;br /&gt;
* Removing these tabs prevents accidental edits or confusion.  &lt;br /&gt;
* Only system namespaces are affected — content pages remain editable.  &lt;br /&gt;
* Keeps the interface calm and focused on the archive.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 3. Design Philosophy ==&lt;br /&gt;
&lt;br /&gt;
These hooks implement the long‑term UI principles for the archive:&lt;br /&gt;
&lt;br /&gt;
=== Calm, application‑like interface ===&lt;br /&gt;
Clubmembers see only what they need — no clutter, no technical distractions.&lt;br /&gt;
&lt;br /&gt;
=== Role‑based clarity ===&lt;br /&gt;
Sysops retain full control; clubmembers get a simplified experience.&lt;br /&gt;
&lt;br /&gt;
=== Successor‑friendly ===&lt;br /&gt;
Hooks are documented, reversible, and do not modify core files or skins.&lt;br /&gt;
&lt;br /&gt;
=== Skin‑agnostic ===&lt;br /&gt;
Works with Vector‑2022 today and any future skin if the system evolves.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;This page is part of the ICT documentation set for the archive infrastructure.&amp;#039;&amp;#039;&lt;/div&gt;</summary>
		<author><name>Mngr</name></author>
	</entry>
</feed>