https://bugzilla.wikimedia.org/show_bug.cgi?id=4438

--- Comment #10 from Subfader <subfa...@gmail.com> 2011-02-13 12:51:48 UTC ---
Can't get Sparkla's JS solution working
http://test.wikipedia.org/w/index.php?title=User:Splarka/monobook.js&oldid=21972

For those who want to hardcode a solution: includes/Skin.php:

    function getPageClasses( $title ) {
        global $wgRequest;
        $numeric = 'ns-'.$title->getNamespace();
        if( $title->getNamespace() == NS_SPECIAL ) {
            $type = 'ns-special';
        } elseif( $title->isTalkPage() ) {
            $type = 'ns-talk';
        } else {
            $type = 'ns-subject';
        }
        $name = Sanitizer::escapeClass( 'page-'.$title->getPrefixedText() );
      if (!$wgRequest->getVal('action')) {
            $actionValue='view';
            } else {
            $actionValue = $wgRequest->getVal('action');
            }
        $action = 'action-'. $actionValue;
        return "$numeric $type $name $action";
    }

This will add " action-edit" to the body class when you edit a page etc. and
action-view when there is no action.

-- 
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
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to