From e0d308b8ad65a9e34b0b52588a42ed26d52a5fe9 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Wed, 21 Apr 2004 19:23:32 +0000 Subject: [PATCH] missing user page links: contribs and email this user, appearing in the toolbox --- includes/SkinPHPTal.php | 18 ++++++++++++++++++ languages/Language.php | 4 ++++ templates/xhtml_slim.pt | 8 +++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index f5774b8af3..e4050a872f 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -405,6 +405,24 @@ $nav_urls['help'] = array('href' => htmlspecialchars( $this->makeI18nUrl('helppage'))); $nav_urls['upload'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Upload'))); $nav_urls['specialpages'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Specialpages'))); + + + $id=User::idFromName($wgTitle->getText()); + $ip=User::isIP($wgTitle->getText()); + + if($id || $ip) { # both anons and non-anons have contri list + $nav_urls['contributions'] = array( + 'href' => htmlspecialchars( $this->makeSpecialUrl('Contributions', "target=" . $wgTitle->getPartialURL() ) ) + ); + } + if ( 0 != $wgUser->getID() ) { # show only to signed in users + if($id) { # can only email non-anons + $nav_urls['emailuser'] = array( + 'href' => htmlspecialchars( $this->makeSpecialUrl('Emailuser', "target=" . $wgTitle->getPartialURL() ) ) + ); + } + } + return $nav_urls; } diff --git a/languages/Language.php b/languages/Language.php index 8fc1f40fa1..455d6bd0f5 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1495,6 +1495,8 @@ amusement.", 'accesskey-minoredit' => 'i', 'accesskey-save' => 's', 'accesskey-preview' => 'p', +'accesskey-contributions' => '', +'accesskey-emailuser' => '', # tooltip help for the main actions 'tooltip-article' => 'View the article [alt-a]', @@ -1532,6 +1534,8 @@ amusement.", 'tooltip-minoredit' => 'Mark this as a minor edit [alt-i]', 'tooltip-save' => 'Save you 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', # Metadata "nodublincore" => "Dublin Core RDF metadata disabled for this server.", diff --git a/templates/xhtml_slim.pt b/templates/xhtml_slim.pt index 551266db72..51d4472129 100644 --- a/templates/xhtml_slim.pt +++ b/templates/xhtml_slim.pt @@ -140,10 +140,16 @@
  • Related Changes
  • +
  • Contributions
  • +
  • Email this user
  • Special Pages
  • -
  • Upload a file
  • -- 2.20.1