r212 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r211‎ | r212 | r213 >
Date:18:12, 26 February 2002
Author:magnus_manske
Status:old
Tags:
Comment:
Nostalgy skin, completed
Modified paths:
  • /trunk/phpwiki/fpw/wikiPage.php (modified) (history)
  • /trunk/phpwiki/fpw/wikiUser.php (modified) (history)

Diff [purge]

Index: trunk/phpwiki/fpw/wikiPage.php
@@ -973,15 +973,20 @@
974974 if ( isset ( $framed ) and $framed != "top" ) return "" ;
975975 $t = $this->getNiceTitle ( $this->title ) ;
976976 if ( substr_count ( $t , ":" ) > 0 ) $t = ucfirstIntl ( $t ) ;
977 - $ret = "<table ".$user->options["quickBarBackground"]. "width=\"100%\" class=\"topbar\" cellspacing=0>\n<tr>" ;
978 - if ( $user->options["leftImage"] != "" )
979 - $ret .= "<td width=\"1%\" rowspan=2 bgcolor=\"#000000\"><img src=\"".$user->options["leftImage"]."\"></td>" ;
980 - $ret .= "<td valign=top height=1>" ;
981 - if ( $this->isSpecialPage ) {
982 - $ret .= "<font size=\"+3\">".$t."</font>" ;
983 - if ( $action == "" ) {
984 - $ret .= "<br>\n<br>\n<a href=\"".wikiLink("special:whatlinkshere&target=$this->url")."\">$wikiWhatLinksHere</a>" ;
985 - }
 977+
 978+ if ( $user->options["skin"] == "Nostalgy" ) {
 979+ $ret = "<a href=\"".wikiLink("")."\"><img border=0 align=right src=\"$wikiLogoFile\" alt=\"[$wikiMainPage]\"></a>\n" ;
 980+ } else {
 981+ $ret = "<table ".$user->options["quickBarBackground"]. "width=\"100%\" class=\"topbar\" cellspacing=0>\n<tr>" ;
 982+ if ( $user->options["leftImage"] != "" )
 983+ $ret .= "<td width=\"1%\" rowspan=2 bgcolor=\"#000000\"><img src=\"".$user->options["leftImage"]."\"></td>" ;
 984+ $ret .= "<td valign=top height=1>" ;
 985+ if ( $this->isSpecialPage ) {
 986+ $ret .= "<font size=\"+3\">".$t."</font>" ;
 987+ }
 988+ }
 989+ if ( $action == "" ) {
 990+ $ret .= "<br>\n<br>\n<a href=\"".wikiLink("special:whatlinkshere&target=$this->url")."\">$wikiWhatLinksHere</a>" ;
986991 } else {
987992 $ret .= "<font size=\"+3\"><b><u>" ;
988993 if ( $this->secureTitle == $wikiMainPage and $action == "view" ) $ret .= $wikiMainPageTitle.$this->thisVersion ;
@@ -1012,10 +1017,13 @@
10131018 $ret .= "<br>".str_replace ( "$1" , $subText , $wikiOtherLanguagesText ) ;
10141019 }
10151020 }
1016 - $ret .= "</td>\n<td valign=top width=200 rowspan=2 nowrap>".$user->getLink()."<br>" ;
 1021+
 1022+ if ( $user->options["skin"] == "Nostalgy" ) $ret .= " | <b>".$user->getLink()."</b> | " ;
 1023+ else $ret .= "</td>\n<td valign=top width=200 rowspan=2 nowrap>".$user->getLink()."<br>" ;
 1024+
10171025 if ( $user->isLoggedIn ) $ret .= "<a href=\"".wikiLink("special:userLogout")."\">$wikiLogOut</a> | <a href=\"".wikiLink("special:editUserSettings")."\">$wikiPreferences</a>" ;
10181026 else $ret .= "<a href=\"".wikiLink("special:userLogin")."\">$wikiLogIn</a>" ;
1019 - $ret .= " | <a href=\"".wikiLink($wikiHelpLink)."\">$wikiHelp</a><br>\n" ;
 1027+ $ret .= " | <a href=\"".wikiLink($wikiHelpLink)."\">$wikiHelp</a><br>\n" ;
