# eg, "justthis.domain.org" or ".any.subdomain.net"
$wgCookieDomain = "";
$wgCookiePath = "/";
+$wgDisableCookieCheck = false;
$wgAllowExternalImages = true;
$wgMiserMode = false; # Disable database-intensive features
} else if ( $broken == "yes" ) {
$r = " class='new'";
} else {
- $r = "";
+ $r = " class='internal'";
}
if ( 1 == $wgUser->getOption( "hover" ) ) {
} else if ( $broken == "yes" ) {
$r = " class='new'";
} else {
- $r = "";
+ $r = " class='internal'";
}
if ( 1 == $wgUser->getOption( "hover" ) ) {
$s .= $this->pageTitle();
$s .= $this->pageSubtitle() ;
- $s .= getCategories(); // For some odd reason, zhis can't be a function of the object
+ $s .= getCategories(); // For some odd reason, zhis can't be a function of the object
$s .= "\n<p>";
wfProfileOut( $fname );
return $s;
$style = $this->getInternalLinkAttributes( $link, $name );
$s .= " | <a href=\"{$link}\"{$style}>{$name}</a>";
}
-# This will show the "Approve" link if $wgUseApproval=true;
-if ( isset ( $wgUseApproval ) && $wgUseApproval )
-{
- $t = $wgTitle->getDBkey();
- $name = "Approve this article" ;
- $link = "http://test.wikipedia.org/w/magnus/wiki.phtml?title={$t}&action=submit&doit=1" ;
-#wfEscapeHTML( wfImageUrl( $name ) );
- $style = $this->getExternalLinkAttributes( $link, $name );
- $s .= " | <a href=\"{$link}\"{$style}>{$name}</a>" ;
-} }
- if ( "history" == $action || isset( $diff ) || isset( $oldid ) ) {
- $s .= " | " . $this->makeKnownLink( $wgTitle->getPrefixedText(),
- wfMsg( "currentrev" ) );
- }
-
- if ( $wgUser->getNewtalk() ) {
+ # This will show the "Approve" link if $wgUseApproval=true;
+ if ( isset ( $wgUseApproval ) && $wgUseApproval )
+ {
+ $t = $wgTitle->getDBkey();
+ $name = "Approve this article" ;
+ $link = "http://test.wikipedia.org/w/magnus/wiki.phtml?title={$t}&action=submit&doit=1" ;
+ #wfEscapeHTML( wfImageUrl( $name ) );
+ $style = $this->getExternalLinkAttributes( $link, $name );
+ $s .= " | <a href=\"{$link}\"{$style}>{$name}</a>" ;
+ } }
+ if ( "history" == $action || isset( $diff ) || isset( $oldid ) ) {
+ $s .= " | " . $this->makeKnownLink( $wgTitle->getPrefixedText(),
+ wfMsg( "currentrev" ) );
+ }
+
+ if ( $wgUser->getNewtalk() ) {
# do not show "You have new messages" text when we are viewing our
# own talk page
-
- if(!(strcmp($wgTitle->getText(),$wgUser->getName()) == 0 &&
- $wgTitle->getNamespace()==Namespace::getTalk(Namespace::getUser()))) {
- $n =$wgUser->getName();
- $tl = $this->makeKnownLink( $wgLang->getNsText(
- Namespace::getTalk( Namespace::getUser() ) ) . ":{$n}",
- wfMsg("newmessageslink") );
- $s.=" | <strong>". wfMsg( "newmessages", $tl ) . "</strong>";
+
+ if(!(strcmp($wgTitle->getText(),$wgUser->getName()) == 0 &&
+ $wgTitle->getNamespace()==Namespace::getTalk(Namespace::getUser()))) {
+ $n =$wgUser->getName();
+ $tl = $this->makeKnownLink( $wgLang->getNsText(
+ Namespace::getTalk( Namespace::getUser() ) ) . ":{$n}",
+ wfMsg("newmessageslink") );
+ $s.=" | <strong>". wfMsg( "newmessages", $tl ) . "</strong>";
+ }
}
- }
- if( $wgUser->isSysop() &&
- (($wgTitle->getArticleId() == 0) || ($action == "history")) &&
- ($n = $wgTitle->isDeleted() ) ) {
+ if( $wgUser->isSysop() &&
+ (($wgTitle->getArticleId() == 0) || ($action == "history")) &&
+ ($n = $wgTitle->isDeleted() ) ) {
$s .= " | " . wfMsg( "thisisdeleted",
- $this->makeKnownLink(
- $wgLang->SpecialPage( "Undelete/" . $wgTitle->getPrefixedDBkey() ),
- wfMsg( "restorelink", $n ) ) );
- }
+ $this->makeKnownLink(
+ $wgLang->SpecialPage( "Undelete/" . $wgTitle->getPrefixedDBkey() ),
+ wfMsg( "restorelink", $n ) ) );
+ }
return $s;
}
unwatched. Therefore we do not show the "Watch this page" link in edit mode
*/
if ( 0 != $wgUser->getID() && $articleExists) {
- if($action!="edit" && $action!="history" &&
- $action != "submit" )
- {$s .= $sep . $this->watchThisPage(); }
- if ( $wgTitle->userCanEdit() ) $s .= $sep . $this->moveThisPage();
+ if($action!="edit" && $action!="history" &&
+ $action != "submit" )
+ {
+ $s .= $sep . $this->watchThisPage();
+ }
+ if ( $wgTitle->userCanEdit() )
+ $s .= $sep . $this->moveThisPage();
}
if ( $wgUser->isSysop() and $articleExists ) {
$s .= $sep . $this->deleteThisPage() .
$sep . $this->protectThisPage();
}
$s .= $sep . $this->talkLink();
- if ($articleExists && $action !="history") { $s .= $sep . $this->historyLink();}
+ if ($articleExists && $action !="history") {
+ $s .= $sep . $this->historyLink();
+ }
$s.=$sep . $this->whatLinksHere();
if($wgOut->isArticle()) {
$s = $this->makeKnownLink( $n, $t, "action=delete" );
} else {
- $s = wfMsg( "error" );
+ $s = "";
}
return $s;
}
}
$s = $this->makeKnownLink( $n, $t, $q );
} else {
- $s = wfMsg( "error" );
+ $s = "";
}
return $s;
}
return $s;
}
+ function commentLink()
+ {
+ global $wgLang, $wgTitle, $wgLinkCache;
+
+ $tns = $wgTitle->getNamespace();
+ if ( -1 == $tns ) { return ""; }
+
+ $lns = ( Namespace::isTalk( $tns ) ) ? $tns : Namespace::getTalk( $tns );
+
+ # assert Namespace::isTalk( $lns )
+
+ $n = $wgLang->getNsText( $lns );
+ $pn = $wgTitle->getText();
+
+ $link = "{$n}:{$pn}";
+
+ $wgLinkCache->suspend();
+ $s = $this->makeKnownLink($link, wfMsg("postcomment"), "action=edit§ion=new");
+ $wgLinkCache->resume();
+
+ return $s;
+ }
+
# After all the page content is transformed into HTML, it makes
# a final pass through here for things like table backgrounds.
#
$link = $this->makeKnownLink( $artname, $dt, $q );
if ( 0 == $u ) {
- $ul = $this->makeKnownLink( $wgLang->specialPage( "Contributions" ),
+ $ul = $this->makeKnownLink( $wgLang->specialPage( "Contributions" ),
$ut, "target=" . $ut );
} else {
$ul = $this->makeLink( $wgLang->getNsText(
{
global $wgOut, $wgTitle, $wgUser, $wgLang;
+ $tns=$wgTitle->getNamespace();
+
$s = "\n<div id='quickbar'>";
$sep = "<br>";
$s .= $this->menuHead( "qbbrowse" )
. $this->mainPageLink()
. $sep . $this->specialLink( "recentchanges" )
- . $sep . $this->specialLink( "randompage" )
- . $sep . $this->specialLink( "newpages" )
- . $sep . $this->specialLink( "imagelist" )
- . $sep . $this->specialLink( "statistics" )
- . $sep . $this->specialLink( "specialpages" )
- . $sep . $this->bugReportsLink() ;
- if ( wfMsg ( "currentevents" ) != "-" ) $s .= $sep . $this->makeKnownLink( wfMsg( "currentevents" ), "" ) ;
- $s .= "\n";
+ . $sep . $this->specialLink( "randompage" );
+ if ( wfMsg ( "currentevents" ) != "-" ) $s .= $sep . $this->makeKnownLink( wfMsg( "currentevents" ), "" ) ;
+ $s .= "\n";
if ( $wgOut->isArticle() ) {
$s .= $this->menuHead( "qbedit" );
- $s .= "<strong>" . $this->editThisPage() . "</strong>"
- . $sep . $this->makeKnownLink( wfMsg( "edithelppage" ),
- wfMsg( "edithelp" ) );
+ $s .= "<strong>" . $this->editThisPage() . "</strong>";
+
+ $s .= $sep . $this->makeKnownLink( wfMsg( "edithelppage" ), wfMsg( "edithelp" ) );
if ( 0 != $wgUser->getID() ) {
- $s .= $sep . $this->specialLink( "upload" )
- . $sep . $this->moveThisPage();
+ $s .= $sep . $this->moveThisPage();
}
if ( $wgUser->isSysop() ) {
- $s .= $sep . $this->deleteThisPage() .
- $sep . $this->protectThisPage();
+ $dtp = $this->deleteThisPage();
+ if ( "" != $dtp ) {
+ $s .= $sep . $dtp;
+ }
+ $ptp = $this->protectThisPage();
+ if ( "" != $ptp ) {
+ $s .= $sep . $ptp;
+ }
}
$s .= $sep;
$s .= $this->menuHead( "qbpageoptions" );
$s .= $this->talkLink()
+ . $sep . $this->commentLink()
. $sep . $this->printableLink();
if ( 0 != $wgUser->getID() ) {
$s .= $sep . $this->watchThisPage();
}
+
$s .= $sep;
- $s .= $this->menuHead( "qbpageinfo" )
+ $s .= $this->menuHead("qbpageinfo")
. $this->historyLink()
. $sep . $this->whatLinksHere()
. $sep . $this->watchPageLinksLink();
- if ( Namespace::getUser() == $wgTitle->getNamespace() ) {
+ if ( Namespace::getUser() == $tns ) {
$s .= $sep . $this->userContribsLink();
if ( 0 != $wgUser->getID() ) {
$s .= $sep . $this->emailUserLink();
}
$s .= $sep;
}
+
$s .= $this->menuHead( "qbmyoptions" );
if ( 0 != $wgUser->getID() ) {
$name = $wgUser->getName();
} else {
$s .= $this->specialLink( "userlogin" );
}
+
+ $s .= $this->menuHead( "qbspecialpages" )
+ . $this->specialLink( "newpages" )
+ . $sep . $this->specialLink( "imagelist" )
+ . $sep . $this->specialLink( "statistics" )
+ . $sep . $this->bugReportsLink();
+ if ( 0 != $wgUser->getID() ) {
+ $s .= $sep . $this->specialLink( "upload" );
+ }
+
+ $s .= $sep . $this->makeKnownLink( wfMsg("specialpages" ), wfMsg("moredotdotdot") );
+
$s .= $sep . "\n</div>\n";
return $s;
}
wfLocalUrlE( "" ) . "\">";
if ( "" != $label ) { $s .= "{$label}: "; }
- $s .= "<input type=text name=\"search\" size=10 value=\""
- . htmlspecialchars(substr($search,0,256)) . "\">"
- . "<input type=submit value=\"" . wfMsg( "ok" ) . "\"></form>";
+ $s .= "<input type=text name=\"search\" size=14 value=\""
+ . htmlspecialchars(substr($search,0,256)) . "\">"
+ . "<br><input type=submit name=\"go\" value=\"" . wfMsg( "go" ) . "\"> <input type=submit value=\"" . wfMsg( "search" ) . "\"></form>";
return $s;
}
global $wgUser, $wgOut, $wpPassword, $wpRetype, $wpName, $wpRemember;
global $wpEmail, $wgDeferredUpdateList;
+ if (!cookieCheck()) {
+ return;
+ }
+
if (!$wgUser->isAllowedToCreateAccount()) {
userNotPrivilegedMessage();
return;
global $wgUser, $wpName, $wpPassword, $wpRemember;
global $returnto;
+ if (!cookieCheck()) {
+ return;
+ }
+
if ( "" == $wpName ) {
mainLoginForm( wfMsg( "noname" ) );
return;
{
global $wgUser, $wpName, $wgDeferredUpdateList, $wgOutputEncoding;
global $wgCookiePath, $wgCookieDomain, $wgDBname;
-
+
if ( "" == $wpName ) {
mainLoginForm( wfMsg( "noname" ) );
return;
+}
+
+/* private */ function cookieCheck() {
+
+ global $HTTP_COOKIE_VARS, $wgOut, $returnto;
+ global $wgDisableCookieCheck;
+
+ if ( $wgDisableCookieCheck ) {
+ return true;
+ }
+
+ # XXX: kind of crude check to see if cookies are enabled, but it works OK
+
+ if ( "" == $HTTP_COOKIE_VARS[session_name()])
+ {
+ # Don't go back to login page; they won't get time to
+ # enable cookies and send us one, so they'll get this msg again. Instead,
+ # let them enable cookies on the error page, then go back to login page.
+ # XXX: wipes returnto, unfortunately.
+
+ $returnto = "Special:Userlogin";
+ $wgOut->errorpage( "nocookies", "nocookiestext" );
+ return false;
+ }
+
+ return true;
}
?>
function copydirectory( $source, $dest ) {
$handle = opendir( $source );
while ( false !== ( $f = readdir( $handle ) ) ) {
- if ( "." == $f{0} ) continue;
- # Something made all my "CVSs" go lowercase :(
- if ( !strcasecmp( "CVS", $f ) ) continue;
- copyfile( $source, $f, $dest );
+ $fullname = "$source/$f";
+ if ( $f{0} !="." && is_file( $fullname ) ) {
+ copyfile( $source, $f, $dest );
+ }
}
}
"qbfind" => "Find",
"qbbrowse" => "Browse",
"qbedit" => "Edit",
-"qbpageoptions" => "Page options",
-"qbpageinfo" => "Page info",
-"qbmyoptions" => "My options",
+"qbpageoptions" => "This page",
+"qbpageinfo" => "Context",
+"qbmyoptions" => "My pages",
+"qbspecialpages" => "Special pages",
+"moredotdotdot" => "More...",
"mypage" => "My page",
"mytalk" => "My talk",
"currentevents" => "Current events",
email address to them, and it also helps you if you forget your
password.",
"loginerror" => "Login error",
+"nocookies" => "Cookies disabled",
+"nocookiestext" => "Wikipedia uses cookies to log in users. You have cookies disabled. Please enable them and try again.",
"noname" => "You have not specified a valid user name.",
"loginsuccesstitle" => "Login successful",
"loginsuccess" => "You are now logged in to Wikipedia as \"$1\".",
--- /dev/null
+
+body { margin: 0px; padding: 0px; }
+#specialform { display: inline; }
+#content { top: 0; margin: 0; padding: 0; }
+#topbar { padding: 0px; }
+#powersearch {
+ background: #DDEEFF; border-style: solid; border-width: 1; padding: 2;
+}
+#quickbar {
+ width: 140px; top: 18ex; padding: 2px; visibility: visible; z-index: 99;
+}
+#article, #article td, #article th, #article p {
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 10pt; color: black;
+}
+#article p {
+ padding-top: 0; padding-bottom: 0;
+ margin-top: 1ex; margin-bottom: 0;
+}
+p, pre, td, th, li, dd, dt { line-height: 12pt; }
+
+#footer { padding: 4px; }
+#footer form { display: inline; }
+
+#sitetitle {
+ font-family: Times, serif;
+ color: white;
+ font-weight: normal; font-size: 32pt;
+ line-height: 32pt;
+}
+td.top {
+ background-color: #6688AA; color: white;
+ margin-top: 4px; margin-bottom: 4px;
+ padding-top: 0; padding-bottom: 0;
+ text-transform: uppercase;
+ font-family: Verdana, Arial, sans-serif; font-size: 8pt;
+}
+td.top a {
+ font-family: Verdana, Arial, sans-serif;
+ background-color: #6688AA; color: white;
+ text-decoration: none; font-size: 10pt;
+}
+td.bottom {
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 10pt;
+ padding: 0;
+}
+#pagestats {
+ font-family: Verdana, Arial, sans-serif;
+ color: black;
+ font-size: 9pt;
+}
+#sitesub {
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 9pt; font-weight: bold;
+ color: black;
+ padding-top: 0;
+}
+#quickbar {
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 8pt; font-weight: bold; line-height: 9.5pt;
+ text-decoration: none;
+ color: black;
+ padding: 0; margin-top: 0;
+}
+#quickbar a { color: #446688; }
+
+#quickbar h6 {
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 10pt; font-weight: bold; line-height: 12pt;
+ text-decoration: none;
+ color: #666666;
+ padding: 0; margin-bottom: 2px; margin-top: 6px;
+}
+#quickbar form { padding: 0; margin-top: 0; }
+
+h1 { font-family: Arial, Helvetica, sans-serif;
+ color: #666666;
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 18pt; font-weight: bold; line-height: 21pt;
+}
+h1.pagetitle { padding-bottom: 0; margin-bottom: 0; }
+#article p.subtitle {
+ color: #666666; font-size: 11pt; font-weight: bold;
+ padding-top: 0; margin-top: 0; padding-bottom: 1ex;
+}
+
+/* BAD: intended to format links, but formats headings on TOC pages as well
+a { color: #0000FF; }
+*/
+
+a:visited { color: #000080; }
+a.interwiki { color: #00C000; }
+a.interwiki:visited { color: #008000; }
+a.external { color: #00C000; }
+a.external:visited { color: #008000; }
+a.new { color: #FF0000; }
+a.new:visited { color: #800000; }
+a.stub { color:#800080 }
+a.stub:visited { color:#600060 }
+
+a.printable { text-decoration: underline; }
+
+h2, h3, h4, h5, h6 { margin-bottom: 0; }
+small { font-size: 75%; }
+#toc { border:1px solid #8888aa; background-color:#f7f8ff;padding:5px;font-size:95%; }
+
--- /dev/null
+#article { }
+#specialform { display: inline; }
+#powersearch {
+ background: #DDEEFF; border-style: solid; border-width: 1; padding: 2;
+}
+.bodytext { }
+/* BAD: intended to format links, but formats headings on TOC pages as well
+a { color: #0000FF; }
+*/
+a:visited { color: #000080; }
+a.interwiki { color: #00C000; }
+a.interwiki:visited { color: #008000; }
+a.external { color: #00C000; }
+a.external:visited { color: #008000; }
+a.new { color: #FF0000; }
+a.new:visited { color: #800000; }
+
+a.stub { color:#800080 }
+a.stub:visited { color:#600060 }
+
+h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; }
+h2, h3, h4, h5, h6 { margin-bottom: 0; }
+p.subtitle { padding-top: 0; margin-top: 0; }
+#toc { border:1px solid #8888aa; background-color:#f7f8ff;padding:5px;font-size:95%; }
+
--- /dev/null
+#article { padding: 4px; }
+#content { margin: 0; padding: 0; }
+#footer { padding: 4px;font-size:95%; }
+#pagestats { font-size: 9pt; }
+#powersearch {
+ background: #DDEEFF; border-style: solid; border-width: 1px; padding: 2px;
+}
+#quickbar { width: 140px; padding: 4px; visibility: visible; z-index:99;font-size:95%;}
+#topbar { padding: 4px;font-size:95%; }
+#toc { border:1px solid #8888aa; background-color:#f7f8ff;padding:5px;font-size:95%; }
+.bodytext { }
+
+/* BAD: intended to format links, but formats headings on TOC pages as well
+a { color: #0000FF; }
+*/
+
+a:visited { color: #000080; }
+a.interwiki { color: #00C000; }
+a.interwiki:visited { color: #008000; }
+a.external { color: #00C000; }
+a.external:visited { color: #008000; }
+a.new { color: #FF0000; }
+a.new:visited { color: #800000; }
+a.stub { color:#800080 }
+a.stub:visited { color:#600060 }
+
+body { margin: 0px; padding: 4px; }
+form.inline { display: inline; }
+
+/* CHECK MERGE @@@
+ * h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0;
+ * font-size:130%; }
+ * h2 { font-size: 112.5%; }
+ */
+
+h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0;
+font-size:150%; }
+h2 { font-size: 120%; }
+h2, h3, h4, h5, h6 { margin-bottom: 0;}
+h3 { font-size: 106.25%; }
+h4 { font-size: 103.125%; }
+h5 { font-size: 100%; }
+h6 { font-size: 95%; }
+hr.sep { color:gray;height:1px;background-color:gray;}
+p.subpages { font-size:small;}
+p.subtitle { padding-top: 0; margin-top: 0;}
+td { empty-cells:show; }
+td.bottom { border-top: 1px solid gray; }
+td.top { border-bottom: 1px solid gray; }
+/* images */
+div.floatright { float:right;margin:0 0 1em 1em; }
+div.floatright p { font-style: italic; }
+
+/* table standards */
+table.rimage {
+ float:right;
+ width:1pt;
+ margin-left:1em;
+ margin-bottom:1em;
+ text-align:center;
+ font-size:smaller;
+ }
+
+table.country {
+ border-width:1;
+ border-style:solid;
+ padding:2;
+ border-spacing:0;
+ float:right;
+ width:300px;
+ }
+
+table.flag {
+ background-color:#efefef;
+ border-width:0;
+ border-spacing:0;
+ padding:2;
+ }
+
+td.flag {
+ text-align:center;
+ width:140px;
+ }