Reworked css include/pref/tooltip/accesskey subsystem
authorGabriel Wicke <gwicke@users.mediawiki.org>
Wed, 9 Jun 2004 13:04:52 +0000 (13:04 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Wed, 9 Jun 2004 13:04:52 +0000 (13:04 +0000)
* accesskeys and tooltips moved to js, needs to be customized/localized at MediaWiki:Monobook.js. Saves many calls to wfMsg, reduces page size, shows access key prefix depending on browser/os. Easy to customize by changing the ta array.
* skinphptal underline and justification wired up to produce generated css
* MediaWiki:Skin.css used for anons as well
* addcss call removed from header
* separate js var file included that holds things like the stylepath and the tooltip/accesskey array
* rtl css included from generated css

13 files changed:
includes/Article.php
includes/RawPage.php
includes/Skin.php
includes/SkinCologneBlue.php
includes/SkinNostalgia.php
includes/SkinPHPTal.php
includes/SkinStandard.php
includes/SpecialPreferences.php
languages/Language.php
stylesheets/monobook/main.css
stylesheets/monobook/rtl.css
stylesheets/wikibits.js
templates/xhtml_slim.pt

index f595cb6..87e5633 100644 (file)
@@ -589,7 +589,7 @@ class Article {
                                $this->mTitle->getNamespace() == Namespace::getUser() && 
                                preg_match('/\\/[\\w]+\\.(css|js)$/', $this->mTitle->getDBkey())
                        ) {
-                               $wgOut->addWikiText( wfMsg('usercssjs'));
+                               $wgOut->addWikiText( wfMsg('clearyourcache'));
                                $wgOut->addHTML( '<pre>'.htmlspecialchars($this->mContent)."\n</pre>" );
                        } else if ( $pcache ) {
                                $wgOut->addWikiText( $text, true, $this );
index d0b0297..6705b83 100644 (file)
@@ -8,28 +8,54 @@
 class RawPage {
 
        function RawPage( $article ) {
-               global $wgRequest, $wgInputEncoding;
+               global $wgRequest, $wgInputEncoding, $wgSquidMaxage;
                $allowedCTypes = array('text/x-wiki', 'text/javascript', 'text/css', 'application/x-zope-edit');
                $this->mArticle =& $article;
                $this->mTitle =& $article->mTitle;
+                       
                $ctype = $wgRequest->getText( 'ctype' );
+               $charset = $wgRequest->getText( 'charset' );
+               $smaxage = $wgRequest->getText( 'smaxage' );
+               $maxage = $wgRequest->getText( 'maxage' );
+               $this->mOldId = $wgRequest->getInt( 'oldid' );
+               # special case for 'generated' raw things: user css/js
+               $gen = $wgRequest->getText( 'gen' );
+               if($gen == 'css') {
+                       $this->mGen = $gen;
+                       if($smaxage == '') $smaxage = $wgSquidMaxage;
+                       if(empty($ctype)) $ctype = 'text/css';
+               } else if ($gen == 'js') {
+                       $this->mGen = $gen;
+                       if($smaxage == '') $smaxage = $wgSquidMaxage;
+                       if(empty($ctype)) $ctype = 'text/javascript';
+               } else {
+                       $this->mGen = false;
+               }
+               $this->mCharset = !empty($charset) ? $charset : $wgInputEncoding;
+               $this->mSmaxage = ($smaxage != '') ? $smaxage : 0;
+               $this->mMaxage = ($maxage != '') ? $maxage : 86400;
                if(empty($ctype) or !in_array($ctype, $allowedCTypes)) {
                        $this->mContentType = 'text/x-wiki';
                } else {
                        $this->mContentType = $ctype;
                }
-                       
-               $charset = $wgRequest->getText( 'charset' );
-               $this->mCharset = !empty($charset) ? $charset : $wgInputEncoding;
-               $smaxage = $wgRequest->getText( 'smaxage' );
-               $this->mSmaxage = !empty($smaxage) ? $smaxage : 0;
-               $this->mOldId = $wgRequest->getInt( 'oldid' );
        }
        function view() {
+               global $wgUser, $wgOut;
                header( "Content-type: ".$this->mContentType.'; charset='.$this->mCharset );
                # allow the client to cache this for 24 hours
-               header( 'Cache-Control: s-maxage='.$this->mSmaxage.', max-age=86400' );
-               echo $this->getrawtext();
+               header( 'Cache-Control: s-maxage='.$this->mSmaxage.', max-age='.$this->mMaxage );
+               if($this->mGen) {
+                       $sk = $wgUser->getSkin();
+                       $sk->initPage($wgOut);
+                       if($this->mGen == 'css') {
+                               echo $sk->getUserStylesheet();
+                       } else if($this->mGen == 'js') {
+                               echo $sk->getUserJs();
+                       }
+               } else {
+                       echo $this->getrawtext();
+               }
                wfAbruptExit();
        }
        
index 2e23733..3e6711d 100644 (file)
@@ -63,6 +63,9 @@ class Skin {
        {
                return 'wikistandard.css';
        }
+       function getSkinName() {
+               return "standard";
+       }
 
        function qbSetting()
        {
@@ -152,20 +155,47 @@ class Skin {
        }
 
        function getHeadScripts() {
-               global $wgStylePath;
+               global $wgStylePath, $wgUser, $wgLang;
                $r = "<script type=\"text/javascript\" src=\"{$wgStylePath}/wikibits.js\"></script>\n";
+               if( $wgUser->getID() != 0 ) { # logged in       
+                       $userpage = $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
+                       $userjs = htmlspecialchars($this->makeUrl($userpage.'/'.$this->getSkinName().'.js', 'action=raw&ctype=text/javascript'));
+                       $r .= '<script type="text/javascript" src="'.$userjs."\"></script>\n";
+               }
                return $r;
        }
 
+       # get the user/site-specific stylesheet, SkinPHPTal called from RawPage.php (settings are cached that way)
+       function getUserStylesheet() {
+               global $wgOut, $wgStylePath, $wgLang, $wgUser, $wgRequest, $wgTitle;
+               $sheet = $this->getStylesheet();
+               $action = $wgRequest->getText('action');
+               $s = "@import url(\"$wgStylePath/$sheet\");\n";
+               if($wgLang->isRTL()) $s .= "@import url(\"$wgStylePath/common_rtl.css\");\n";
+               if( $wgUser->getID() != 0 ) { # logged in       
+                       if($wgTitle->isCssSubpage() and $action == 'submit' and  $wgTitle->userCanEditCssJsSubpage()) {
+                               $s .= '@import url('.$this->makeUrl('-','action=raw&gen=css&smaxage=0&maxage=0').');'."\n";
+                               $s .= $wgRequest->getText('wpTextbox1');
+                       } else {
+                               $s .= '@import url('.$this->makeUrl('-','action=raw&gen=css&smaxage=0&maxage=0').');'."\n";
+                               $userpage = $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
+                               $s.= '@import url("'.$this->makeUrl($userpage.'/'.$this->getSkinName(), 'action=raw&ctype=text/css').'");'."\n";
+                       }
+               }
+               $s .= $this->doGetUserStyles();
+               return $s."\n"; 
+       }
+       # placeholder, returns generated js in monobook
+       function getUserJs() {
+               return;
+       }
+       
        function getUserStyles()
        {
                global $wgOut, $wgStylePath, $wgLang;
-               $sheet = $this->getStylesheet();
                $s = "<style type='text/css'>\n";
                $s .= "/*/*/\n"; # <-- Hide the styles from Netscape 4 without hiding them from IE/Mac
-               $s .= "@import url(\"$wgStylePath/$sheet\");\n";
-               if($wgLang->isRTL()) $s .= "@import url(\"$wgStylePath/common_rtl.css\");\n";
-               $s .= $this->doGetUserStyles();
+               $s .= $this->getUserStylesheet();
                $s .= "/* */\n";
                $s .= "</style>\n";
                return $s;
index c0c2a3b..212e393 100644 (file)
@@ -7,6 +7,9 @@ class SkinCologneBlue extends Skin {
        {
                return "cologneblue.css";
        }
+       function getSkinName() {
+               return "cologneblue";
+       }
 
        function doBeforeContent()
        {
@@ -81,8 +84,7 @@ class SkinCologneBlue extends Skin {
        function doGetUserStyles()
        {
                global $wgUser, $wgOut, $wgStyleSheetPath;
-
-               $s = parent::doGetUserStyles();
+               $s = '';
                $qb = $this->qbSetting();
 
                if ( 2 == $qb ) { # Right
@@ -97,6 +99,7 @@ class SkinCologneBlue extends Skin {
                          "#article { margin-left:148px; margin-right: 4px; } \n" .
                          "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE
                }
+               $s .= parent::doGetUserStyles();
                return $s;
        }
        function sysLinks()
index e402ba6..c97c681 100644 (file)
@@ -12,6 +12,9 @@ class SkinNostalgia extends Skin {
        {
                return "nostalgia.css";
        }
+       function getSkinName() {
+               return "nostalgia";
+       }
 
        function doBeforeContent()
        {
index f80fb5c..44f3c9a 100644 (file)
@@ -83,7 +83,7 @@
                        $this->userpageUrlDetails = $this->makeUrlDetails($this->userpage);
                        
                        $this->usercss =  $this->userjs = $this->userjsprev = false;
-                       if( $this->loggedin ) { $this->setupUserCssJs(); }
+                       $this->setupUserCssJs();
 
                        $this->titletxt = $wgTitle->getPrefixedText();
                        
                        $tpl->setRef( "usercss", &$this->usercss);
                        $tpl->setRef( "userjs", &$this->userjs);
                        $tpl->setRef( "userjsprev", &$this->userjsprev);
+                       if($this->loggedin) {
+                               $tpl->set( "jsvarurl", $this->makeUrl('-','action=raw&gen=js&smaxage=0') );
+                       } else {
+                               $tpl->set( "jsvarurl", $this->makeUrl('-','action=raw&gen=js') );
+                       }
                        if( $wgUser->getNewtalk() ) {
                                $usertitle = Title::newFromText( $this->userpage );
                                $usertalktitle = $usertitle->getTalkPage();
                                $personal_urls['userpage'] = array(
                                        'text' => $this->username,
                                        'href' => &$this->userpageUrlDetails['href'],
-                                       'class' => $this->userpageUrlDetails['exists']?false:'new',
-                                       'ttip' => wfMsg('tooltip-userpage'),
-                                       'akey' => wfMsg('accesskey-userpage')
+                                       'class' => $this->userpageUrlDetails['exists']?false:'new'
                                );
                                $usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage);
                                $personal_urls['mytalk'] = array(
                                        'text' => wfMsg('mytalk'),
                                        'href' => &$usertalkUrlDetails['href'],
-                                       'class' => $usertalkUrlDetails['exists']?false:'new',
-                                       'ttip' => wfMsg('tooltip-mytalk'),
-                                       'akey' => wfMsg('accesskey-mytalk')
+                                       'class' => $usertalkUrlDetails['exists']?false:'new'
                                );
                                $personal_urls['preferences'] = array(
                                        'text' => wfMsg('preferences'),
-                                       'href' => $this->makeSpecialUrl('Preferences'),
-                                       'ttip' => wfMsg('tooltip-preferences'),
-                                       'akey' => wfMsg('accesskey-preferences')
+                                       'href' => $this->makeSpecialUrl('Preferences')          
                                );
                                $personal_urls['watchlist'] = array(
                                        'text' => wfMsg('watchlist'),
-                                       'href' => $this->makeSpecialUrl('Watchlist'),
-                                       'ttip' => wfMsg('tooltip-watchlist'),
-                                       'akey' => wfMsg('accesskey-watchlist')
+                                       'href' => $this->makeSpecialUrl('Watchlist')    
                                );
                                $personal_urls['mycontris'] = array(
                                        'text' => wfMsg('mycontris'),
-                                       'href' => $this->makeSpecialUrl('Contributions','target=' . urlencode( $this->username ) ),
-                                       'ttip' => wfMsg('tooltip-mycontris'),
-                                       'akey' => wfMsg('accesskey-mycontris')
+                                       'href' => $this->makeSpecialUrl('Contributions','target=' . urlencode( $this->username ) )              
                                );
                                $personal_urls['logout'] = array(
                                        'text' => wfMsg('userlogout'),
-                                       'href' => $this->makeSpecialUrl('Userlogout','returnto=' . $this->thisurl ),
-                                       'ttip' => wfMsg('tooltip-logout'),
-                                       'akey' => wfMsg('accesskey-logout')
+                                       'href' => $this->makeSpecialUrl('Userlogout','returnto=' . $this->thisurl )             
                                );
                        } else {
                                if( $wgShowIPinHeader && isset(  $_COOKIE[ini_get("session.name")] ) ) {
                                        $personal_urls['anonuserpage'] = array(
                                                'text' => $this->username,
                                                'href' => &$this->userpageUrlDetails['href'],
-                                               'class' => $this->userpageUrlDetails['exists']?false:'new',
-                                               'ttip' => wfMsg('tooltip-anonuserpage'),
-                                               'akey' => wfMsg('accesskey-anonuserpage')
+                                               'class' => $this->userpageUrlDetails['exists']?false:'new'                      
                                        );
                                        $usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage);
                                        $personal_urls['anontalk'] = array(
                                                'text' => wfMsg('anontalk'),
                                                'href' => &$usertalkUrlDetails['href'],
-                                               'class' => $usertalkUrlDetails['exists']?false:'new',
-                                               'ttip' => wfMsg('tooltip-anontalk'),
-                                               'akey' => wfMsg('accesskey-anontalk')
+                                               'class' => $usertalkUrlDetails['exists']?false:'new'
                                        );
                                        $personal_urls['anonlogin'] = array(
                                                'text' => wfMsg('userlogin'),
-                                               'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl ),
-                                               'ttip' => wfMsg('tooltip-login'),
-                                               'akey' => wfMsg('accesskey-login')
+                                               'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl )
                                        );
                                } else {
 
                                        $personal_urls['login'] = array(
                                                'text' => wfMsg('userlogin'),
-                                               'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl ),
-                                               'ttip' => wfMsg('tooltip-login'),
-                                               'akey' => wfMsg('accesskey-login')
+                                               'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl )
                                        );
                                }
                        }
                        
                        if( $this->iscontent ) {
 
-                               $content_actions['article'] = array('class' => (!Namespace::isTalk( $wgTitle->getNamespace())) ? 'selected' : false,
-                               'text' => $this->getNameSpaceWord(),
-                               'href' => $this->makeArticleUrl($this->thispage),
-                               'ttip' => wfMsg('tooltip-article'),
-                               'akey' => wfMsg('accesskey-article'));
+                               $nskey = $this->getNameSpaceKey();
+                               $content_actions[$nskey] = array('class' => (!Namespace::isTalk( $wgTitle->getNamespace())) ? 'selected' : false,
+                               'text' => wfMsg($nskey),
+                               'href' => $this->makeArticleUrl($this->thispage));
 
                                /* set up the classes for the talk link */
                                $talk_class = (Namespace::isTalk( $wgTitle->getNamespace()) ? 'selected' : false);                              
                                        $content_actions['talk'] = array(
                                                'class' => $talk_class,
                                                'text' => wfMsg('talk'),
-                                               'href' => $this->makeTalkUrl($this->titletxt),
-                                               'ttip' => wfMsg('tooltip-talk'),
-                                               'akey' => wfMsg('accesskey-talk')
+                                               'href' => $this->makeTalkUrl($this->titletxt)
                                        );
                                } else {
                                        $content_actions['talk'] = array(
                                                'class' => $talk_class?$talk_class.' new':'new',
                                                'text' => wfMsg('talk'),
-                                               'href' => $this->makeTalkUrl($this->titletxt,'action=edit'),
-                                               'ttip' => wfMsg('tooltip-talk'),
-                                               'akey' => wfMsg('accesskey-talk')
+                                               'href' => $this->makeTalkUrl($this->titletxt,'action=edit')
                                        );
                                }
 
                                        $content_actions['edit'] = array(
                                                'class' => ((($action == 'edit' or $action == 'submit') and $section != 'new') ? 'selected' : '').$istalkclass,
                                                'text' => wfMsg('edit'),
-                                               'href' => $this->makeUrl($this->thispage, 'action=edit'.$oid),
-                                               'ttip' => wfMsg('tooltip-edit'),
-                                               'akey' => wfMsg('accesskey-edit')
+                                               'href' => $this->makeUrl($this->thispage, 'action=edit'.$oid)
                                        );
                                        if ( $istalk ) {
                                                $content_actions['addsection'] = array(
                                                        'class' => $section == 'new'?'selected':false,
                                                        'text' => wfMsg('addsection'),
-                                                       'href' => $this->makeUrl($this->thispage, 'action=edit&section=new'),
-                                                       'ttip' => wfMsg('tooltip-addsection'),
-                                                       'akey' => wfMsg('accesskey-addsection')
+                                                       'href' => $this->makeUrl($this->thispage, 'action=edit&section=new')
                                                );
                                        }
                                } else {
                                        $oid = ( $oldid && ! isset( $diff ) ) ? "&oldid={$oldid}" : '';
-                                       $content_actions['edit'] = array('class' => ($action == 'edit') ? 'selected' : false,
+                                       $content_actions['viewsource'] = array('class' => ($action == 'edit') ? 'selected' : false,
                                        'text' => wfMsg('viewsource'),
-                                       'href' => $this->makeUrl($this->thispage, 'action=edit'.$oid),
-                                       'ttip' => wfMsg('tooltip-viewsource'),
-                                       'akey' => wfMsg('accesskey-viewsource'));
+                                       'href' => $this->makeUrl($this->thispage, 'action=edit'.$oid));
                                }
 
                                if ( $wgTitle->getArticleId() ) {
 
                                        $content_actions['history'] = array('class' => ($action == 'history') ? 'selected' : false,
                                        'text' => wfMsg('history_short'),
-                                       'href' => $this->makeUrl($this->thispage, 'action=history'),
-                                       'ttip' => wfMsg('tooltip-history'),
-                                       'akey' => wfMsg('accesskey-history'));
+                                       'href' => $this->makeUrl($this->thispage, 'action=history'));
 
                                        # XXX: is there a rollback action anywhere or is it planned?
                                        # Don't recall where i got this from...
                                                        $content_actions['protect'] = array(
                                                                'class' => ($action == 'protect') ? 'selected' : false,
                                                                'text' => wfMsg('protect'),
-                                                               'href' => $this->makeUrl($this->thispage, 'action=protect'),
-                                                               'ttip' => wfMsg('tooltip-protect'),
-                                                               'akey' => wfMsg('accesskey-protect')
+                                                               'href' => $this->makeUrl($this->thispage, 'action=protect')
                                                        );
 
                                                } else {
                                                        $content_actions['unprotect'] = array(
                                                                'class' => ($action == 'unprotect') ? 'selected' : false,
                                                                'text' => wfMsg('unprotect'),
-                                                               'href' => $this->makeUrl($this->thispage, 'action=unprotect'),
-                                                               'ttip' => wfMsg('tooltip-protect'),
-                                                               'akey' => wfMsg('accesskey-protect')
+                                                               'href' => $this->makeUrl($this->thispage, 'action=unprotect')                                       
                                                        );
                                                }
                                                $content_actions['delete'] = array(
                                                        'class' => ($action == 'delete') ? 'selected' : false,
                                                        'text' => wfMsg('delete'),
-                                                       'href' => $this->makeUrl($this->thispage, 'action=delete'),
-                                                       'ttip' => wfMsg('tooltip-delete'),
-                                                       'akey' => wfMsg('accesskey-delete')
+                                                       'href' => $this->makeUrl($this->thispage, 'action=delete')
                                                );
                                        }
                                        if ( $wgUser->getID() != 0 ) {
                                                if ( $wgTitle->userCanEdit()) {
                                                        $content_actions['move'] = array('class' => ($wgTitle->getDbKey() == 'Movepage' and $wgTitle->getNamespace == Namespace::getSpecial()) ? 'selected' : false,
                                                        'text' => wfMsg('move'),
-                                                       'href' => $this->makeSpecialUrl('Movepage', 'target='. urlencode( $this->thispage )),
-                                                       'ttip' => wfMsg('tooltip-move'),
-                                                       'akey' => wfMsg('accesskey-move'));
+                                                       'href' => $this->makeSpecialUrl('Movepage', 'target='. urlencode( $this->thispage ))
+                                               );
                                                } else {
                                                        $content_actions['move'] = array('class' => 'inactive',
                                                        'text' => wfMsg('move'),
-                                                       'href' => false,
-                                                       'ttip' => wfMsg('tooltip-nomove'),
-                                                       'akey' => false);
+                                                       'href' => false);
 
                                                }
                                        }
                                                        $content_actions['delete'] = array(
                                                                'class' => false,
                                                                'text' => wfMsg( "undelete_short", $n ),
-                                                               'href' => $this->makeSpecialUrl('Undelete/'.$this->thispage),
-                                                               'ttip' => wfMsg('tooltip-undelete', $n),
-                                                               'akey' => wfMsg('accesskey-undelete')
+                                                               'href' => $this->makeSpecialUrl('Undelete/'.$this->thispage)
                                                        );
                                                }
                                        }
                                        if( !$wgTitle->userIsWatching()) {
                                                $content_actions['watch'] = array('class' => ($action == 'watch' or $action == 'unwatch') ? 'selected' : false,
                                                'text' => wfMsg('watch'),
-                                               'href' => $this->makeUrl($this->thispage, 'action=watch'),
-                                               'ttip' => wfMsg('tooltip-watch'),
-                                               'akey' => wfMsg('accesskey-watch'));
+                                               'href' => $this->makeUrl($this->thispage, 'action=watch'));
                                        } else {
                                                $content_actions['watch'] = array('class' => ($action == 'unwatch' or $action == 'watch') ? 'selected' : false,
                                                'text' => wfMsg('unwatch'),
-                                               'href' => $this->makeUrl($this->thispage, 'action=unwatch'),
-                                               'ttip' => wfMsg('tooltip-unwatch'),
-                                               'akey' => wfMsg('accesskey-unwatch'));
-
+                                               'href' => $this->makeUrl($this->thispage, 'action=unwatch'));
                                        }
                                }
                        } else {
 
                                $content_actions['article'] = array('class' => 'selected',
                                'text' => wfMsg('specialpage'),
-                               'href' => false,
-                               'ttip' => wfMsg('tooltip-specialpage'),
-                               'akey' => false);
+                               'href' => false);
                        }
 
                        return $content_actions;
                        return $nav_urls;
                }
 