10201028
10211029 # Text encoding
10221030 if(count($wikiEncodingNames) > 1) { # Shortcut for switching character encodings
@@ -1032,9 +1040,14 @@
10331041 }
10341042 }
10351043
1036 - $ret .= "<FORM method=post action=\"".wikiLink("")."\"><INPUT TYPE=text NAME=search SIZE=16 VALUE=\"$search\"><INPUT TYPE=submit value=\"$wikiSearch\"></FORM>" ;
1037 - $ret .= "</td>\n<td rowspan=2 width=1><a href=\"".wikiLink("")."\"><img border=0 src=\"$wikiLogoFile\" alt=\"[$wikiMainPage]\"></a></td></tr>\n" ;
1038 - $ret .= "<tr><td valign=bottom>".$this->getLinkBar()."</td></tr></table>" ;
 1044+ if ( $user->options["skin"] == "Nostalgy" ) {
 1045+ $ret .= $this->getLinkBar()."<hr>\n" ;
 1046+
 1047+ } else {
 1048+ $ret .= "<FORM method=post action=\"".wikiLink("")."\"><INPUT TYPE=text NAME=search SIZE=16 VALUE=\"$search\"><INPUT TYPE=submit value=\"$wikiSearch\"></FORM>" ;
 1049+ $ret .= "</td>\n<td rowspan=2 width=1><a href=\"".wikiLink("")."\"><img border=0 src=\"$wikiLogoFile\" alt=\"[$wikiMainPage]\"></a></td></tr>\n" ;
 1050+ $ret .= "<tr><td valign=bottom>".$this->getLinkBar()."</td></tr></table>" ;
 1051+ }
10391052 return $ret ;
10401053 }
10411054
@@ -1043,8 +1056,7 @@
10441057 global $wikiMainPage , $wikiRecentChanges , $wikiRecentChangesLink , $wikiUpload , $wikiPopularPages , $wikiLongPages , $action ;
10451058 global $user , $oldID , $version , $wikiEditThisPage , $wikiDeleteThisPage , $wikiHistory , $wikiMyWatchlist , $wikiAskSQL ;
10461059 global $wikiStatistics , $wikiNewPages , $wikiOrphans , $wikiMostWanted , $wikiAllPages , $wikiRandomPage , $wikiStubs , $wikiListUsers ;
1047 - global $wikiRecentLinked, $wikiRecentLinkedLink ;
1048 - global $wikiBugReports , $wikiBugReportsLink ;
 1060+ global $wikiRecentLinked, $wikiRecentLinkedLink , $wikiBugReports , $wikiBugReportsLink ;
10491061
10501062 $editOldVersion = "" ;
10511063 if ( $oldID != "" ) $editOldVersion="&oldID=$oldID&version=$version" ;
Index: trunk/phpwiki/fpw/wikiUser.php
@@ -56,7 +56,7 @@
5757 $this->skinBlank() ;
5858 $this->options["background"] = "#FFFFFF" ;
5959 $this->options["text"] = "#000000" ;
60 -# $this->options["forceQuickBar"] = "none" ;
 60+ $this->options["forceQuickBar"] = "none" ;
6161 # $this->options["quickBarBackground"] = " bgcolor=yellow " ;
6262 # $this->options["textTableBackground"] = " bgcolor=\"#444444\"" ;
6363 # $this->options["forceLinks"] = " style=\"color:#0000FF;text-decoration:none\" " ;
@@ -74,6 +74,7 @@
7575 $ret .= "body { ";
7676 $textcolor = $this->options[text];
7777 $bgcolor = $this->options[background];
 78+ if ( $this->options["skin"] == "Nostalgy" ) $namespaceBackground = "" ;
7879 if ( $namespaceBackground != "" ) $bgcolor = $namespaceBackground ;
7980 if ( $textcolor == "" )
8081 $textcolor = "black"; # For un-coloring links. Should be "inherit" but Netscape 4.x messes it up

Status & tagging log