# Language class has internationalized names
#
/* private */ $wgValidSkinNames = array(
- 'standard' => "Standard",
+ 'standard' => "Standard",
'nostalgia' => "Nostalgia",
'cologneblue' => "CologneBlue"
);
-if( $wgUseSmarty ) {
- $wgValidSkinNames['smarty'] = "Smarty";
- $wgValidSkinNames['montparnasse'] = "Montparnasse";
-}
if( $wgUsePHPTal ) {
#$wgValidSkinNames[] = "PHPTal";
#$wgValidSkinNames['davinci'] = "DaVinci";
if ( !$wgOut->isArticle() ) return "" ;
$sk = $wgUser->getSkin() ;
$s = "" ;
- $s .= "\n<br />\n";
$s .= $sk->makeKnownLink ( "Special:Categories" , "Categories" , "article=".$wgTitle->getDBkey() ) ;
$t = implode ( " | " , $wgOut->mCategoryLinks ) ;
- if ( $t != "" ) $s .= " : " ;
+ if ( $t != "" ) $s .= ": " ;
$s .= $t ;
- return $s ;
+ return "<p class='catlinks'>$s</p>";
}
class RCCacheEntry extends RecentChange
function initPage( &$out )
{
- global $wgStyleSheetPath;
$fname = "Skin::initPage";
wfProfileIn( $fname );
- $out->addLink( "shortcut icon", "", "/favicon.ico" );
+ $out->addLink( array( "rel" => "shortcut icon", "href" => "/favicon.ico" ) );
+ $this->addMetadataLinks($out);
+
wfProfileOut( $fname );
}
+ function addMetadataLinks( &$out ) {
+ global $wgTitle, $wgEnableDublinCoreRdf, $wgEnableCreativeCommonsRdf, $wgRdfMimeType, $action;
+ global $wgRightsPage, $wgRightsUrl;
+
+ if( $out->isArticleRelated() ) {
+ # note: buggy CC software only reads first "meta" link
+ if( $wgEnableCreativeCommonsRdf ) {
+ $out->addMetadataLink( array(
+ 'title' => 'Creative Commons',
+ 'type' => 'application/rdf+xml',
+ 'href' => $wgTitle->getLocalURL( "action=creativecommons") ) );
+ }
+ if( $wgEnableDublinCoreRdf ) {
+ $out->addMetadataLink( array(
+ 'title' => 'Dublin Core',
+ 'type' => 'application/rdf+xml',
+ 'href' => $wgTitle->getLocalURL( "action=dublincore" ) ) );
+ }
+ }
+ $copyright = "";
+ if( $wgRightsPage ) {
+ $copy = Title::newFromText( $wgRightsPage );
+ if( $copy ) {
+ $copyright = $copy->getLocalURL();
+ }
+ }
+ if( !$copyright && $wgRightsUrl ) {
+ $copyright = $wgRightsUrl;
+ }
+ if( $copyright ) {
+ $out->addLink( array(
+ "rel" => "copyright",
+ "href" => $copyright ) );
+ }
+ }
+
function outputPage( &$out ) {
global $wgDebugComments;
} else {
# CHECK MERGE @@@
# Force no underline
- $s .= "a.stub, a.new, a.internal, a.external { " .
+ $s .= "a { " .
"text-decoration: none; }\n";
}
if ( 1 == $wgUser->getOption( "highlightbroken" ) ) {
(!$wgTitle->isProtected() || $wgUser->isSysop()) ) {
$t = wfMsg( "editthispage" );
$oid = $red = "";
- if ( $redirect ) {
+ if ( !empty($redirect) ) {
$red = "&redirect={$redirect}";
}
if ( !empty($oldid) && ! isset( $diff ) ) {
if($wgLang->isRTL()) $left = !$left;
if ( !$shove ) {
- $s .= "<td class='top' align=left valign=top rowspan='{$rows}'>\n" .
+ $s .= "<td class='top' align='left' valign='top' rowspan='{$rows}'>\n" .
$this->logoText() . "</td>";
} elseif( $left ) {
$s .= $this->getQuickbarCompensator( $rows );
$action = $wgRequest->getText( 'action' );
$s = $this->printableLink();
- if ( wfMsg ( "disclaimers" ) != "-" ) $s .= " | " . $this->makeKnownLink( wfMsg( "disclaimerpage" ), wfMsg( "disclaimers" ) ) ;
+ if ( wfMsg ( "disclaimers" ) != "" ) $s .= " | " . $this->makeKnownLink( wfMsg( "disclaimerpage" ), wfMsg( "disclaimers" ) ) ;
if ( $wgOut->isArticleRelated() ) {
if ( $wgTitle->getNamespace() == Namespace::getImage() ) {
{
global $wgOut, $wgTitle, $wgUser;
- $s = "<h1 class='pagetitle'>" . $wgOut->getPageTitle() . "</h1>";
+ $s = "<h1 class='pagetitle'>" . htmlspecialchars( $wgOut->getPageTitle() ) . "</h1>";
if($wgUser->getOption("editsectiononrightclick") && $wgTitle->userCanEdit()) { $s=$this->editSectionScript(0,$s);}
return $s;
}
global $wgExtraSubtitle;
$sub = wfMsg( "fromwikipedia" ) . $wgExtraSubtitle;
}
- if($wgOut->isArticle() && $wgNamespacesWithSubpages[$wgTitle->getNamespace()]) {
+ if($wgOut->isArticle() && !empty($wgNamespacesWithSubpages[$wgTitle->getNamespace()])) {
$ptext=$wgTitle->getPrefixedText();
if(preg_match("/\//",$ptext)) {
$sub.="</p><p class='subpages'>";
}
}
$s .= $this->lastModified();
- $s .= " " . wfMsg( "gnunote" );
- return $s;
+ return $s . " " . $this->getCopyright();
+ }
+
+ function getCopyright() {
+ global $wgRightsPage, $wgRightsUrl, $wgRightsText;
+ $out = "";
+ if( $wgRightsPage ) {
+ $link = $this->makeKnownLink( $wgRightsPage, $wgRightsText );
+ } elseif( $wgRightsUrl ) {
+ $link = $this->makeExternalLink( $wgRightsUrl, $wgRightsText );
+ } else {
+ # Give up now
+ return $out;
+ }
+ $out .= wfMsg( "copyright", $link );
+ return $out;
+ }
+
+ function getCopyrightIcon() {
+ global $wgRightsPage, $wgRightsUrl, $wgRightsText, $wgRightsIcon;
+ $out = "";
+ if( $wgRightsIcon ) {
+ $icon = htmlspecialchars( $wgRightsIcon );
+ if( $wgRightsUrl ) {
+ $url = htmlspecialchars( $wgRightsUrl );
+ $out .= "<a href=\"$url\">";
+ }
+ $text = htmlspecialchars( $wgRightsText );
+ $out .= "<img src=\"$icon\" alt='$text' />";
+ if( $wgRightsUrl ) {
+ $out .= "</a>";
+ }
+ }
+ return $out;
+ }
+
+ function getPoweredBy() {
+ global $wgUploadPath;
+ $url = htmlspecialchars( "$wgUploadPath/poweredby_mediawiki_88x31.png" );
+ $img = "<a href='http://www.mediawiki.org/'><img src='$url' alt='MediaWiki' /></a>";
+ return $img;
}
function lastModified()
$mp = wfMsg( "mainpage" );
$titleObj = Title::newFromText( $mp );
$s = "<a href=\"" . $titleObj->escapeLocalURL()
- . "\"><img{$a} border='0' src=\""
+ . "\"><img{$a} src=\""
. $this->getLogo() . "\" alt=\"" . "[{$mp}]\" /></a>";
return $s;
}
}
// only show watchlist link if logged in
- if ( wfMsg ( "currentevents" ) != "-" ) $s .= $sep . $this->makeKnownLink( wfMsg( "currentevents" ), "" ) ;
+ if ( wfMsg ( "currentevents" ) != "" ) $s .= $sep . $this->makeKnownLink( wfMsg( "currentevents" ), "" ) ;
$s .= "\n<br /><hr class='sep' />";
$articleExists = $wgTitle->getArticleId();
if ( $wgOut->isArticle() || $action =="edit" || $action =="history" || $wpPreview) {
$link = $nstext . ":" . $link ;
}
- $s .= $this->makeLink( $link, $text );
+ $s .= $this->makeLink( $link, $text );
} elseif( $wgTitle->getNamespace() != Namespace::getSpecial() ) {
# we just throw in a "New page" text to tell the user that he's in edit mode,
# and to avoid messing with the separator that is prepended to the next item
$spp = $wgLang->specialPage( "Specialpages" );
$s = "<form id=\"specialpages\" method=\"get\" class=\"inline\" " .
- "action=\"{$wgServer}{$wgRedirectScript}\">\n";
+ "action=\"" . htmlspecialchars( "{$wgServer}{$wgRedirectScript}" ) . "\">\n";
$s .= "<select name=\"wpDropdown\">\n";
$s .= "<option value=\"{$spp}\">{$sp}</option>\n";
$s .= "<option value=\"{$p}\">{$desc}</option>\n";
}
$s .= "</select>\n";
- $s .= "<input type=submit value=\"{$go}\" name=redirect>\n";
+ $s .= "<input type='submit' value=\"{$go}\" name='redirect' />\n";
$s .= "</form>\n";
return $s;
}
function makeLink( $title, $text = "", $query = "", $trail = "" ) {
wfProfileIn( "Skin::makeLink" );
$nt = Title::newFromText( $title );
- if ($nt) {
+ if ($nt) {
$result = $this->makeLinkObj( Title::newFromText( $title ), $text, $query, $trail );
} else {
wfDebug( "Invalid title passed to Skin::makeLink(): \"$title\"\n" );
$result = $text == "" ? $title : $text;
- }
-
+ }
+
wfProfileOut( "Skin::makeLink" );
return $result;
}
- function makeKnownLink( $title, $text = "", $query = "", $trail = "" ) {
+ function makeKnownLink( $title, $text = "", $query = "", $trail = "", $prefix = '',$aprops = '') {
$nt = Title::newFromText( $title );
- if ($nt) {
- return $this->makeKnownLinkObj( Title::newFromText( $title ), $text, $query, $trail );
+ if ($nt) {
+ return $this->makeKnownLinkObj( Title::newFromText( $title ), $text, $query, $trail, $prefix , $aprops );
} else {
wfDebug( "Invalid title passed to Skin::makeKnownLink(): \"$title\"\n" );
return $text == "" ? $title : $text;
function makeBrokenLink( $title, $text = "", $query = "", $trail = "" ) {
$nt = Title::newFromText( $title );
- if ($nt) {
+ if ($nt) {
return $this->makeBrokenLinkObj( Title::newFromText( $title ), $text, $query, $trail );
} else {
wfDebug( "Invalid title passed to Skin::makeBrokenLink(): \"$title\"\n" );
global $wgOut, $wgUser;
if ( $nt->isExternal() ) {
$u = $nt->getFullURL();
+ $link = $nt->getPrefixedURL();
if ( "" == $text ) { $text = $nt->getPrefixedText(); }
$style = $this->getExternalLinkAttributes( $link, $text );
}
} else {
$size = 1 ;
- }
+ }
if ( $size < $threshold ) {
$retVal = $this->makeStubLinkObj( $nt, $text, $query, $trail, $prefix );
} else {
}
# Pass a title object, not a title string
- function makeKnownLinkObj( &$nt, $text = "", $query = "", $trail = "", $prefix = "" )
+ function makeKnownLinkObj( &$nt, $text = "", $query = "", $trail = "", $prefix = "" , $aprops = '')
{
global $wgOut, $wgTitle;
if ( "" == $link ) {
$u = "";
- if ( "" == $text ) { $text = $nt->getFragment(); }
+ if ( "" == $text ) {
+ $text = htmlspecialchars( $nt->getFragment() );
+ }
} else {
$u = $nt->escapeLocalURL( $query );
}
if ( "" != $nt->getFragment() ) {
- $u .= "#" . wfEscapeHTML( $nt->getFragment() );
+ $u .= "#" . htmlspecialchars( $nt->getFragment() );
+ }
+ if ( "" == $text ) {
+ $text = htmlspecialchars( $nt->getPrefixedText() );
}
- if ( "" == $text ) { $text = $nt->getPrefixedText(); }
$style = $this->getInternalLinkAttributesObj( $nt, $text );
$inside = "";
$trail = $m[2];
}
}
- $r = "<a href=\"{$u}\"{$style}>{$prefix}{$text}{$inside}</a>{$trail}";
+ $r = "<a href=\"{$u}\"{$style}{$aprops}>{$prefix}{$text}{$inside}</a>{$trail}";
wfProfileOut( $fname );
return $r;
}
-
+
# Pass a title object, not a title string
function makeBrokenLinkObj( &$nt, $text = "", $query = "", $trail = "", $prefix = "" )
{
global $wgOut, $wgUser;
-
+
$fname = "Skin::makeBrokenLinkObj";
wfProfileIn( $fname );
}
$u = $nt->escapeLocalURL( $q );
- if ( "" == $text ) { $text = $nt->getPrefixedText(); }
+ if ( "" == $text ) {
+ $text = htmlspecialchars( $nt->getPrefixedText() );
+ }
$style = $this->getInternalLinkAttributesObj( $nt, $text, "yes" );
$inside = "";
$u = $nt->escapeLocalURL( $query );
- if ( "" == $text ) { $text = $nt->getPrefixedText(); }
+ if ( "" == $text ) {
+ $text = htmlspecialchars( $nt->getPrefixedText() );
+ }
$style = $this->getInternalLinkAttributesObj( $nt, $text, "stub" );
$inside = "";
}
if ( "center" == $align )
{
- $prefix = "<center>";
- $postfix = "</center>";
+ $prefix = '<span style="text-align: center">';
+ $postfix = '</span>';
$align = "none";
}
{
$s = str_replace( "$1", $name, wfMsg("missingimage") );
} else {
- $s = "\n <a href=\"{$u}\" class='image' title=\"{$alt}\">\n" .
- " <img border=\"0\" src=\"{$url}\" alt=\"{$alt}\" />\n </a>";
+ $s = "<a href=\"{$u}\" class='image' title=\"{$alt}\">" .
+ "<img src=\"{$url}\" alt=\"{$alt}\" /></a>";
}
if ( "" != $align ) {
- $s = "<div class=\"float{$align}\"><span>{$s}\n</span></div>";
+ $s = "<div class=\"float{$align}\"><span>{$s}</span>\n</div>";
}
return $prefix.$s.$postfix;
}
global $wgUseImageMagick;
global $wgUseSquid, $wgInternalServer;
$imgPath = wfImagePath( $name );
- $thumbName = $width."px-".$icon.$name;
+ $thumbName = $width."px-".$name;
$thumbPath = wfImageThumbDir( $thumbName )."/".$thumbName;
$thumbUrl = wfImageThumbUrl( $thumbName );
if ( $thumbUrl == "" ) {
$s .= str_replace( "$1", $name, wfMsg("missingimage") );
} else {
- $s .= "\n".' <a href="'.$u.'" class="internal" title="'.$alt.'">'."\n".
- ' <img border="0" src="'.$thumbUrl.'" alt="'.$alt.'" ' .
- ' width="'.$boxwidth.'" height="'.$boxheight.'" /></a>' ."\n".
- ' <a href="'.$u.'" class="internal" title="'.$more.'"> ' ."\n".
- ' <img border="0" src="'.$wgUploadPath.'/magnify-clip.png" ' .
- 'width="26" height="24" align="'.$magnifyalign.'" alt="'.$more.'" /> </a>'."\n";
- }
- $s .= ' <p'.$textalign.'>'.$label."</p>\n</div></div>";
+ $s .= '<a href="'.$u.'" class="internal" title="'.$alt.'">'.
+ '<img src="'.$thumbUrl.'" alt="'.$alt.'" ' .
+ 'width="'.$boxwidth.'" height="'.$boxheight.'" /></a>'.
+ '<a href="'.$u.'" class="internal" title="'.$more.'"> '.
+ '<img src="'.$wgUploadPath.'/magnify-clip.png" ' .
+ 'width="26" height="24" align="'.$magnifyalign.'" alt="'.$more.'" /> </a>';
+ }
+ $s .= ' <div'.$textalign.'>'.$label."</div></div>\n</div>";
return $s;
}
return $this->makeKnownLink( $wgLang->specialPage( $pn ),
wfMsg( $key ) );
}
+
+ function makeExternalLink( $url, $text, $escape = true ) {
+ $style = $this->getExternalLinkAttributes( $url, $text );
+ $url = htmlspecialchars( $url );
+ if( $escape ) {
+ $text = htmlspecialchars( $text );
+ }
+ return "<a href=\"$url\"$style>$text</a>";
+ }
# Called by history lists and recent changes
#
$this->rcMoveIndex = 0;
$this->rcCacheIndex = 0 ;
$this->lastdate = "";
+ $this->rclistOpen = false;
return "";
}
function beginImageHistoryList()
{
$s = "\n<h2>" . wfMsg( "imghistory" ) . "</h2>\n" .
- "<p>" . wfMsg( "imghistlegend" ) . "\n<ul class='special'>";
+ "<p>" . wfMsg( "imghistlegend" ) . "</p>\n<ul class='special'>";
return $s;
}
function endRecentChangesList()
{
$s = $this->recentChangesBlock() ;
- $s .= "</ul>\n";
+ if( $this->rclistOpen ) {
+ $s .= "</ul>\n";
+ }
return $s;
}
if ( !isset ( $userlinks[$u] ) ) $userlinks[$u] = 0 ;
$userlinks[$u]++ ;
}
-
+
# Sort the list and convert to text
krsort ( $userlinks ) ;
asort ( $userlinks ) ;
$rcm = "RCM{$this->rcCacheIndex}" ;
$toggleLink = "javascript:toggleVisibility(\"{$rci}\",\"{$rcm}\",\"{$rcl}\")" ;
$arrowdir = $wgLang->isRTL() ? "l" : "r";
- $tl = "<span id='{$rcm}'><a href='$toggleLink'><img src='{$wgUploadPath}/Arr_{$arrowdir}.png' width='12' height='12' border='0' /></a></span>" ;
- $tl .= "<span id='{$rcl}' style='display:none'><a href='$toggleLink'><img src='{$wgUploadPath}/Arr_d.png' width='12' height='12' border='0' /></a></span>" ;
+ $tl = "<span id='{$rcm}'><a href='$toggleLink'><img src='{$wgUploadPath}/Arr_{$arrowdir}.png' width='12' height='12' /></a></span>" ;
+ $tl .= "<span id='{$rcl}' style='display:none'><a href='$toggleLink'><img src='{$wgUploadPath}/Arr_d.png' width='12' height='12' /></a></span>" ;
$r .= $tl ;
# Main line
# Get rc_xxxx variables
extract( $rcObj->mAttribs );
- $r .= "<img src='{$wgUploadPath}/Arr_.png' width=12 height=12 border=0 />";
+ $r .= "<img src='{$wgUploadPath}/Arr_.png' width=12 height=12 />";
$r .= "<tt> " ;
if ( $rc_new ) $r .= $N ;
else $r .= " " ;
if ( "" != $this->lastdate ) { $s .= "</ul>\n"; }
$s .= "<h4>{$date}</h4>\n<ul class='special'>";
$this->lastdate = $date;
+ $this->rclistOpen = true;
}
$s .= "<li> ";
$diffLink = wfMsg( "diff" );
} else {
$diffLink = $this->makeKnownLinkObj( $rc->getTitle(), wfMsg( "diff" ),
- "{$curIdEq}&diff={$rc_this_oldid}&oldid={$rc_last_oldid}" );
+ "{$curIdEq}&diff={$rc_this_oldid}&oldid={$rc_last_oldid}" ,'' ,'' , ' tabindex="'.$rc->counter.'"');
}
$s .= "($diffLink) (";
$curLink = wfMsg( "cur" );
} else {
$curLink = $this->makeKnownLinkObj( $rc->getTitle(), wfMsg( "cur" ),
- "{$curIdEq}&diff=0&oldid={$rc_this_oldid}" );
+ "{$curIdEq}&diff=0&oldid={$rc_this_oldid}" ,'' ,'' , ' tabindex="'.$baseRC->counter.'"' );
}
# Make "last" link
/* This function is called by all recent changes variants, by the page history,
and by the user contributions list. It is responsible for formatting edit
comments. It escapes any HTML in the comment, but adds some CSS to format
- auto-generated comments (from section editing).
+ auto-generated comments (from section editing) and formats [[wikilinks]].
+ Main author: Erik Möller (moeller@scireview.de)
*/
function formatComment($comment)
{
+ global $wgLang;
$comment=wfEscapeHTML($comment);
-
- # format text between /* .. */ with autocomment CSS class
- $comment=preg_replace("/\/\*\s*(.*?)\s*\*\//i",
- "<span id=\"autocomment\">$1</span>",$comment);
+
+ # The pattern for autogen comments is / * foo * /, which makes for
+ # some nasty regex.
+ # We look for all comments, match any text before and after the comment,
+ # add a separator where needed and format the comment itself with CSS
+ while (preg_match("/(.*)\/\*\s*(.*?)\s*\*\/(.*)/", $comment,$match)) {
+ $pre=$match[1];
+ $auto=$match[2];
+ $post=$match[3];
+ $sep="-";
+ if($pre) { $auto="$sep ".$auto; }
+ if($post) { $auto.=" $sep"; }
+ $auto="<span class=\"autocomment\">".$auto."</span>";
+ $comment=$pre.$auto.$post;
+ }
+
+ # format regular and media links - all other wiki formatting
+ # is ignored
+ while(preg_match("/\[\[(.*?)(\|(.*?))*\]\]/",$comment,$match)) {
+
+ $medians = $wgLang->getNsText(Namespace::getMedia());
+ $func="makeLink";
+ if(preg_match("/^".$medians."/i",$match[1])) {
+ $func="makeMediaLink";
+ }
+ if(isset($match[3]) ) {
+ $comment=
+ preg_replace("/\[\[(.*?)\]\]/",
+ $this->$func($match[1],$match[3]),$comment,1);
+ } else {
+ $comment=
+ preg_replace("/\[\[(.*?)\]\]/",
+ $this->$func($match[1],$match[1]),$comment,1);
+ }
+ }
+
return $comment;
+
}
function imageHistoryLine( $iscur, $ts, $img, $u, $ut, $size, $c )
. " . . {$ul} ({$nb})";
if ( "" != $c && "*" != $c ) {
- $s .= $wgLang->emphasize(" (" . wfEscapeHTML( $c ) . ")");
+ $sk=$wgUser->getSkin();
+ $s .= $wgLang->emphasize(" (" . $sk->formatComment($c) . ")");
}
$s .= "</li>\n";
return $s;
// and optionally a sample text that is inserted between the two when no
// selection is highlighted.
// The tip text is shown when the user moves the mouse over the button.
+
+ // Already here are accesskeys (key), which are not used yet until someone
+ // can figure out a way to make them work in IE. However, we should make
+ // sure these keys are not defined on the edit page.
$toolarray=array(
array( "image"=>"button_bold.png",
"open"=>"\'\'\'",
"close"=>"\'\'\'",
"sample"=>wfMsg("bold_sample"),
- "tip"=>wfMsg("bold_tip")),
+ "tip"=>wfMsg("bold_tip"),
+ "key"=>"B"
+ ),
array( "image"=>"button_italic.png",
"open"=>"\'\'",
"close"=>"\'\'",
"sample"=>wfMsg("italic_sample"),
- "tip"=>wfMsg("italic_tip")),
+ "tip"=>wfMsg("italic_tip"),
+ "key"=>"I"
+ ),
array( "image"=>"button_link.png",
"open"=>"[[",
"close"=>"]]",
"sample"=>wfMsg("link_sample"),
- "tip"=>wfMsg("link_tip")),
+ "tip"=>wfMsg("link_tip"),
+ "key"=>"L"
+ ),
array( "image"=>"button_extlink.png",
"open"=>"[",
"close"=>"]",
"sample"=>wfMsg("extlink_sample"),
- "tip"=>wfMsg("extlink_tip")),
+ "tip"=>wfMsg("extlink_tip"),
+ "key"=>"X"
+ ),
array( "image"=>"button_headline.png",
"open"=>"\\n== ",
"close"=>" ==\\n",
"sample"=>wfMsg("headline_sample"),
- "tip"=>wfMsg("headline_tip")),
+ "tip"=>wfMsg("headline_tip"),
+ "key"=>"H"
+ ),
array( "image"=>"button_image.png",
"open"=>"[[".$wgLang->getNsText(NS_IMAGE).":",
"close"=>"]]",
"sample"=>wfMsg("image_sample"),
- "tip"=>wfMsg("image_tip")),
+ "tip"=>wfMsg("image_tip"),
+ "key"=>"D"
+ ),
array( "image"=>"button_media.png",
"open"=>"[[".$wgLang->getNsText(NS_MEDIA).":",
"close"=>"]]",
"sample"=>wfMsg("media_sample"),
- "tip"=>wfMsg("media_tip")),
+ "tip"=>wfMsg("media_tip"),
+ "key"=>"M"
+ ),
array( "image"=>"button_math.png",
"open"=>"\\<math\\>",
"close"=>"\\</math\\>",
"sample"=>wfMsg("math_sample"),
- "tip"=>wfMsg("math_tip")),
+ "tip"=>wfMsg("math_tip"),
+ "key"=>"C"
+ ),
array( "image"=>"button_nowiki.png",
"open"=>"\\<nowiki\\>",
"close"=>"\\</nowiki\\>",
"sample"=>wfMsg("nowiki_sample"),
- "tip"=>wfMsg("nowiki_tip")),
+ "tip"=>wfMsg("nowiki_tip"),
+ "key"=>"N"
+ ),
array( "image"=>"button_sig.png",
"open"=>"--~~~~",
"close"=>"",
"sample"=>"",
- "tip"=>wfMsg("sig_tip")),
+ "tip"=>wfMsg("sig_tip"),
+ "key"=>"Y"
+ ),
array( "image"=>"button_hr.png",
"open"=>"\\n----\\n",
"close"=>"",
"sample"=>"",
- "tip"=>wfMsg("hr_tip"))
+ "tip"=>wfMsg("hr_tip"),
+ "key"=>"R"
+ )
);
- $toolbar ="<script type='text/javascript'>\n";
-
- $xml = ($wgMimeType == "text/xml");
- if( $xml ) {
- $toolbar .= "<![CDATA[";
- }
+ $toolbar ="<script type='text/javascript'>\n/*<![CDATA[*/\n";
$toolbar.="document.writeln(\"<div id='toolbar'>\");\n";
foreach($toolarray as $tool) {
// Ideally these should be different, realistically they
// probably don't need to be.
$tip = addslashes( $tool["tip"] );
+
+ #$key = $tool["key"];
+
$toolbar.="addButton('$image','$tip','$open','$close','$sample');\n";
}
$toolbar.="addInfobox('" . addslashes( wfMsg( "infobox" ) ) . "','" . addslashes(wfMsg("infobox_alert")) . "');\n";
$toolbar.="document.writeln(\"</div>\");\n";
- if( $xml ) {
- $toolbar .= "]]>";
- }
- $toolbar.="</script>";
+ $toolbar.="/*]]>*/\n</script>";
return $toolbar;
}
}
include_once( "SkinNostalgia.php" );
include_once( "SkinCologneBlue.php" );
-if( $wgUseSmarty ) {
- include_once( "SkinSmarty.php" );
-}
if( $wgUsePHPTal ) {
include_once( "SkinPHPTal.php" );
}