-               function getNameSpaceWord () {
+               function getNameSpaceKey () {
                        global $wgTitle;
                        switch ($wgTitle->getNamespace()) { 
                                case NS_MAIN:
                                case NS_TALK:
-                                       return wfMsg('nstab-main');
+                                       return 'nstab-main';
                                case NS_USER:
                                case NS_USER_TALK:
-                                       return wfMsg('nstab-user');
+                                       return 'nstab-user';
                                case NS_MEDIA:
-                                       return wfMsg('nstab-media');
+                                       return 'nstab-media';
                                case NS_SPECIAL:
-                                       return wfMsg('nstab-special');
+                                       return 'nstab-special';
                                case NS_WP:
                                case NS_WP_TALK:
-                                       return wfMsg('nstab-wp');
+                                       return 'nstab-wp';
                                case NS_IMAGE:
                                case NS_IMAGE_TALK:
-                                       return wfMsg('nstab-image');
+                                       return 'nstab-image';
                                case NS_MEDIAWIKI:
                                case NS_MEDIAWIKI_TALK:
-                                       return wfMsg('nstab-mediawiki');
+                                       return 'nstab-mediawiki';
                                case NS_TEMPLATE:
                                case NS_TEMPLATE_TALK:
-                                       return wfMsg('nstab-template');
+                                       return 'nstab-template';
                                case NS_HELP:
                                case NS_HELP_TALK:
-                                       return wfMsg('nstab-help');
+                                       return 'nstab-help';
                                case NS_CATEGORY:
                                case NS_CATEGORY_TALK:
-                                       return wfMsg('nstab-category');
+                                       return 'nstab-category';
                                default:
-                                       return wfMsg('nstab-main');
+                                       return 'nstab-main';
                        }
                }
                /* private */ function setupUserCssJs () {
-                       global $wgRequest, $wgTitle, $wgSquidMaxage;
+                       global $wgRequest, $wgTitle;
                        $action = $wgRequest->getText('action');
-                       # global site css from MediaWiki NS
-                       $this->usercss = '@import url('.
-                       $this->makeNSUrl(ucfirst($this->skinname).'.css', 'action=raw&ctype=text/css&smaxage='.$wgSquidMaxage, NS_MEDIAWIKI).');'."\n";
+                       # generated css
+                       $this->usercss = '@import url('.$this->makeUrl('-','action=raw&gen=css').');'."\n";
                        
-                       if($wgTitle->isCssSubpage() and $action == 'submit' and  $wgTitle->userCanEditCssJsSubpage()) {
-                               // css preview
-                               $this->usercss .= $wgRequest->getText('wpTextbox1');
-                       } else {
-                               $this->usercss .= '@import url('.
-                               $this->makeUrl($this->userpage.'/'.$this->skinname.'.css', 'action=raw&ctype=text/css').');';
+                       if( $this->loggedin ) {
+                               if($wgTitle->isCssSubpage() and $action == 'submit' and  $wgTitle->userCanEditCssJsSubpage()) {
+                                       # generated css
+                                       $this->usercss = '@import url('.$this->makeUrl('-','action=raw&gen=css&smaxage=0&maxage=0').');'."\n";
+                                       // css preview
+                                       $this->usercss .= $wgRequest->getText('wpTextbox1');
+                               } else {
+                                       # generated css
+                                       $this->usercss .= '@import url('.$this->makeUrl('-','action=raw&gen=css&smaxage=0').');'."\n";
+                                       # import user stylesheet
+                                       $this->usercss .= '@import url('.
+                                       $this->makeUrl($this->userpage.'/'.$this->skinname.'.css', 'action=raw&ctype=text/css').');'."\n";
+                               }
+                               if($wgTitle->isJsSubpage() and $action == 'submit' and  $wgTitle->userCanEditCssJsSubpage()) {
+                                       # XXX: additional security check/prompt?
+                                       $this->userjsprev = $wgRequest->getText('wpTextbox1');
+                               } else {
+                                       $this->userjs = $this->makeUrl($this->userpage.'/'.$this->skinname.'.js', 'action=raw&ctype=text/javascript');
+                               }
                        }
-                       if($wgTitle->isJsSubpage() and $action == 'submit' and  $wgTitle->userCanEditCssJsSubpage()) {
-                               # XXX: additional security check/prompt?
-                               $this->userjsprev = $wgRequest->getText('wpTextbox1');
-                       } else {
-                               $this->userjs = $this->makeUrl($this->userpage.'/'.$this->skinname.'.js', 'action=raw&ctype=text/javascript');
+               }
+               # returns css with user-specific options
+               function getUserStylesheet() {
+                       global $wgUser, $wgRequest, $wgTitle, $wgLang, $wgSquidMaxage, $wgStylePath;
+                       $action = $wgRequest->getText('action');
+                       $maxage = $wgRequest->getText('maxage');
+                       $s = "/* generated user stylesheet */\n";
+                       if($wgLang->isRTL()) $s .= '@import url('.$wgStylePath.'/'.$this->skinname.'/rtl.css);'."\n";
+                       $s .= '@import url('.
+                       $this->makeNSUrl(ucfirst($this->skinname).'.css', 'action=raw&ctype=text/css&smaxage='.$wgSquidMaxage, NS_MEDIAWIKI).');'."\n";
+                       if($wgUser->getID() != 0) {
+                               if ( 1 == $wgUser->getOption( "underline" ) ) {
+                                       $s .= "a { text-decoration: underline; }\n";
+                               } else {
+                                       $s .= "a { text-decoration: none; }\n";
+                               }
+                       }
+                       if ( 1 != $wgUser->getOption( "highlightbroken" ) ) {
+                               $s .= "a.new, #quickbar a.new { color: #CC2200; }\n";
+                       }
+                       if ( 1 == $wgUser->getOption( "justify" ) ) {
+                               $s .= "#bodyContent { text-align: justify; }\n";
                        }
+                       return $s;
                }
+               function getUserJs() {
+                       global $wgUser, $wgStylePath;
+                       $s = "/* generated javascript */";
+                       $s .= "var skin = '{$this->skinname}';\nvar stylepath = '{$wgStylePath}';";
+                       $s .= '/* MediaWiki:'.ucfirst($this->skinname)." */\n";
+                       $s .= wfMsg(ucfirst($this->skinname).'.js');
+                       return $s;
+               }
+
        }
 
        class SkinDaVinci extends SkinPHPTal {
index 929fc3e..ba367a3 100644 (file)
@@ -18,12 +18,12 @@ class SkinStandard extends Skin {
        function getUserStyles()
        {
                global $wgStylePath;
-
-               $s = parent::getUserStyles();
+               $s = '';
                if ( 3 == $this->qbSetting() ) { # Floating left
                        $s .= "<style type='text/css'>\n" .
                          "@import '{$wgStylePath}/quickbar.css';\n</style>\n";
                }
+               $s .= parent::getUserStyles();
                return $s;
        }
 
index 49904c0..e060dcb 100644 (file)
@@ -278,6 +278,7 @@ class PreferencesForm {
                $uid = $wgUser->getID();
 
                $wgOut->addWikiText( wfMsg( "prefslogintext", $uname, $uid ) );
+               $wgOut->addWikiText( wfMsg('clearyourcache'));
 
                $qbs = $wgLang->getQuickbarSettings();
                $skinNames = $wgLang->getSkinNames();
@@ -368,6 +369,7 @@ class PreferencesForm {
                        $wgOut->addHTML( "<div><label><input type='radio' name=\"wpQuickbar\"
        value=\"$i\"$checked /> {$qbs[$i]}</label></div>\n" );
                }
+               $wgOut->addHtml('<div class="prefsectiontip">'.wfMsg('qbsettingsnote').'</div>');
                $wgOut->addHtml( "</fieldset>\n\n" );
 
                # Skin setting
index 8b9185d..4739135 100644 (file)
@@ -729,7 +729,7 @@ If you are here by mistake, just click your browser's '''back''' button.",
 'talkpagetext' => '<!-- MediaWiki:talkpagetext -->',
 'anontalkpagetext' => "----''This is the discussion page for an anonymous user who has not created an account yet or who does not use it. We therefore have to use the numerical [[IP address]] to identify him/her. Such an IP address can be shared by several users. If you are an anonymous user and feel that irrelevant comments have been directed at you, please [[Special:Userlogin|create an account or log in]] to avoid future confusion with other anonymous users.'' ",
 'noarticletext' => '(There is currently no text in this page)',
-'usercssjs' => "'''Note:''' After saving, you have to tell your bowser to get the new version: '''Mozilla:''' click ''reload''(or ''ctrl-r''), '''IE / Opera:''' ''ctrl-f5'', '''Safari:''' ''cmd-r'', '''Konqueror''' ''ctrl-r''.",
+'clearyourcache' => "'''Note:''' After saving, you have to clear your browser cache to see the changes: '''Mozilla:''' click ''reload''(or ''ctrl-r''), '''IE / Opera:''' ''ctrl-f5'', '''Safari:''' ''cmd-r'', '''Konqueror''' ''ctrl-r''.",
 'usercssjsyoucanpreview' => "<strong>Tip:</strong> Use the 'Show preview' button to test your new css/js before saving.",
 'usercsspreview' => "'''Remember that you are only previewing your user css, it has not yet been saved!'''",
 'userjspreview' => "'''Remember that you are only testing/previewing your user javascript, it has not yet been saved!'''",
@@ -872,6 +872,7 @@ Your internal ID number is $2.
 See [[{{ns:4}}:User preferences help]] for help deciphering the options.",
 'prefsreset'   => 'Preferences have been reset from storage.',
 'qbsettings'   => 'Quickbar settings', 
+'qbsettingsnote'       => 'This preference only works in the \'Standard\' and the \'CologneBlue\' skin.', 
 'changepassword' => 'Change password',
 'skin'                 => 'Skin',
 'math'                 => 'Rendering math',
@@ -1455,90 +1456,15 @@ amusement.',
 'importhistoryconflict' => 'Conflicting history revision exists (may have imported this page before)',
 
 # Keyboard access keys for power users
-'accesskey-article' => 'a',
-'accesskey-talk' => 't',
-'accesskey-edit' => 'e',
-'accesskey-addsection' => '+',
-'accesskey-viewsource' => 'e',
-'accesskey-history' => 'h',
-'accesskey-protect' => '=',
-'accesskey-delete' => 'd',
-'accesskey-undelete' => 'd',
-'accesskey-move' => 'm',
-'accesskey-watch' => 'w',
-'accesskey-unwatch' => 'w',
-'accesskey-watchlist' => 'l',
-'accesskey-userpage' => '.',
-'accesskey-anonuserpage' => '.',
-'accesskey-mytalk' => 'n',
-'accesskey-anontalk' => 'n',
-'accesskey-preferences' => '',
-'accesskey-mycontris' => 'y',
-'accesskey-login' => 'o',
-'accesskey-logout' => 'o',
-'accesskey-search' => 'f',
-'accesskey-mainpage' => 'z',
-'accesskey-portal' => '',
-'accesskey-randompage' => 'x',
-'accesskey-currentevents' => '',
-'accesskey-sitesupport' => '',
-'accesskey-help' => '',
-'accesskey-recentchanges' => 'r',
-'accesskey-recentchangeslinked' => 'c',
-'accesskey-whatlinkshere' => 'b',
-'accesskey-specialpages' => 'q',
-'accesskey-specialpage' => '',
-'accesskey-upload' => 'u',
 'accesskey-minoredit' => 'i',
 'accesskey-save' => 's',
 'accesskey-preview' => 'p',
-'accesskey-contributions' => '',
-'accesskey-emailuser' => '',
 'accesskey-compareselectedversions' => 'v',
 
-# tooltip help for the main actions
-'tooltip-atom' => 'Atom feed for this page',
-'tooltip-article' => 'View the content page [alt-a]',
-'tooltip-talk' => 'Discussion about the content page [alt-t]',
-'tooltip-edit' => 'You can edit this page. Please use the preview button before saving. [alt-e]',
-'tooltip-addsection' => 'Add a comment to this page. [alt-+]',
-'tooltip-viewsource' => 'This page is protected. You can view its source. [alt-e]',
-'tooltip-history' => 'Past versions of this page, [alt-h]',
-'tooltip-protect' => 'Protect this page [alt-=]',
-'tooltip-delete' => 'Delete this page [alt-d]',
-'tooltip-undelete' => "Restore the $1 edits done to this page before it was deleted [alt-d]",
-'tooltip-move' => 'Move this page [alt-m]',
-'tooltip-nomove' => 'You don\'t have the permissions to move this page',
-'tooltip-watch' => 'Add this page to your watchlist [alt-w]',
-'tooltip-unwatch' => 'Remove this page from your watchlist [alt-w]',
-'tooltip-watchlist' => 'The list of pages you\'re monitoring for changes. [alt-l]',
-'tooltip-userpage' => 'My user page [alt-.]',
-'tooltip-anonuserpage' => 'The user page for the ip you\'re editing as [alt-.]',
-'tooltip-mytalk' => 'My talk page [alt-n]',
-'tooltip-anontalk' => 'Discussion about edits from this ip address [alt-n]',
-'tooltip-preferences' => 'My preferences',
-'tooltip-mycontris' => 'List of my contributions [alt-y]',
-'tooltip-login' => 'You are encouraged to log in, it is not mandatory however. [alt-o]',
-'tooltip-logout' => 'Log out [alt-o]',
-'tooltip-search' => 'Search this wiki [alt-f]',
-'tooltip-mainpage' => 'Visit the Main Page [alt-z]',
-'tooltip-portal' => 'About the project, what you can do, where to find things',
-'tooltip-randompage' => 'Load a random page [alt-x]',
-'tooltip-currentevents' => 'Find background information on current events',
-'tooltip-sitesupport' => 'Support {{SITENAME}}',
-'tooltip-help' => 'The place to find out.',
-'tooltip-recentchanges' => 'The list of recent changes in the wiki. [alt-r]',
-'tooltip-recentchangeslinked' => 'Recent changes in pages linking to this page [alt-c]',
-'tooltip-whatlinkshere' => 'List of all wiki pages that link here [alt-b]',
-'tooltip-specialpages' => 'List of all special pages [alt-q]',
-'tooltip-upload' => 'Upload images or media files [alt-u]',
-'tooltip-specialpage' => 'This is a special page, you can\'t edit the page itself.',
+# tooltip help for some actions, most are in Monobook.js
 'tooltip-minoredit' => 'Mark this as a minor edit [alt-i]',
 'tooltip-save' => 'Save your changes [alt-s]',
 'tooltip-preview' => 'Preview your changes, please use this before saving! [alt-p]',
-'tooltip-contributions' => 'View the list of contributions of this user',
-'tooltip-emailuser' => 'Send a mail to this user',
-'tooltip-rss' => 'RSS feed for this page',
 'tooltip-compareselectedversions' => 'See the differences between the two selected versions of this page. [alt-v]',
 
 # stylesheets
@@ -1565,7 +1491,62 @@ amusement.',
 You might want to check the following regular expression for patterns that are currently blocked:',
 'subcategorycount' => "There are $1 subcategories to this category.",
 'categoryarticlecount' => "There are $1 articles in this category.",
-'usenewcategorypage' => "1\n\nSet first character to \"0\" to disable the new category page layout."
+'usenewcategorypage' => "1\n\nSet first character to \"0\" to disable the new category page layout.",
+
+# Monobook.js: tooltips and access keys for monobook
+'Monobook.js' => '/* tooltips and access keys */
+ta = new Object();
+ta[\'pt-userpage\'] = new Array(\'.\',\'My user page\'); 
+ta[\'pt-anonuserpage\'] = new Array(\'.\',\'The user page for the ip you\\\'re editing as\'); 
+ta[\'pt-mytalk\'] = new Array(\'n\',\'My talk page\'); 
+ta[\'pt-anontalk\'] = new Array(\'n\',\'Discussion about edits from this ip address\'); 
+ta[\'pt-preferences\'] = new Array(\'\',\'My preferences\'); 
+ta[\'pt-watchlist\'] = new Array(\'l\',\'The list of pages you\\\'re monitoring for changes.\'); 
+ta[\'pt-mycontris\'] = new Array(\'y\',\'List of my contributions\'); 
+ta[\'pt-login\'] = new Array(\'o\',\'You are encouraged to log in, it is not mandatory however.\'); 
+ta[\'pt-anonlogin\'] = new Array(\'o\',\'You are encouraged to log in, it is not mandatory however.\'); 
+ta[\'pt-logout\'] = new Array(\'o\',\'Log out\'); 
+ta[\'ca-article\'] = new Array(\'a\',\'View the content page\'); 
+ta[\'ca-talk\'] = new Array(\'t\',\'Discussion about the content page\'); 
+ta[\'ca-edit\'] = new Array(\'e\',\'You can edit this page. Please use the preview button before saving.\'); 
+ta[\'ca-addsection\'] = new Array(\'+\',\'Add a comment to this discussion.\'); 
+ta[\'ca-viewsource\'] = new Array(\'e\',\'This page is protected. You can view its source.\'); 
+ta[\'ca-history\'] = new Array(\'h\',\'Past versions of this page.\'); 
+ta[\'ca-protect\'] = new Array(\'=\',\'Protect this page\'); 
+ta[\'ca-delete\'] = new Array(\'d\',\'Delete this page\'); 
+ta[\'ca-undelete\'] = new Array(\'d\',\'Restore the edits done to this page before it was deleted\'); 
+ta[\'ca-move\'] = new Array(\'m\',\'Move this page\'); 
+ta[\'ca-nomove\'] = new Array(\'\',\'You don\\\'t have the permissions to move this page\'); 
+ta[\'ca-watch\'] = new Array(\'w\',\'Add this page to your watchlist\'); 
+ta[\'ca-unwatch\'] = new Array(\'w\',\'Remove this page from your watchlist\'); 
+ta[\'search\'] = new Array(\'f\',\'Search this wiki\'); 
+ta[\'p-logo\'] = new Array(\'\',\'Main Page\'); 
+ta[\'n-mainpage\'] = new Array(\'z\',\'Visit the Main Page\'); 
+ta[\'n-portal\'] = new Array(\'\',\'About the project, what you can do, where to find things\'); 
+ta[\'n-currentevents\'] = new Array(\'\',\'Find background information on current events\'); 
+ta[\'n-recentchanges\'] = new Array(\'r\',\'The list of recent changes in the wiki.\'); 
+ta[\'n-randompage\'] = new Array(\'x\',\'Load a random page\'); 
+ta[\'n-help\'] = new Array(\'\',\'The place to find out.\'); 
+ta[\'n-sitesupport\'] = new Array(\'\',\'Support us\'); 
+ta[\'t-whatlinkshere\'] = new Array(\'b\',\'List of all wiki pages that link here\'); 
+ta[\'t-recentchangeslinked\'] = new Array(\'c\',\'Recent changes in pages linking to this page\'); 
+ta[\'feed-rss\'] = new Array(\'\',\'RSS feed for this page\'); 
+ta[\'feed-atom\'] = new Array(\'\',\'Atom feed for this page\'); 
+ta[\'t-contributions\'] = new Array(\'\',\'View the list of contributions of this user\'); 
+ta[\'t-emailuser\'] = new Array(\'\',\'Send a mail to this user\'); 
+ta[\'t-upload\'] = new Array(\'u\',\'Upload images or media files\'); 
+ta[\'t-specialpages\'] = new Array(\'q\',\'List of all special pages\'); 
+ta[\'ca-nstab-main\'] = new Array(\'a\',\'View the content page\'); 
+ta[\'ca-nstab-user\'] = new Array(\'a\',\'View the user page\'); 
+ta[\'ca-nstab-media\'] = new Array(\'a\',\'View the media page\'); 
+ta[\'ca-nstab-special\'] = new Array(\'\',\'This is a special page, you can\\\'t edit the page itself.\'); 
+ta[\'ca-nstab-wp\'] = new Array(\'a\',\'View the project page\'); 
+ta[\'ca-nstab-image\'] = new Array(\'a\',\'View the image page\'); 
+ta[\'ca-nstab-mediawiki\'] = new Array(\'a\',\'View the system message\'); 
+ta[\'ca-nstab-template\'] = new Array(\'a\',\'View the template\'); 
+ta[\'ca-nstab-help\'] = new Array(\'a\',\'View the help page\'); 
+ta[\'ca-nstab-category\'] = new Array(\'a\',\'View the category page\'); 
+'
 
 
 );
index a354ec4..5e37b38 100644 (file)
@@ -762,7 +762,7 @@ li#pt-login {
 }
 /* offsets to distinguish the tab groups */
 li#ca-talk { margin-right: 1.6em; }
-li#ca-watch { margin-left: 1.6em; }
+li#ca-watch, li#ca-watch { margin-left: 1.6em; }
 
 
 /*
index b382056..aafcd59 100644 (file)
@@ -102,7 +102,7 @@ li#ca-talk {
     margin-right: auto;
     margin-left: 1.6em;
 }
-li#ca-watch {
+li#ca-watch,li#ca-unwatch {
     margin-right: 1.6em !important;
 }
 
index b5768e1..6a45333 100644 (file)
@@ -1,5 +1,4 @@
 // Wikipedia JavaScript support functions
-
 // if this is true, the toolbar will no longer overwrite the infobox when you move the mouse over individual items
 var noOverwrite=false;
 var alertText;
@@ -21,21 +20,19 @@ function onloadhook () {
     histrowinit();
     unhidetzbutton();
     tabbedprefs();
+    akeytt();
 }
 if (window.addEventListener) window.addEventListener("load",onloadhook,false);
 else if (window.attachEvent) window.attachEvent("onload",onloadhook);
 
 
 // document.write special stylesheet links
-function addcss ( stylepath ) {
-    if (is_opera_preseven) {
-        document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'Opera6Fixes.css">');
-    } else if (is_opera_seven) {
-        document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'Opera7Fixes.css">');
-    } else if (is_khtml) {
-        document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'KHTMLFixes.css">');
-    }
-    return;
+if (is_opera_preseven) {
+    document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera6Fixes.css">');
+} else if (is_opera_seven) {
+    document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera7Fixes.css">');
+} else if (is_khtml) {
+    document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/KHTMLFixes.css">');
 }
 
 // Un-trap us from framesets
@@ -361,3 +358,25 @@ function insertTags(tagOpen, tagClose, sampleText) {
        // reposition cursor if possible
        if (txtarea.createTextRange) txtarea.caretPos = document.selection.createRange().duplicate();
 }
+
+function akeytt() {
+    if(!ta) return;
+    pref = 'alt-';
+    if(is_safari || navigator.userAgent.toLowerCase().indexOf( 'mac' ) + 1 ) pref = 'cmd-';
+    if(is_opera) pref = 'shift-esc-';
+    for(id in ta) {
+        n = document.getElementById(id);
+        if(n){
+            a = n.childNodes[0];
+            if(a){
+                if(ta[id][0].length > 0) {
+                    a.accesskey = ta[id][0];
+                    ak = ' ['+pref+ta[id][0]+']';
+                } else {
+                    ak = '';
+                }
+                a.title = ta[id][1]+ak;
+            }
+        }
+    }
+}
index b1ad90f..f5dac63 100644 (file)
@@ -5,15 +5,13 @@
     <meta http-equiv="Content-Type" content="${mimetype}; charset=${charset}" />
     ${headlinks}
     <title tal:content="pagetitle">Exciting xhtml slimfast</title>
-    <style type="text/css" media="screen">/*<![CDATA[*/ @import "${stylepath}/${skinname}/main.css"; /*]]>*/</style>
-    <style type="text/css" media="projection">/*<![CDATA[*/ @import "${stylepath}/${skinname}/main.css"; /*]]>*/</style>
+    <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "${stylepath}/${skinname}/main.css"; /*]]>*/</style>
     <link rel="stylesheet" type="text/css" media="print" href="${stylepath}/commonPrint.css" />
     <!--[if IE]><style type="text/css" media="all">@import "${stylepath}/${skinname}/IEFixes.css";</style>
     <script type="text/javascript" src="${stylepath}/IEFixes.js"></script>
     <meta http-equiv="imagetoolbar" content="no" /><![endif]-->
+    <script type="text/javascript" tal:attributes="src jsvarurl"></script>
     <script type="text/javascript" src="${stylepath}/wikibits.js"></script>
-    <script type="text/javascript"> /*<![CDATA[*/ if(addcss){addcss('${stylepath}/${skinname}/');} /*]]>*/</script>
-    <style tal:condition="rtl" type="text/css">/*<![CDATA[*/@import "${stylepath}/${skinname}/rtl.css";/*]]>*/</style>
     <style tal:condition="usercss" type="text/css">/*<![CDATA[*/ ${usercss} /*]]>*/</style>
     <script tal:condition="userjs" type="text/javascript" tal:attributes="src userjs"></script><script 
       tal:condition="userjsprev" type="text/javascript">/*<![CDATA[*/${userjsprev}/*]]>*/</script>
@@ -54,7 +52,7 @@
          <ul>
            <li tal:repeat="action content_actions" 
            tal:attributes="id string:ca-${repeat/action/key}; class action/class|default"><a
-             tal:attributes="title action/ttip|default;accesskey action/akey|default;href action/href|default"
+             tal:attributes="href action/href|default"
              tal:content="action/text">Linktext</a></li>
          </ul>
        </div>
@@ -65,7 +63,7 @@
            <ul>
              <li tal:repeat="item personal_urls" 
              tal:attributes="id string:pt-${repeat/item/key};"><a href="myuserpage"
-               tal:attributes="href item/href; accesskey item/akey|default; title item/ttip|default; class item/class|default"
+               tal:attributes="href item/href; class item/class|default"
                tal:content="item/text">Log in</a></li>
            </ul>
          </div>
          <h5 i18n:translate="string:navigation">Navigation</h5>
          <div class="pBody">
            <ul>
-             <li><a href="${nav_urls/mainpage/href}"
-               i18n:attributes="accesskey string:accesskey-mainpage | default; title string:tooltip-mainpage"
+             <li id="n-mainpage"><a href="${nav_urls/mainpage/href}"
                i18n:translate="string:mainpage">Main Page</a></li>
-             <li tal:condition="nav_urls/portal/href"><a href="${nav_urls/portal/href}"
-               i18n:attributes="accesskey string:accesskey-portal | default; title string:tooltip-portal|default"
+             <li id="n-portal" tal:condition="nav_urls/portal/href"><a href="${nav_urls/portal/href}"
                i18n:translate="string:portal">Community Portal</a></li>
-             <li tal:condition="nav_urls/currentevents/href"><a href="${nav_urls/currentevents/href}"
-               i18n:attributes="title string:tooltip-currentevents|default" 
+             <li id="n-currentevents" tal:condition="nav_urls/currentevents/href"><a href="${nav_urls/currentevents/href}"
                i18n:translate="string:currentevents">Current Events</a></li>
-             <li><a href="${nav_urls/recentchanges/href}"
-               i18n:attributes="accesskey string:accesskey-recentchanges|default; title string:tooltip-recentchanges|default" 
+             <li id="n-recentchanges"><a href="${nav_urls/recentchanges/href}"
                i18n:translate="string:recentchanges">Recent Changes</a></li>
-             <li><a href="${nav_urls/randompage/href}"
-               i18n:attributes="accesskey string:accesskey-randompage | default; title string:tooltip-randompage" 
+             <li id="n-randompage"><a href="${nav_urls/randompage/href}"
                i18n:translate="string:randompage">Random Page</a></li>
-             <li><a href="${nav_urls/help/href}"
-               i18n:attributes="title string:tooltip-help|default" 
+             <li id="n-help"><a href="${nav_urls/help/href}"
                i18n:translate="string:help">Help</a></li>
-             <li tal:condition="nav_urls/sitesupport/href"><a href="${nav_urls/sitesupport/href}"
-               i18n:attributes="title string:tooltip-sitesupport|default" 
+             <li id="n-sitesupport" tal:condition="nav_urls/sitesupport/href"><a href="${nav_urls/sitesupport/href}"
                i18n:translate="string:sitesupport">Donations</a></li>
            </ul>
          </div>
          <h5 i18n:translate="string:toolbox">Toolbox</h5>
          <div class="pBody">
            <ul>
-             <li><a href="${nav_urls/whatlinkshere/href}"
-               i18n:attributes="accesskey string:accesskey-whatlinkshere|default; title string:tooltip-whatlinkshere|default" 
+             <li id="t-whatlinkshere"><a href="${nav_urls/whatlinkshere/href}"
                i18n:translate="string:whatlinkshere">What links here</a></li>
-             <li><a href="${nav_urls/recentchangeslinked/href}"
-               i18n:attributes="accesskey string:accesskey-recentchangeslinked|default;title string:tooltip-recentchangeslinked | default"
+             <li id="t-recentchangeslinked"><a href="${nav_urls/recentchangeslinked/href}"
                i18n:translate="string:recentchangeslinked">Related Changes</a></li>
              <li tal:condition="feeds" id="feedlinks">
              <span i18n:translate="string:feedlinks">Feeds:</span>
              <span tal:repeat="feed feeds" 
                tal:attributes="id string:feed-${repeat/feed/key};"><a 
-                 tal:attributes="href feed/href; title feed/ttip|default"
+                 tal:attributes="href feed/href;"
                  tal:content="feed/text">rss</a>&nbsp;</span>
              </li>
-             <li tal:condition="nav_urls/contributions/href"><a href="${nav_urls/contributions/href}"
-               i18n:attributes="accesskey string:accesskey-contributions|default; title string:tooltip-contributions|default" 
+             <li id="t-contributions" tal:condition="nav_urls/contributions/href"><a href="${nav_urls/contributions/href}"
                i18n:translate="string:contributions">Contributions</a></li>
-             <li tal:condition="nav_urls/emailuser/href"><a href="${nav_urls/emailuser/href}"
-               i18n:attributes="accesskey string:accesskey-emailuser|default; title string:tooltip-emailuser|default" 
+             <li id="t-emailuser" tal:condition="nav_urls/emailuser/href"><a href="${nav_urls/emailuser/href}"
                i18n:translate="string:emailuser">Email this user</a></li>
-             <li tal:condition="loggedin"><a href="${nav_urls/upload/href}"
-               i18n:attributes="accesskey string:accesskey-upload|default; title string:tooltip-upload|default" 
+             <li id="t-upload" tal:condition="loggedin"><a href="${nav_urls/upload/href}"
                i18n:translate="string:upload">Upload a file</a></li>
-             <li><a href="${nav_urls/specialpages/href}"
-               i18n:attributes="accesskey string:accesskey-specialpages|default;title string:tooltip-specialpages|default"
+             <li id="t-specialpages"><a href="${nav_urls/specialpages/href}"
                i18n:translate="string:specialpages">Special Pages</a></li>
            </ul>
          </div>