mediawiki role for wiki servers. Thanks adimania. ticket 4257
|
@ -9,3 +9,5 @@ num_cpus: 2
|
|||
|
||||
tcp_ports: [ 80 ]
|
||||
fas_client_groups: sysadmin-noc,fi-apprentice
|
||||
|
||||
wikiname: "fp"
|
||||
|
|
|
@ -9,3 +9,5 @@ num_cpus: 2
|
|||
|
||||
tcp_ports: [ 80 ]
|
||||
fas_client_groups: sysadmin-noc,fi-apprentice
|
||||
|
||||
wikiname: "fp"
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
- nagios_client
|
||||
- fas_client
|
||||
- fedmsg/base
|
||||
- mediawiki
|
||||
|
||||
tasks:
|
||||
- include: "{{ tasks }}/hosts.yml"
|
||||
|
|
124
roles/mediawiki/files/Auth_FAS.php
Normal file
|
@ -0,0 +1,124 @@
|
|||
<?php
|
||||
require_once('AuthPlugin.php');
|
||||
class Auth_FAS extends AuthPlugin {
|
||||
function authenticate($username, $password) {
|
||||
if ( ucfirst(strtolower($username)) != ucfirst($username) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$username = strtolower( $username);
|
||||
$ch = curl_init();
|
||||
|
||||
curl_setopt($ch, CURLOPT_URL, 'https://admin.fedoraproject.org/accounts/json/person_by_username?tg_format=json');
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, "Auth_FAS 0.9");
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, "username=".urlencode($username)."&user_name=".urlencode($username)."&password=".urlencode($password)."&login=Login");
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
|
||||
# WARNING: Never leave this on in production, as it will cause
|
||||
# plaintext passwords to show up in error logs.
|
||||
curl_setopt($ch, CURLOPT_VERBOSE, 0);
|
||||
|
||||
# The following two lines need to be enabled when using a test FAS
|
||||
# with an invalid cert. Otherwise they should be commented (or
|
||||
# set to True) for security.
|
||||
#curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
#curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
$response = json_decode(curl_exec($ch), true);
|
||||
curl_close ($ch);
|
||||
|
||||
if (!isset($response["success"])) {
|
||||
error_log("FAS auth failed for $username: incorrect username or password", 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
$groups = $response["person"]["approved_memberships"];
|
||||
|
||||
for ($i = 0, $cnt = count($groups); $i < $cnt; $i++) {
|
||||
if ($groups[$i]["name"] == "cla_done") {
|
||||
error_log("FAS auth succeeded for $username", 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
error_log("FAS auth failed for $username: insufficient group membership", 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
function userExists( $username ) {
|
||||
if ( ucfirst(strtolower($username)) != ucfirst($username) ) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function modifyUITemplate(&$template) {
|
||||
$template->set('create', false);
|
||||
$template->set('useemail', false);
|
||||
$template->set('usedomain', false);
|
||||
}
|
||||
|
||||
function updateUser( &$user ){
|
||||
$user->mEmail = strtolower($user->getName())."@fedoraproject.org";
|
||||
return true;
|
||||
}
|
||||
|
||||
function autoCreate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function setPassword($password) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function setDomain( $domain ) {
|
||||
$this->domain = $domain;
|
||||
}
|
||||
|
||||
function validDomain( $domain ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function updateExternalDB($user) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function canCreateAccounts() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function addUser($user, $password) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function strict() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function strictUserAuth( $username ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function allowPasswordChange() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function initUser(&$user) {
|
||||
$user->mEmail = strtolower($user->getName())."@fedoraproject.org";
|
||||
$user->mEmailAuthenticated = wfTimestampNow();
|
||||
$user->setToken();
|
||||
$user->saveSettings();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Some extension information init
|
||||
*/
|
||||
$wgExtensionCredits['other'][] = array(
|
||||
'name' => 'Auth_FAS',
|
||||
'version' => '0.9.1',
|
||||
'author' => 'Nigel Jones',
|
||||
'description' => 'Authorisation plugin allowing login with FAS2 accounts'
|
||||
);
|
||||
|
||||
?>
|
268
roles/mediawiki/files/fedmsg-emit.php
Normal file
|
@ -0,0 +1,268 @@
|
|||
<?php
|
||||
/*
|
||||
* fedmsg-emit.php
|
||||
* -------------------------
|
||||
*
|
||||
* A MediaWiki plugin that emits messages to the Fedora Infrastructure Message
|
||||
* Bus.
|
||||
*
|
||||
* Installation Instructions
|
||||
* -------------------------
|
||||
*
|
||||
* You need to enable the following in /etc/php.ini for this to fly:
|
||||
*
|
||||
* extension=zmq.so
|
||||
*
|
||||
* To install the plugin for mediawiki, you need to copy this file to:
|
||||
*
|
||||
* /usr/share/mediawiki/fedmsg-emit.php
|
||||
*
|
||||
* And you also need to enable it by adding the following to the bottom of
|
||||
* /var/www/html/wiki/LocalSettings.php
|
||||
*
|
||||
* require_once("$IP/fedmsg-emit.php");
|
||||
*
|
||||
* This corner of the fedmsg topology requires that an instance of fedmsg-relay
|
||||
* be running somewhere. The reason being that multiple php processes get run
|
||||
* by apache at the same time which would necessitate `n` different bind
|
||||
* addresses for each process. Here, as opposed to 'normal' fedmsg
|
||||
* configurations in our python webapps, each php process actively connects to
|
||||
* the relay and emits messages. Our 'normal' python webapps establish a
|
||||
* passive endpoint on which they broadcast messages.
|
||||
*
|
||||
* Miscellaneous
|
||||
* -------------
|
||||
*
|
||||
* Version: 0.2.0
|
||||
* License: LGPLv2+
|
||||
* Author: Ralph Bean
|
||||
* Source: http://github.com/ralphbean/fedmsg
|
||||
*/
|
||||
|
||||
if (!defined('MEDIAWIKI')) {echo("Cannot be run outside MediaWiki"); die(1);}
|
||||
|
||||
// globals
|
||||
$config = 0;
|
||||
$queue = 0;
|
||||
|
||||
// A utility function, taken from the comments at
|
||||
// http://php.net/manual/en/language.types.boolean.php
|
||||
function to_bool ($_val) {
|
||||
$_trueValues = array('yes', 'y', 'true');
|
||||
$_forceLowercase = true;
|
||||
|
||||
if (is_string($_val)) {
|
||||
return (in_array(
|
||||
($_forceLowercase?strtolower($_val):$_val),
|
||||
$_trueValues
|
||||
));
|
||||
} else {
|
||||
return (boolean) $_val;
|
||||
}
|
||||
}
|
||||
|
||||
// A utility function to recursively sort an associative
|
||||
// array by key. Kind of like ordereddict from Python.
|
||||
// Used for encoding and signing messages.
|
||||
function deep_ksort(&$arr) {
|
||||
ksort($arr);
|
||||
foreach ($arr as &$a) {
|
||||
if (is_array($a) && !empty($a)) {
|
||||
deep_ksort($a);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
global $config, $queue;
|
||||
/* Load the config. Create a publishing socket. */
|
||||
|
||||
// Danger! Danger!
|
||||
$json = shell_exec("fedmsg-config");
|
||||
$config = json_decode($json, true);
|
||||
|
||||
/* Just make sure everything is sane with the fedmsg config */
|
||||
if (!array_key_exists('relay_inbound', $config)) {
|
||||
echo("fedmsg-config has no 'relay_inbound'");
|
||||
return false;
|
||||
}
|
||||
|
||||
$context = new ZMQContext(1, true);
|
||||
$queue = $context->getSocket(ZMQ::SOCKET_PUB, "pub-a-dub-dub");
|
||||
$queue->setSockOpt(ZMQ::SOCKOPT_LINGER, $config['zmq_linger']);
|
||||
|
||||
if (is_array($config['relay_inbound'])) {
|
||||
// API for fedmsg >= 0.5.2
|
||||
// TODO - be more robust here and if connecting to the first one fails, try
|
||||
// the next, and the next, and etc...
|
||||
$queue->connect($config['relay_inbound'][0]);
|
||||
} else {
|
||||
// API for fedmsg <= 0.5.1
|
||||
$queue->connect($config['relay_inbound']);
|
||||
}
|
||||
|
||||
# Go to sleep for a brief moment.. just long enough to let our zmq socket
|
||||
# initialize.
|
||||
if (array_key_exists('post_init_sleep', $config)) {
|
||||
usleep($config['post_init_sleep'] * 1000000);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
# Register our hooks with mediawiki
|
||||
$wgHooks['ArticleSaveComplete'][] = 'article_save';
|
||||
$wgHooks['UploadComplete'][] = 'upload_complete';
|
||||
|
||||
# This is a reimplementation of the python code in fedmsg/crypto.py
|
||||
# That file is authoritative. Changes there should be reflected here.
|
||||
function sign_message($message_obj) {
|
||||
global $config;
|
||||
|
||||
# This is required so that the string we sign is identical in python and in
|
||||
# php. Ordereddict is used there; ksort here.
|
||||
deep_ksort($message_obj);
|
||||
|
||||
# It would be best to pass JSON_UNESCAPE_SLASHES as an option here, but it is
|
||||
# not available until php-5.4
|
||||
$message = json_encode($message_obj);
|
||||
# In the meantime, we'll remove escaped slashes ourselves. This is
|
||||
# necessary in order to produce the exact same encoding as python (so that our
|
||||
# signatures match for validation).
|
||||
$message = stripcslashes($message);
|
||||
|
||||
# Step 0) - Find our cert.
|
||||
$fqdn = gethostname();
|
||||
$tokens = explode('.', $fqdn);
|
||||
$hostname = $tokens[0];
|
||||
$ssldir = $config['ssldir'];
|
||||
$certname = $config['certnames']['mediawiki.'.$hostname];
|
||||
|
||||
# Step 1) - Load and encode the X509 cert
|
||||
$cert_obj = openssl_x509_read(file_get_contents(
|
||||
$ssldir.'/'.$certname.".crt"
|
||||
));
|
||||
$cert = "";
|
||||
openssl_x509_export($cert_obj, $cert);
|
||||
$cert = base64_encode($cert);
|
||||
|
||||
# Step 2) - Load and sign the jsonified message with the RSA private key
|
||||
$rsa_private = openssl_get_privatekey(file_get_contents(
|
||||
$ssldir.'/'.$certname.".key"
|
||||
));
|
||||
$signature = "";
|
||||
openssl_sign($message, $signature, $rsa_private);
|
||||
$signature = base64_encode($signature);
|
||||
|
||||
# Step 3) - Stuff it back in the message and return
|
||||
$message_obj['signature'] = $signature;
|
||||
$message_obj['certificate'] = $cert;
|
||||
|
||||
return $message_obj;
|
||||
}
|
||||
|
||||
|
||||
function emit_message($subtopic, $message) {
|
||||
global $config, $queue;
|
||||
|
||||
# Re-implement some of the logc from fedmsg/core.py
|
||||
# We'll have to be careful to keep this up to date.
|
||||
$prefix = "org.fedoraproject." . $config['environment'] . ".wiki.";
|
||||
$topic = $prefix . $subtopic;
|
||||
|
||||
$message_obj = array(
|
||||
"topic" => $topic,
|
||||
"msg" => $message,
|
||||
"timestamp" => round(time(), 3),
|
||||
"msg_id" => date("Y") . "-" . uuid_create(),
|
||||
"username" => "apache",
|
||||
# TODO -> we don't have a good way to increment this counter from php yet.
|
||||
"i" => 1,
|
||||
);
|
||||
if (array_key_exists('sign_messages', $config) and to_bool($config['sign_messages'])) {
|
||||
$message_obj = sign_message($message_obj);
|
||||
}
|
||||
|
||||
$envelope = json_encode($message_obj);
|
||||
$queue->send($topic, ZMQ::MODE_SNDMORE);
|
||||
$queue->send($envelope);
|
||||
}
|
||||
|
||||
function article_save(
|
||||
&$article,
|
||||
&$user,
|
||||
$text,
|
||||
$summary,
|
||||
$minoredit,
|
||||
$watchthis,
|
||||
$sectionanchor,
|
||||
&$flags,
|
||||
$revision,
|
||||
&$status,
|
||||
$baseRevId
|
||||
) {
|
||||
|
||||
# If for some reason or another we can't create our socket, then bail.
|
||||
if (!initialize()) { return false; }
|
||||
|
||||
$topic = "article.edit";
|
||||
$title = $article->getTitle();
|
||||
if ( $title->getNsText() ) {
|
||||
$titletext = $title->getNsText() . ":" . $title->getText();
|
||||
} else {
|
||||
$titletext = $title->getText();
|
||||
}
|
||||
|
||||
if ( is_object($revision) ) {
|
||||
$url = $title->getFullURL('diff=prev&oldid=' . $revision->getId());
|
||||
} else {
|
||||
$url = $title->getFullURL();
|
||||
}
|
||||
|
||||
# Just send on all the information we can... change the attr names to be
|
||||
# more pythonic in style, though.
|
||||
$msg = array(
|
||||
"title" => $titletext,
|
||||
"user" => $user->getName(),
|
||||
"minor_edit" => $minoredit,
|
||||
"watch_this" => $watchthis,
|
||||
"section_anchor" => $sectionanchor,
|
||||
"revision" => $revision,
|
||||
"base_rev_id" => $baseRevId,
|
||||
"url" => $url,
|
||||
#"summary" => $summary, # We *used* to send this, but it mucked things up.
|
||||
# https://fedorahosted.org/fedora-infrastructure/ticket/3738#comment:7
|
||||
#"text" => $text, # We *could* send this, but it's a lot of spam.
|
||||
# TODO - flags?
|
||||
# TODO - status?
|
||||
);
|
||||
|
||||
emit_message($topic, $msg);
|
||||
return true;
|
||||
}
|
||||
|
||||
function upload_complete(&$image) {
|
||||
|
||||
# If for some reason or another we can't create our socket, then bail.
|
||||
if (!initialize()) { return false; }
|
||||
|
||||
$topic = "upload.complete";
|
||||
$msg = array(
|
||||
"file_exists" => $image->getLocalFile()->fileExists, // 1 or 0
|
||||
"media_type" => $image->getLocalFile()->media_type, // examples: "AUDIO", "VIDEO", ...
|
||||
"mime" => $image->getLocalFile()->mime, // example: audio/mp3
|
||||
"major_mime" => $image->getLocalFile()->major_mime, // e.g. audio
|
||||
"minor_mime" => $image->getLocalFile()->minor_mime, // e.g. mp3
|
||||
"size" => $image->getLocalFile()->size, //in bytes, e.g. 2412586
|
||||
"user_id" => $image->getLocalFile()->user, // int userId
|
||||
"user_text" => $image->getLocalFile()->user_text, // the username
|
||||
"description" => $image->getLocalFile()->description,
|
||||
"url" => $image->getLocalFile()->url, // gives the relavive url for direct access of the uploaded media
|
||||
"title" => $image->getLocalFile()->getTitle(), // gives a title object for the current media
|
||||
);
|
||||
|
||||
emit_message($topic, $msg);
|
||||
return true;
|
||||
}
|
||||
|
||||
?>
|
12
roles/mediawiki/files/skins/Fedora.deps.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
// This file exists to ensure that base classes are preloaded before
|
||||
// MonoBook.php is compiled, working around a bug in the APC opcode
|
||||
// cache on PHP 5, where cached code can break if the include order
|
||||
// changed on a subsequent page view.
|
||||
// see http://mail.wikipedia.org/pipermail/wikitech-l/2006-January/033660.html
|
||||
|
||||
if ( ! defined( 'MEDIAWIKI' ) )
|
||||
die( 1 );
|
||||
|
||||
require_once('includes/SkinTemplate.php');
|
||||
?>
|
357
roles/mediawiki/files/skins/Fedora.php
Normal file
|
@ -0,0 +1,357 @@
|
|||
<?php
|
||||
/**
|
||||
* Fedora skin
|
||||
*
|
||||
* Copied/modified from the Monobook skin
|
||||
*
|
||||
* @todo document
|
||||
* @addtogroup Skins
|
||||
*/
|
||||
|
||||
if( !defined( 'MEDIAWIKI' ) )
|
||||
die( -1 );
|
||||
|
||||
/** */
|
||||
require_once('includes/SkinTemplate.php');
|
||||
|
||||
/**
|
||||
* Inherit main code from SkinTemplate, set the CSS and template filter.
|
||||
* @todo document
|
||||
* @addtogroup Skins
|
||||
*/
|
||||
class SkinFedora extends SkinTemplate {
|
||||
/** Using monobook. */
|
||||
function initPage( &$out ) {
|
||||
SkinTemplate::initPage( $out );
|
||||
$this->skinname = 'fedora';
|
||||
$this->stylename = 'fedora';
|
||||
$this->template = 'FedoraTemplate';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo document
|
||||
* @addtogroup Skins
|
||||
*/
|
||||
class FedoraTemplate extends QuickTemplate {
|
||||
/**
|
||||
* Template filter callback for Fedora skin.
|
||||
* Takes an associative array of data set from a SkinTemplate-based
|
||||
* class, and a wrapper for MediaWiki's localization database, and
|
||||
* outputs a formatted page.
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
function execute() {
|
||||
global $wgUser;
|
||||
$skin = $wgUser->getSkin();
|
||||
|
||||
// Suppress warnings to prevent notices about missing indexes in $this->data
|
||||
wfSuppressWarnings();
|
||||
|
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php
|
||||
foreach($this->data['xhtmlnamespaces'] as $tag => $ns) {
|
||||
?>xmlns:<?php echo "{$tag}=\"{$ns}\" ";
|
||||
} ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
|
||||
<?php $this->html('headlinks') ?>
|
||||
<title><?php $this->text('pagetitle') ?></title>
|
||||
<?php $this->html('csslinks') ?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="all" href="/static/css/fedora.css" />
|
||||
<link rel="stylesheet" type="text/css" media="print" href="/static/css/print.css" />
|
||||
|
||||
<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>"; /*]]>*/</style>
|
||||
<link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('stylepath') ?>/common/commonPrint.css?<?php echo $GLOBALS['wgStyleVersion'] ?>" />
|
||||
<link rel="stylesheet" type="text/css" media="handheld" href="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/handheld.css?<?php echo $GLOBALS['wgStyleVersion'] ?>" />
|
||||
<!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
|
||||
<!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
|
||||
<!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
|
||||
<!--[if IE 7]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE70Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
|
||||
<!--[if lt IE 7]><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script>
|
||||
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
|
||||
|
||||
<?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
|
||||
|
||||
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js --></script>
|
||||
<?php if($this->data['jsvarurl' ]) { ?>
|
||||
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl' ) ?>"><!-- site js --></script>
|
||||
<?php }
|
||||
if($this->data['usercss' ]) { ?>
|
||||
<style type="text/css"><?php $this->html('usercss' ) ?></style>
|
||||
<?php }
|
||||
if($this->data['userjs' ]) { ?>
|
||||
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script>
|
||||
<?php }
|
||||
if($this->data['userjsprev']) { ?>
|
||||
<script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script>
|
||||
<?php }
|
||||
if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
|
||||
<!-- Head Scripts -->
|
||||
<?php $this->html('headscripts') ?>
|
||||
</head>
|
||||
<body <?php if($this->data['body_ondblclick']) { ?>ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
|
||||
<?php if($this->data['body_onload' ]) { ?>onload="<?php $this->text('body_onload') ?>"<?php } ?>
|
||||
class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?>">
|
||||
<div id="wrapper">
|
||||
<div id="head">
|
||||
<h1><a href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>" <?php
|
||||
foreach ($skin->tooltipAndAccesskeyAttribs('n-mainpage') as $key => $value) {
|
||||
echo $key.'="'.$value.'" ';
|
||||
}
|
||||
?>>Fedora</a></h1>
|
||||
<div id="p-personal">
|
||||
<h5><?php $this->msg('personaltools') ?></h5>
|
||||
<ul>
|
||||
<?php foreach($this->data['personal_urls'] as $key => $item) { ?>
|
||||
<li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php
|
||||
if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php
|
||||
echo htmlspecialchars($item['href']) ?>" <?php
|
||||
foreach ($skin->tooltipAndAccesskeyAttribs('pt-'.$key) as $attr_key => $attr_value) {
|
||||
echo $attr_key.'="'.$attr_value.'" ';
|
||||
}
|
||||
?><?php
|
||||
if(!empty($item['class'])) { ?> class="<?php
|
||||
echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
|
||||
echo htmlspecialchars($item['text']) ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Top actions bar -->
|
||||
<div id="p-cactions">
|
||||
<h5><?php $this->msg('views') ?></h5>
|
||||
<ul>
|
||||
<?php foreach($this->data['content_actions'] as $key => $tab) { ?>
|
||||
<li id="ca-<?php echo Sanitizer::escapeId($key) ?>"<?php
|
||||
if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php }
|
||||
?>><a href="<?php echo htmlspecialchars($tab['href']) ?>" <?php
|
||||
foreach ($skin->tooltipAndAccesskeyAttribs('ca-'.$key) as $attr_key => $attr_value) {
|
||||
echo $attr_key.'="'.$attr_value.'" ';
|
||||
}
|
||||
?>><?php echo htmlspecialchars($tab['text']) ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="sidebar">
|
||||
<div id="nav">
|
||||
<!-- Sidebar -->
|
||||
<?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
|
||||
<div id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $skin->tooltip('p-'.$bar) ?>>
|
||||
<h2><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h2>
|
||||
<ul>
|
||||
<?php foreach($cont as $key => $val) { ?>
|
||||
<li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
|
||||
if ( $val['active'] ) { ?> class="active" <?php }
|
||||
?>><a href="<?php echo htmlspecialchars($val['href']) ?>" <?php
|
||||
foreach($skin->tooltipAndAccesskeyAttribs($val['id']) as $attr_key => $attr_value) {
|
||||
echo $attr_key.'="'.$attr_value.'" ';
|
||||
}
|
||||
?>><?php echo htmlspecialchars($val['text']) ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div id="p-search">
|
||||
<h2><label for="searchInput"><?php $this->msg('search') ?></label></h2>
|
||||
<form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
|
||||
<input id="searchInput" name="search" type="text" <?php
|
||||
foreach($skin->tooltipAndAccesskeyAttribs('search') as $attr_key => $attr_value) {
|
||||
echo $attr_key.'="'.$attr_value.'" ';
|
||||
}
|
||||
if( isset( $this->data['search'] ) ) {
|
||||
?> value="<?php $this->text('search') ?>"<?php } ?> /><br />
|
||||
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>" />
|
||||
<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>" />
|
||||
</div></form>
|
||||
</div>
|
||||
<div id="p-tb">
|
||||
<h2><?php $this->msg('toolbox') ?></h2>
|
||||
<ul>
|
||||
<?php
|
||||
if($this->data['notspecialpage']) { ?>
|
||||
<li id="t-whatlinkshere"><a href="<?php
|
||||
echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])
|
||||
?>" <?php
|
||||
foreach ($skin->tooltipAndAccesskeyAttribs('t-whatlinkshere') as $attr_key => $attr_value) {
|
||||
echo $attr_key.'="'.$attr_value.'" ';
|
||||
}
|
||||
?>><?php $this->msg('whatlinkshere') ?></a></li>
|
||||
<?php
|
||||
if( $this->data['nav_urls']['recentchangeslinked'] ) { ?>
|
||||
<li id="t-recentchangeslinked"><a href="<?php
|
||||
echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])
|
||||
?>" <?php
|
||||
foreach($skin->tooltipAndAccesskeyAttribs('t-recentchangeslinked') as $attr_key => $attr_value) {
|
||||
echo $attr_key.'="'.$attr_value.'" ';
|
||||
}
|
||||
?>><?php $this->msg('recentchangeslinked') ?></a></li>
|
||||
<?php }
|
||||
}
|
||||
if(isset($this->data['nav_urls']['trackbacklink'])) { ?>
|
||||
<li id="t-trackbacklink"><a href="<?php
|
||||
echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])
|
||||
?>" <?php
|
||||
foreach ($skin->tooltipAndAccesskeyAttribs('t-trackbacklink') as $attr_key => $attr_value) {
|
||||
echo $attr_key.'="'.$attr_value.'" ';
|
||||
}
|
||||
?>><?php $this->msg('trackbacklink') ?></a></li>
|
||||
<?php }
|
||||
if($this->data['feeds']) { ?>
|
||||
<li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
|
||||
?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php
|
||||
echo htmlspecialchars($feed['href']) ?>" <?php
|
||||
foreach($skin->tooltipAndAccesskeyAttribs('feed-'.$key) as $attr_key => $attr_value) {
|
||||
echo $attr_key.'="'.$attr_value.'" ';
|
||||
}
|
||||
?>><?php echo htmlspecialchars($feed['text'])?></a> </span>
|
||||
<?php } ?></li><?php
|
||||
}
|
||||
|
||||
foreach( array('contributions', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {
|
||||
|
||||
if($this->data['nav_urls'][$special]) {
|
||||
?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
|
||||
?>" <?php
|
||||
foreach ($skin->tooltipAndAccesskeyAttribs('t-'.$special) as $attr_key => $attr_value) {
|
||||
echo $attr_key.'="'.$attr_value.'" ';
|
||||
}
|
||||
?>><?php $this->msg($special) ?></a></li>
|
||||
<?php }
|
||||
}
|
||||
|
||||
if(!empty($this->data['nav_urls']['print']['href'])) { ?>
|
||||
<li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href'])
|
||||
?>"<?php
|
||||
foreach ($skin->tooltipAndAccesskeyAttribs('t-print') as $attr_key => $attr_value) {
|
||||
echo $attr_key.'="'.$attr_value.'" ';
|
||||
}
|
||||
?>><?php $this->msg('printableversion') ?></a></li><?php
|
||||
}
|
||||
|
||||
if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
|
||||
<li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])
|
||||
?>"<?php
|
||||
foreach ($skin->tooltipAndAccesskeyAttribs('t-permalink') as $attr_key => $attr_value) {
|
||||
echo $attr_key.'="'.$attr_value.'" ';
|
||||
}
|
||||
?>><?php $this->msg('permalink') ?></a></li><?php
|
||||
} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
|
||||
<li id="t-ispermalink"<?php echo $skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
|
||||
}
|
||||
|
||||
wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) );
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
if( $this->data['language_urls'] ) { ?>
|
||||
<div id="p-lang">
|
||||
<h2><?php $this->msg('otherlanguages') ?></h2>
|
||||
<ul>
|
||||
<?php foreach($this->data['language_urls'] as $langlink) { ?>
|
||||
<li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php
|
||||
?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div><!-- end of the left (by default at least) column -->
|
||||
|
||||
<div id="content">
|
||||
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
|
||||
<h2><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h2>
|
||||
<h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
|
||||
<div id="contentSub"><?php $this->html('subtitle') ?></div>
|
||||
<?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?>
|
||||
<?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php $this->html('newtalk') ?></div><?php } ?>
|
||||
<?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
|
||||
<!-- start content -->
|
||||
<?php $this->html('bodytext') ?>
|
||||
<?php if($this->data['catlinks']) { ?><div id="catlinks"><?php $this->html('catlinks') ?></div><?php } ?>
|
||||
<!-- end content -->
|
||||
</div>
|
||||
|
||||
<!-- Top login, etc. bar -->
|
||||
<!-- #p-personal moved to inside #content so the text color says the same -->
|
||||
<script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
|
||||
</div>
|
||||
<div id="bottom">
|
||||
<div id="footer">
|
||||
<?php
|
||||
if($this->data['poweredbyico']) { ?>
|
||||
<div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div>
|
||||
<?php }
|
||||
if($this->data['copyrightico']) { ?>
|
||||
<div id="f-copyrightico"><?php $this->html('copyrightico') ?></div>
|
||||
<?php }
|
||||
|
||||
// Generate additional footer links
|
||||
?>
|
||||
<p class="copy">
|
||||
Copyright © <?php echo date('Y');?> Red Hat, Inc. and others. All Rights Reserved. For comments or queries, please <a href="/contact">contact us</a>.
|
||||
</p>
|
||||
<p class="disclaimer">
|
||||
The Fedora Project is maintained and driven by the community and sponsored by Red Hat. This is a community maintained site. Red Hat is not responsible for content.
|
||||
</p>
|
||||
<ul>
|
||||
<?php
|
||||
$footerlinks = array(
|
||||
'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
|
||||
);
|
||||
$count = 0;
|
||||
foreach( $footerlinks as $aLink ) {
|
||||
$count++;
|
||||
$first = '';
|
||||
if ($count == 1) {
|
||||
$first = ' class="first"';
|
||||
}
|
||||
if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
|
||||
?> <li<?php echo$first?> id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<ul>
|
||||
<?php
|
||||
$footerlinks = array(
|
||||
'privacy', 'about', 'disclaimer', 'tagline',
|
||||
);
|
||||
$count = 0;
|
||||
foreach( $footerlinks as $aLink ) {
|
||||
$count++;
|
||||
$first = '';
|
||||
if ($count == 1) {
|
||||
$first = ' class="first"';
|
||||
}
|
||||
if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
|
||||
?> <li<?php echo$first?> id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
<li><a href="http://fedoraproject.org/en/sponsors">Sponsors</a></li>
|
||||
<li><a href="http://fedoraproject.org/wiki/Legal:Main">Legal</a></li>
|
||||
<li><a href="http://fedoraproject.org/wiki/Legal:Trademark_guidelines">Trademark Guidelines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
|
||||
<?php $this->html('reporttime') ?>
|
||||
<?php if ( $this->data['debug'] ): ?>
|
||||
<!-- Debug output:
|
||||
<?php $this->text( 'debug' ); ?>
|
||||
|
||||
-->
|
||||
<?php endif; ?>
|
||||
</body></html>
|
||||
<?php
|
||||
wfRestoreWarnings();
|
||||
} // end of execute() method
|
||||
} // end of class
|
||||
?>
|
67
roles/mediawiki/files/skins/fedora/IE50Fixes.css
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
** IE5.0 Fix Stylesheet
|
||||
*/
|
||||
|
||||
#column-content {
|
||||
margin: 0 !important;
|
||||
float: none;
|
||||
}
|
||||
#column-content #content {
|
||||
margin-top: 3em;
|
||||
height: 1%;
|
||||
}
|
||||
#column-one {
|
||||
position: absolute;
|
||||
overflow: visible;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 3;
|
||||
}
|
||||
#footer {
|
||||
margin: 0 0 0 13.6em;
|
||||
}
|
||||
|
||||
/* IE 5 & 5.5 interpret keyword sizes one off */
|
||||
body { font-size: xx-small; }
|
||||
/*
|
||||
** the edit tabs
|
||||
*/
|
||||
#p-cactions li {
|
||||
float: left;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0 !important;
|
||||
height: 0.9em;
|
||||
}
|
||||
#p-cactions li a {
|
||||
display: block;
|
||||
padding-bottom: 0.045em;
|
||||
}
|
||||
#p-cactions li.selected a {
|
||||
padding-bottom: 0.17em;
|
||||
}
|
||||
#p-cactions li a:hover {
|
||||
padding-bottom: 0.17em;
|
||||
}
|
||||
/* 5.0 doesn't like the background icon for external links and user */
|
||||
.link-external,
|
||||
.external {
|
||||
background: none;
|
||||
padding: 0;
|
||||
}
|
||||
#p-personal ul { float: right }
|
||||
#p-personal li { float: left }
|
||||
li#pt-userpage,
|
||||
li#pt-anonuserpage,
|
||||
li#pt-login,
|
||||
li#pt-logout {
|
||||
background: none;
|
||||
padding-left: none;
|
||||
}
|
||||
.visualClear {
|
||||
width: 100%;
|
||||
height: 0px;
|
||||
padding:0;
|
||||
margin: 0;
|
||||
}
|
||||
.firstHeading { margin-bottom: .3em; }
|
||||
/*div{ border:1px solid Red !important;}*/
|
85
roles/mediawiki/files/skins/fedora/IE55Fixes.css
Normal file
|
@ -0,0 +1,85 @@
|
|||
/* IE5.5/win- only fixes */
|
||||
|
||||
#column-content {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
height: 1%;
|
||||
}
|
||||
#column-content #content {
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
margin-left: 12.2em;
|
||||
margin-top: 3em;
|
||||
height: 1%;
|
||||
}
|
||||
#column-one {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 4;
|
||||
width: 100%;
|
||||
}
|
||||
#footer {
|
||||
margin-left: 13.6em;
|
||||
border-left: 1px solid #fabd23;
|
||||
}
|
||||
|
||||
/*#bodyContent div,
|
||||
#bodyContent pre { overflow: auto; }*/
|
||||
|
||||
#p-personal { padding-bottom: .1em; }
|
||||
|
||||
body { font-size: xx-small; }
|
||||
|
||||
#p-cactions {
|
||||
width: 76% !important;
|
||||
z-index: 3 !important;
|
||||
float: none;
|
||||
}
|
||||
#p-cactions li {
|
||||
padding-bottom: 0 !important;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
cursor: default;
|
||||
float: none !important;
|
||||
}
|
||||
#p-cactions li a {
|
||||
display: inline-block !important;
|
||||
vertical-align: top;
|
||||
padding-bottom: 0;
|
||||
border: solid #aaa;
|
||||
border-width: 1px 1px 0;
|
||||
}
|
||||
#p-cactions li.selected a {
|
||||
border-color: #fabd23;
|
||||
padding-bottom: 0.17em;
|
||||
}
|
||||
#p-cactions li a:hover {
|
||||
padding-bottom: 0.17em;
|
||||
}
|
||||
#p-navigation a {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
.portlet {
|
||||
overflow: hidden;
|
||||
}
|
||||
#bodyContent a.external {
|
||||
background: url(external.png) center right no-repeat;
|
||||
padding-right: 13px;
|
||||
}
|
||||
/* show the hand */
|
||||
#p-logo a,
|
||||
#p-logo a:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.visualClear {
|
||||
width: 90%;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#editform {
|
||||
width: 100%;
|
||||
}
|
84
roles/mediawiki/files/skins/fedora/IE60Fixes.css
Normal file
|
@ -0,0 +1,84 @@
|
|||
/* 6.0 - only fixes */
|
||||
/* content area */
|
||||
/* workaround for various ie float bugs */
|
||||
#column-content {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
height: 1%;
|
||||
}
|
||||
#column-content #content {
|
||||
margin-left: 12.2em;
|
||||
margin-top: 3em;
|
||||
height: 1%;
|
||||
}
|
||||
#column-one {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
#footer {
|
||||
margin-left: 13.6em;
|
||||
border-left: 1px solid #fabd23;
|
||||
}
|
||||
|
||||
/* the tabs */
|
||||
|
||||
#p-cactions {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
#p-cactions li {
|
||||
padding-bottom: 0 !important;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
cursor: default;
|
||||
float: none !important;
|
||||
}
|
||||
#p-cactions li a {
|
||||
display: inline-block !important;
|
||||
vertical-align: top;
|
||||
padding-bottom: 0;
|
||||
border: solid #aaa;
|
||||
border-width: 1px 1px 0;
|
||||
}
|
||||
#p-cactions li.selected a {
|
||||
border-color: #fabd23;
|
||||
padding-bottom: 0.17em;
|
||||
}
|
||||
#p-cactions li a:hover {
|
||||
padding-bottom: 0.17em;
|
||||
}
|
||||
#p-navigation a {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
#portal-personaltools {
|
||||
padding-bottom: 0.1em;
|
||||
}
|
||||
#bodyContent a.external {
|
||||
background: url(external.png) center right no-repeat;
|
||||
padding-right: 13px;
|
||||
}
|
||||
|
||||
/* show the hand */
|
||||
#p-logo a,
|
||||
#p-logo a:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
div.visualClear {
|
||||
width:100%;
|
||||
line-height: 0;
|
||||
}
|
||||
textarea {
|
||||
width: 96%;
|
||||
}
|
||||
|
||||
div.editsection,
|
||||
#catlinks,
|
||||
div.tright,
|
||||
div.tleft {
|
||||
position: relative;
|
||||
}
|
||||
/*{ border:1px solid Red !important;}*/
|
||||
|
74
roles/mediawiki/files/skins/fedora/IE70Fixes.css
Normal file
|
@ -0,0 +1,74 @@
|
|||
/* 7.0 - only fixes */
|
||||
/* content area */
|
||||
/* workaround for various ie float bugs */
|
||||
|
||||
/* This bit is needed to make links clickable... WTF */
|
||||
#column-content #content {
|
||||
margin-left: 12.2em;
|
||||
margin-top: 3em;
|
||||
height: 1%;
|
||||
}
|
||||
|
||||
.rtl #column-one {
|
||||
/* For some reason it tries to inherit the padding-top into every div,
|
||||
* and I can't figure out how to get it back off.
|
||||
* Margin works correctly for this use, though.
|
||||
*/
|
||||
padding-top: 0;
|
||||
margin-top: 160px;
|
||||
}
|
||||
|
||||
/* the tabs */
|
||||
|
||||
#p-cactions {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
|
||||
#p-cactions li {
|
||||
padding-bottom: 0 !important;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
cursor: default;
|
||||
float: none !important;
|
||||
}
|
||||
|
||||
#p-cactions li a {
|
||||
display: inline-block !important;
|
||||
vertical-align: top;
|
||||
padding-bottom: 0;
|
||||
border: solid #aaa;
|
||||
border-width: 1px 1px 0;
|
||||
}
|
||||
#p-cactions li.selected a {
|
||||
border-color: #fabd23;
|
||||
padding-bottom: 0.17em;
|
||||
}
|
||||
#p-cactions li a:hover {
|
||||
padding-bottom: 0.17em;
|
||||
}
|
||||
#p-navigation a {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
#portal-personaltools {
|
||||
padding-bottom: 0.1em;
|
||||
}
|
||||
textarea {
|
||||
width: 96%;
|
||||
}
|
||||
|
||||
/*
|
||||
div.editsection,
|
||||
#catlinks,
|
||||
div.tright,
|
||||
div.tleft {
|
||||
position: relative;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
#footer li {
|
||||
/* Work around bug with inline <li> tags with right margins and nowrap */
|
||||
margin-right: 0;
|
||||
}
|
44
roles/mediawiki/files/skins/fedora/IEMacFixes.css
Normal file
|
@ -0,0 +1,44 @@
|
|||
/* IE/Mac only fix stylesheet, imported from main.css */
|
||||
#portal-column-content {
|
||||
margin: 0 0 4.8em 0;
|
||||
float: none;
|
||||
}
|
||||
#portal-column-content #content {
|
||||
z-index: 0;
|
||||
}
|
||||
#portal-column-one {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 3;
|
||||
}
|
||||
#portal-footer {
|
||||
margin-left: 12em;
|
||||
}
|
||||
/*
|
||||
#portlet-contentViews {
|
||||
top: 0.6em !important;
|
||||
left: 14.5em !important;
|
||||
}
|
||||
*/
|
||||
#portlet-contentViews li,
|
||||
#portlet-contentViews .selected {
|
||||
border: none !important;
|
||||
}
|
||||
#portlet-contentViews li a {
|
||||
border: 1px solid #aaaaaa;
|
||||
border-bottom: none;
|
||||
}
|
||||
#portlet-contentViews li.selected a {
|
||||
border: 1px solid #fabd23;
|
||||
border-bottom: none;
|
||||
}
|
||||
/* no background images */
|
||||
li#personaltools-userpage,
|
||||
li#personaltools-login/* */ {
|
||||
background: none;
|
||||
padding-left: none;
|
||||
}
|
||||
#mactest {
|
||||
color: green;
|
||||
}
|
3
roles/mediawiki/files/skins/fedora/KHTMLFixes.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
/* KHTML fix stylesheet */
|
||||
/* work around the horizontal scrollbars */
|
||||
#column-content { margin-left: 0; }
|
14
roles/mediawiki/files/skins/fedora/Opera6Fixes.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
/* opera 6 fixes */
|
||||
#column-one {
|
||||
position: relative;
|
||||
max-width: 11.7em;
|
||||
}
|
||||
#p-personal {
|
||||
width: 45em;
|
||||
margin-left: 8.6em;
|
||||
right: 0;
|
||||
}
|
||||
#bodyContent a.external {
|
||||
background: url(external.png) center right no-repeat;
|
||||
padding-right: 13px;
|
||||
}
|
11
roles/mediawiki/files/skins/fedora/Opera7Fixes.css
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* small tweaks for opera seven */
|
||||
#p-cactions {
|
||||
margin-top: .1em;
|
||||
}
|
||||
#p-cactions li a {
|
||||
top: 2px;
|
||||
}
|
||||
#bodyContent a.external {
|
||||
background: url(external.png) center right no-repeat;
|
||||
padding-right: 13px;
|
||||
}
|
BIN
roles/mediawiki/files/skins/fedora/audio.png
Normal file
After Width: | Height: | Size: 312 B |
BIN
roles/mediawiki/files/skins/fedora/document.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
roles/mediawiki/files/skins/fedora/external.png
Normal file
After Width: | Height: | Size: 165 B |
1337
roles/mediawiki/files/skins/fedora/handheld.css
Normal file
BIN
roles/mediawiki/files/skins/fedora/magnify-clip.png
Normal file
After Width: | Height: | Size: 237 B |
1638
roles/mediawiki/files/skins/fedora/main-bak.css
Normal file
1549
roles/mediawiki/files/skins/fedora/main.css
Normal file
BIN
roles/mediawiki/files/skins/fedora/news_icon.png
Normal file
After Width: | Height: | Size: 297 B |
221
roles/mediawiki/files/skins/fedora/rtl.css
Normal file
|
@ -0,0 +1,221 @@
|
|||
/*
|
||||
Right-to-left fixes for MonoBook.
|
||||
Places sidebar on right, tweaks various alignment issues.
|
||||
|
||||
Works mostly ok nicely on Safari 1.2.1; fine in Mozilla.
|
||||
|
||||
Safari bugs (1.2.1):
|
||||
* Tabs are still appearing in left-to-right order. (Try after localizing)
|
||||
|
||||
Opera bugs (7.23 linux):
|
||||
* Some bits of ltr text (sidebar box titles) have forward and backward versions overlapping each other
|
||||
|
||||
IE/mac bugs:
|
||||
* The thing barfs on Hebrew and Arabic anyway, so no point testing.
|
||||
|
||||
Missing features due to lack of support:
|
||||
* external link icons
|
||||
|
||||
To test:
|
||||
* Opera6
|
||||
* IE 5.0
|
||||
* etc
|
||||
|
||||
*/
|
||||
body {
|
||||
direction: rtl;
|
||||
/* unicode-bidi: bidi-override;*/
|
||||
unicode-bidi: embed;
|
||||
}
|
||||
#column-content {
|
||||
margin: 0 -12.2em 0 0;
|
||||
float: left;
|
||||
}
|
||||
#column-content #content{
|
||||
margin-left: 0;
|
||||
margin-right: 12.2em;
|
||||
border-right: 1px solid #aaaaaa;
|
||||
border-left: none;
|
||||
}
|
||||
html>body .portlet {
|
||||
float: right;
|
||||
clear: right;
|
||||
}
|
||||
.editsection {
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-left: 0; /* bug 9122: undo default LTR */
|
||||
}
|
||||
/* recover IEMac (might be fine with the float, but usually it's close to IE */
|
||||
*>body .portlet {
|
||||
float: none;
|
||||
clear: none;
|
||||
}
|
||||
.pBody {
|
||||
padding-right: 0.8em;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
/* Fix alignment */
|
||||
.documentByLine,
|
||||
.portletDetails,
|
||||
.portletMore,
|
||||
#p-personal {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div div.thumbcaption {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.magnify,
|
||||
#div.townBox,
|
||||
#p-logo {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
#p-personal {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#p-cactions {
|
||||
left: auto;
|
||||
right: 11.5em;
|
||||
padding-left: 0;
|
||||
padding-right: 1em;
|
||||
}
|
||||
#p-cactions li {
|
||||
margin-left: 0.3em;
|
||||
margin-right: 0;
|
||||
float: right;
|
||||
}
|
||||
* html #p-cactions li a {
|
||||
display: block;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
* html #p-cactions li a:hover {
|
||||
padding-bottom: 0.2em;
|
||||
}
|
||||
/* offsets to distinguish the tab groups */
|
||||
li#ca-talk {
|
||||
margin-right: auto;
|
||||
margin-left: 1.6em;
|
||||
}
|
||||
li#ca-watch,li#ca-unwatch {
|
||||
margin-right: 1.6em !important;
|
||||
}
|
||||
|
||||
/* Fix margins for non-css2 browsers */
|
||||
/* top right bottom left */
|
||||
|
||||
ul {
|
||||
margin-left: 0;
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
ol {
|
||||
margin-left: 0;
|
||||
margin-right: 2.4em;
|
||||
}
|
||||
dd {
|
||||
margin-left: 0;
|
||||
margin-right: 1.6em;
|
||||
}
|
||||
#contentSub {
|
||||
margin-right: 1em;
|
||||
margin-left: 0;
|
||||
}
|
||||
.tocindent {
|
||||
margin-left: 0;
|
||||
margin-right: 2em;
|
||||
}
|
||||
div.tright, div.floatright, table.floatright {
|
||||
clear: none;
|
||||
}
|
||||
div.tleft, div.floatleft, table.floatleft {
|
||||
clear: left;
|
||||
}
|
||||
div.townBox {
|
||||
margin-left: 0;
|
||||
margin-right: 1em;
|
||||
}
|
||||
div.townBox dl dd {
|
||||
margin-left: 0;
|
||||
margin-right: 1.1em;
|
||||
}
|
||||
#p-personal li {
|
||||
margin-left: 0;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
li#ca-talk,
|
||||
li#ca-watch {
|
||||
margin-right: auto;
|
||||
margin-left: 1.6em;
|
||||
}
|
||||
|
||||
#p-personal li {
|
||||
float: left;
|
||||
}
|
||||
/* Fix link icons */
|
||||
.external {
|
||||
padding: 0 !important;
|
||||
background: none !important;
|
||||
}
|
||||
#footer {
|
||||
clear: both;
|
||||
}
|
||||
* html #footer {
|
||||
margin-left: 0;
|
||||
margin-right: 13.6em;
|
||||
border-left: 0;
|
||||
border-right: 1px solid #fabd23;
|
||||
}
|
||||
* html #column-content {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
* html #column-content #content {
|
||||
margin-left: 0;
|
||||
margin-top: 3em;
|
||||
}
|
||||
* html #column-one { right: 0; }
|
||||
|
||||
/* js pref toc */
|
||||
|
||||
#preftoc {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.errorbox, .successbox, #preftoc li, .prefsection fieldset {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.prefsection {
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
/* workaround for moz bug, displayed bullets on left side */
|
||||
|
||||
#toc ul {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#toc ul ul {
|
||||
margin: 0 2em 0 0;
|
||||
}
|
||||
|
||||
input#wpSave, input#wpDiff {
|
||||
margin-right: 0;
|
||||
margin-left: .33em;
|
||||
}
|
||||
|
||||
#userlogin {
|
||||
float: right;
|
||||
margin: 0 0 1em 3em;
|
||||
}
|
||||
/* Unblock and Ipblocklist links of Special:Blockip */
|
||||
p.mw-ipb-conveniencelinks {
|
||||
float: left;
|
||||
}
|
BIN
roles/mediawiki/files/skins/fedora/video.png
Normal file
After Width: | Height: | Size: 215 B |
BIN
roles/mediawiki/files/skins/fedora/wiki-indexed.png
Normal file
After Width: | Height: | Size: 8 KiB |
BIN
roles/mediawiki/files/skins/fedora/wiki.png
Normal file
After Width: | Height: | Size: 22 KiB |
95
roles/mediawiki/tasks/main.yml
Normal file
|
@ -0,0 +1,95 @@
|
|||
---
|
||||
- name: install needed packages
|
||||
yum: pkg={{ item }} state=installed
|
||||
with_items:
|
||||
- mediawiki119
|
||||
- mediawiki119-Cite
|
||||
- mediawiki119-Lockdown
|
||||
- mediawiki119-SpecialInterwiki
|
||||
- librsvg2
|
||||
- mediawiki119-HTTP302Found
|
||||
- mediawiki119-intersection
|
||||
- mediawiki119-RSS
|
||||
- mediawiki-FedoraBadges
|
||||
- php-zmq
|
||||
- php-pecl-uuid
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: adding FAS auth
|
||||
copy: src=Auth_FAS.php dest=/usr/share/mediawiki119/extensions/Auth_FAS.php owner=root group=root mode=775
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: adding fedmsg emit
|
||||
copy: src=fedmsg-emit.php dest=/usr/share/mediawiki119/extensions/fedmsg-emit.php owner=root group=root mode=775
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: creating attachments dir
|
||||
file: path=/srv/web/attachments owner=apache group=root mode=755 state=directory
|
||||
|
||||
- name: startup apache
|
||||
service: name=httpd enabled=yes state=started
|
||||
|
||||
- name: mount staging attachments
|
||||
mount: name=/srv/web/attachments src=vtap-fedora-nfs01.storage.phx2.redhat.com:/vol/fedora_app_staging/app/attachments fstype=nfs opts=defaults,rw,hard,intr,nfsvers=3 state=mounted
|
||||
when: env == "staging"
|
||||
|
||||
- name: mount attachments
|
||||
mount: name=/srv/web/attachments src=vtap-fedora-nfs01.storage.phx2.redhat.com:/vol/fedora_app/app/attachments fstype=nfs opts=defaults,rw,hard,intr,nfsvers=3 state=mounted
|
||||
when: env != "staging"
|
||||
|
||||
- name: Fedora branding
|
||||
copy: src=skins/ dest=/usr/share/mediawiki119/skins owner=root group=root mode=775
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: creating wiki dir
|
||||
file: path=/srv/web/{{wikiname}} owner=root group=root mode=755 state=directory
|
||||
|
||||
- name: creating config dir
|
||||
file: src=/usr/share/mediawiki119/config dest=/srv/web/{{wikiname}}/config owner=apache group=apache mode=755 state=directory
|
||||
|
||||
- name: install utils
|
||||
file: src=/usr/share/mediawiki119/install-utils.inc dest=/srv/web/{{wikiname}}/install-utils.inc state=link
|
||||
|
||||
- name: install localsettings
|
||||
template: src=LocalSettings.php.{{wikiname}}.j2 dest=/srv/web/{{wikiname}}/LocalSettings.php owner=apche group=apache mode=600
|
||||
|
||||
- name: httpd conf
|
||||
template: src=mediawiki-app.conf.j2 dest=/etc/httpd/conf.d/{{wikiname}}.conf
|
||||
|
||||
- name: linking index.php
|
||||
file: dest=/srv/web/{{wikiname}}/index.php src=/usr/share/mediawiki119/index.php state=link
|
||||
|
||||
- name: linkng api.php
|
||||
file: dest=/srv/web/{{wikiname}}/api.php src=/usr/share/mediawiki119/api.php state=link
|
||||
|
||||
- name: linking opensearch
|
||||
file: dest=/srv/web/{{wikiname}}/opensearch_desc.php src=/usr/share/mediawiki119/opensearch_desc.php state=link
|
||||
|
||||
- name: linking extensions
|
||||
file: dest=/srv/web/{{wikiname}}/extensions src=/usr/share/mediawiki119/extensions state=link
|
||||
|
||||
- name: linking includes
|
||||
file: dest=/srv/web/{{wikiname}}/includes src=/usr/share/mediawiki119/includes state=link
|
||||
|
||||
- name: linking languages
|
||||
file: dest=/srv/web/{{wikiname}}/languages src=/usr/share/mediawiki119/languages state=link
|
||||
|
||||
- name: linking maintenance
|
||||
file: dest=/srv/web/{{wikiname}}/maintenance src=/usr/share/mediawiki119/maintenance state=link
|
||||
|
||||
- name: linking serialized
|
||||
file: dest=/srv/web/{{wikiname}}/serialized src=/usr/share/mediawiki119/serialized state=link
|
||||
|
||||
- name: linking skins
|
||||
file: dest=/srv/web/{{wikiname}}/skins src=/usr/share/mediawiki119/skins state=link
|
||||
|
||||
- name: linking load
|
||||
file: dest=/srv/web/{{wikiname}}/load.php src=/usr/share/mediawiki119/load.php state=link
|
||||
|
||||
- name: linking resources
|
||||
file: dest=/srv/web/{{wikiname}}/resources src=/usr/share/mediawiki119/resources state=link
|
||||
|
408
roles/mediawiki/templates/LocalSettings.php.fp.j2
Normal file
|
@ -0,0 +1,408 @@
|
|||
<?php
|
||||
# This file was automatically generated by the MediaWiki installer.
|
||||
# If you make manual changes, please keep track in case you need to
|
||||
# recreate them later.
|
||||
#
|
||||
# See includes/DefaultSettings.php for all configurable settings
|
||||
# and their default values, but don't forget to make changes in _this_
|
||||
# file, not there.
|
||||
#error_reporting(1);
|
||||
#session_start();
|
||||
|
||||
# If you customize your file layout, set $IP to the directory that contains
|
||||
# the other MediaWiki files. It will be used as a base to locate files.
|
||||
if( defined( 'MW_INSTALL_PATH' ) ) {
|
||||
$IP = MW_INSTALL_PATH;
|
||||
} else {
|
||||
$IP = dirname( __FILE__ );
|
||||
}
|
||||
|
||||
|
||||
#$IP = '/usr/share/mediawiki';
|
||||
$path = array( $IP, "$IP/includes", "$IP/languages" );
|
||||
set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );
|
||||
|
||||
# Added for timeout testing
|
||||
require_once( "includes/DefaultSettings.php" );
|
||||
#$wgDebugLogFile = '/tmp/out.log';
|
||||
require_once( "extensions/ConfirmEdit/ConfirmEdit.php" );
|
||||
#require_once( "extensions/ConfirmEdit/FancyCaptcha.php" );
|
||||
$wgCaptchaClass = 'SimpleCaptcha';
|
||||
#$wgCaptchaClass = 'FancyCaptcha';
|
||||
#$wgCaptchaDirectory = "/srv/web/attachments/captchas";
|
||||
#$wgCaptchaDirectoryLevels = 0;
|
||||
#$wgCaptchaSecret = "{{ mediawikiCaptchaKey }}";
|
||||
|
||||
$wgRawHtml = false;
|
||||
$wgProto = "https";
|
||||
{% if env == "staging" %}
|
||||
$wgServer = "https://stg.fedoraproject.org";
|
||||
{% else %}
|
||||
$wgServer = "https://fedoraproject.org";
|
||||
{% end %}
|
||||
$wgCookieSecure = true;
|
||||
$wgFeedDiffCutoff=32000;
|
||||
|
||||
|
||||
# Caching Settings
|
||||
$wgUseFileCache = false;
|
||||
$wgFileCacheDirectory = '/var/cache/mediawiki/';
|
||||
$wgShowIPinHeader = false;
|
||||
$wgUseETag = true;
|
||||
|
||||
if ( $wgCommandLineMode ) {
|
||||
if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
|
||||
die( "This script must be run from the command line\n" );
|
||||
}
|
||||
}
|
||||
## Uncomment this to disable output compression
|
||||
# $wgDisableOutputCompression = true;
|
||||
|
||||
$wgSitename = "FedoraProject";
|
||||
|
||||
$wgUploadPath = "$wgScriptPath/attachments"; /// defaults to "{$wgScriptPath}/images"
|
||||
$wgUploadPath = "/w/uploads"; /// defaults to "{$wgScriptPath}/images"
|
||||
$wgUploadDirectory = "/srv/web/attachments"; /// defaults to "{$IP}/images"
|
||||
$wgHashedUploadDirectory = true;
|
||||
$wgCheckFileExtensions=false;
|
||||
$wgStrictFileExtensions=false;
|
||||
#$wgLoadFileinfoExtension=false;
|
||||
$wgVerifyMimeType= false;
|
||||
$wgMimeDetectorCommand= "file -bi";
|
||||
|
||||
#$wgFileExtensions = false;
|
||||
#$wgGroupPermissions['user' ]['delete'] = true;
|
||||
|
||||
$wgGroupPermissions['*']['createaccount'] = false;
|
||||
|
||||
# HNP Can't manage the interwiki right... - Nigel
|
||||
$wgGroupPermissions['*']['interwiki'] = false;
|
||||
$wgGroupPermissions['sysop']['interwiki'] = true;
|
||||
|
||||
# Create a patrollers group to help check wiki edits - Ian
|
||||
$wgGroupPermissions['patrollers']['patrol'] = true;
|
||||
$wgGroupPermissions['patrollers']['autopatrol'] = true;
|
||||
$wgGroupPermissions['sysop']['patrol'] = false;
|
||||
$wgGroupPermissions['sysop']['autopatrol'] = false;
|
||||
|
||||
# Create a pruners group to delete pages in accordance with new deletion policy - Ian
|
||||
$wgGroupPermissions['pruners']['delete'] = true;
|
||||
$wgGroupPermissions['pruners']['bigdelete'] = true;
|
||||
$wgGroupPermissions['pruners']['deletedhistory'] = true;
|
||||
$wgGroupPermissions['pruners']['undelete'] = true;
|
||||
|
||||
## The URL base path to the directory containing the wiki;
|
||||
## defaults for all runtime URL paths are based off of this.
|
||||
#$wgScriptPath = "/wiki";
|
||||
$wgScriptPath = "/{{ wpath }}";
|
||||
$wgScriptExtension = ".php";
|
||||
$wgScript = "$wgScriptPath/index.php";
|
||||
$wgRedirectScript = "$wgScriptPath/redirect.php";
|
||||
$wgArticlePath = "/{{ wikipath }}/$1";
|
||||
|
||||
|
||||
## For more information on customizing the URLs please see:
|
||||
## http://www.mediawiki.org/wiki/Manual:Short_URL
|
||||
|
||||
$wgEnableEmail = true;
|
||||
$wgEnableUserEmail = true;
|
||||
|
||||
$wgEmergencyContact = "webmaster@fedoraproject.org";
|
||||
$wgPasswordSender = "fedorawiki-noreply@fedoraproject.org";
|
||||
$wgNoReplyAddress = "fedorawiki-noreply@fedoraproject.org";
|
||||
|
||||
|
||||
#$wgSMTP = array(
|
||||
# "host" => 'bastion',
|
||||
# "port" => '25'
|
||||
#);
|
||||
|
||||
## For a detailed description of the following switches see
|
||||
## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent
|
||||
## There are many more options for fine tuning available see
|
||||
## /includes/DefaultSettings.php
|
||||
## UPO means: this is also a user preference option
|
||||
$wgEnotifUserTalk = true; # UPO
|
||||
$wgEnotifWatchlist = true; # UPO
|
||||
$wgEmailAuthentication = false;
|
||||
|
||||
$wgDBtype = "mysql";
|
||||
$wgDBserver = "db05";
|
||||
$wgDBname = "fpo-mediawiki";
|
||||
$wgDBuser = "fpo-mw-user";
|
||||
$wgDBpassword = "{{ fpoPassword }}";
|
||||
$wgDBport = "5432";
|
||||
$wgDBprefix = "en_";
|
||||
|
||||
# MySQL table options to use during installation or update
|
||||
$wgDBTableOptions = "TYPE=InnoDB";
|
||||
|
||||
# Schemas for Postgres
|
||||
$wgDBmwschema = "mediawiki";
|
||||
$wgDBts2schema = "public";
|
||||
|
||||
# Experimental charset support for MySQL 4.1/5.0.
|
||||
$wgDBmysql5 = false;
|
||||
|
||||
## Shared memory settings
|
||||
$wgMainCacheType = CACHE_MEMCACHED;
|
||||
$wgParserCacheType = CACHE_MEMCACHED;
|
||||
$wgMessageCacheType = CACHE_MEMCACHED;
|
||||
$wgSessionsInMemcached = true;
|
||||
$wgMemCachedServers = array (
|
||||
0 => 'memcached03:11211',
|
||||
1 => 'memcached04:11211',
|
||||
);
|
||||
|
||||
## To enable image uploads, make sure the 'images' directory
|
||||
## is writable, then set this to true:
|
||||
$wgEnableUploads = true;
|
||||
$wgUseImageMagick = false;
|
||||
#$wgUseImageMagick = true;
|
||||
#$wgImageMagickConvertCommand = "/usr/bin/convert";
|
||||
|
||||
## If you want to use image uploads under safe mode,
|
||||
## create the directories images/archive, images/thumb and
|
||||
## images/temp, and make them all writable. Then uncomment
|
||||
## this, if it's not already uncommented:
|
||||
# $wgHashedUploadDirectory = false;
|
||||
|
||||
## If you have the appropriate support software installed
|
||||
## you can enable inline LaTeX equations:
|
||||
$wgUseTeX = false;
|
||||
|
||||
$wgLocalInterwiki = $wgSitename;
|
||||
|
||||
$wgLanguageCode = "en";
|
||||
|
||||
$wgProxyKey = "b957b9365f724d22f666998b751507c551c66484bf75b1cc33802a67e92b0827";
|
||||
|
||||
## Default skin: you can change the default skin. Use the internal symbolic
|
||||
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
|
||||
$wgDefaultSkin = 'fedora';
|
||||
|
||||
## For attaching licensing metadata to pages, and displaying an
|
||||
## appropriate copyright notice / icon. GNU Free Documentation
|
||||
## License and Creative Commons licenses are supported so far.
|
||||
$wgEnableCreativeCommonsRdf = false;
|
||||
$wgRightsPage = "Legal:Main"; # Set to the title of a wiki page that describes your license/copyright
|
||||
$wgRightsUrl = "http://creativecommons.org/licenses/by-sa/3.0/";
|
||||
$wgRightsText = "Attribution-Share Alike 3.0 Unported";
|
||||
$wgRightsIcon = "";
|
||||
# $wgRightsCode = "[license_code]"; # Not yet used
|
||||
|
||||
$wgDiff3 = "/usr/bin/diff3";
|
||||
|
||||
# When you make changes to this configuration file, this will make
|
||||
# sure that cached pages are cleared.
|
||||
$configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );
|
||||
$wgCacheEpoch = max( $wgCacheEpoch, $configdate );
|
||||
|
||||
define("NS_ARCHIVE", 100);
|
||||
define("NS_ARCHIVE_TALK",101);
|
||||
define("NS_MEETING",102);
|
||||
define("NS_MEETING_TALK",103);
|
||||
define("NS_QA",104);
|
||||
define("NS_QA_TALK",105);
|
||||
define("NS_LEGAL", 106);
|
||||
define("NS_LEGAL_TALK", 107);
|
||||
define("NS_LICENSING", 108);
|
||||
define("NS_LICENSING_TALK", 109);
|
||||
define("NS_PACKAGING", 110);
|
||||
define("NS_PACKAGING_TALK", 111);
|
||||
define("NS_FUDCON", 112);
|
||||
define("NS_FUDCON_TALK", 113);
|
||||
define("NS_TEST_DAY", 114);
|
||||
define("NS_TEST_DAY_TALK", 115);
|
||||
define("NS_TEST_RESULTS", 116);
|
||||
define("NS_TEST_RESULTS_TALK", 117);
|
||||
|
||||
$wgExtraNamespaces[NS_ARCHIVE] = "Archive";
|
||||
$wgExtraNamespaces[NS_ARCHIVE_TALK] = "Archive_talk";
|
||||
$wgExtraNamespaces[NS_MEETING] = "Meeting";
|
||||
$wgExtraNamespaces[NS_MEETING_TALK] = "Meeting_talk";
|
||||
$wgExtraNamespaces[NS_QA] = "QA";
|
||||
$wgExtraNamespaces[NS_QA_TALK] = "QA_talk";
|
||||
$wgExtraNamespaces[NS_LEGAL] = "Legal";
|
||||
$wgExtraNamespaces[NS_LEGAL_TALK] = "Legal_talk";
|
||||
$wgExtraNamespaces[NS_LICENSING] = "Licensing";
|
||||
$wgExtraNamespaces[NS_LICENSING_TALK] = "Licensing_talk";
|
||||
$wgExtraNamespaces[NS_PACKAGING] = "Packaging";
|
||||
$wgExtraNamespaces[NS_PACKAGING_TALK] = "Packaging_talk";
|
||||
$wgExtraNamespaces[NS_FUDCON] = "FUDCon";
|
||||
$wgExtraNamespaces[NS_FUDCON_TALK] = "FUDCon_talk";
|
||||
$wgExtraNamespaces[NS_TEST_DAY] = "Test_Day";
|
||||
$wgExtraNamespaces[NS_TEST_DAY_TALK] = "Test_Day_talk";
|
||||
$wgExtraNamespaces[NS_TEST_RESULTS] = "Test_Results";
|
||||
$wgExtraNamespaces[NS_TEST_RESULTS_TALK] = "Test_Results_talk";
|
||||
|
||||
$wgNamespacesWithSubpages = array(
|
||||
NS_MAIN => true,
|
||||
NS_TALK => true,
|
||||
NS_USER => true,
|
||||
NS_USER_TALK => true,
|
||||
NS_PROJECT_TALK => true,
|
||||
NS_IMAGE_TALK => true,
|
||||
NS_MEDIAWIKI_TALK => true,
|
||||
NS_TEMPLATE_TALK => true,
|
||||
NS_HELP_TALK => true,
|
||||
NS_CATEGORY_TALK => true,
|
||||
NS_ARCHIVE => true,
|
||||
NS_ARCHIVE_TALK => true,
|
||||
NS_MEETING => true,
|
||||
NS_MEETING_TALK => true,
|
||||
NS_QA => true,
|
||||
NS_QA_TALK => true,
|
||||
NS_LEGAL => true,
|
||||
NS_LEGAL_TALK => true,
|
||||
NS_LICENSING => true,
|
||||
NS_LICENSING_TALK => true,
|
||||
NS_PACKAGING => true,
|
||||
NS_PACKAGING_TALK => true,
|
||||
NS_FUDCON => true,
|
||||
NS_FUDCON_TALK => true,
|
||||
NS_TEST_DAY => true,
|
||||
NS_TEST_DAY_TALK => true,
|
||||
NS_TEST_RESULTS => true,
|
||||
NS_TEST_RESULTS_TALK => true
|
||||
);
|
||||
|
||||
$wgNamespacesToBeSearchedDefault = array(
|
||||
NS_MAIN => true,
|
||||
NS_TALK => false,
|
||||
NS_USER => false,
|
||||
NS_USER_TALK => false,
|
||||
NS_PROJECT => true,
|
||||
NS_PROJECT_TALK => false,
|
||||
NS_IMAGE => true,
|
||||
NS_IMAGE_TALK => false,
|
||||
NS_MEDIAWIKI => false,
|
||||
NS_MEDIAWIKI_TALK => false,
|
||||
NS_TEMPLATE => false,
|
||||
NS_TEMPLATE_TALK => false,
|
||||
NS_HELP => true,
|
||||
NS_HELP_TALK => false,
|
||||
NS_CATEGORY => true,
|
||||
NS_CATEGORY_TALK => false,
|
||||
NS_ARCHIVE => false,
|
||||
NS_ARCHIVE_TALK => false,
|
||||
NS_MEETING => false,
|
||||
NS_MEETING_TALK => false,
|
||||
NS_QA => false,
|
||||
NS_QA_TALK => false,
|
||||
NS_LEGAL => true,
|
||||
NS_LEGAL_TALK => false,
|
||||
NS_LICENSING => true,
|
||||
NS_LICENSING_TALK => false,
|
||||
NS_PACKAGING => true,
|
||||
NS_PACKAGING_TALK => false,
|
||||
NS_FUDCON => true,
|
||||
NS_FUDCON_TALK => false,
|
||||
NS_TEST_DAY => true,
|
||||
NS_TEST_DAY_TALK => false,
|
||||
NS_TEST_RESULTS => true,
|
||||
NS_TEST_RESULTS_TALK => false
|
||||
);
|
||||
|
||||
#require_once "$IP/extensions/OpenID/OpenID.setup.php";
|
||||
#require 'extensions/StubManager/StubManager.php';
|
||||
#require 'extensions/HNP/HNP.php';
|
||||
require_once "$IP/extensions/ParserFunctions/ParserFunctions.php";
|
||||
require_once "$IP/extensions/Interwiki/Interwiki.php";
|
||||
require_once "$IP/extensions/Cite/Cite.php";
|
||||
require_once "$IP/extensions/Auth_FAS.php";
|
||||
$wgAuth = new Auth_FAS();
|
||||
require_once "$IP/extensions/fedmsg-emit.php";
|
||||
require_once "$IP/extensions/HTTP302Found/HTTP302Found.php";
|
||||
require_once "$IP/extensions/intersection/DynamicPageList.php";
|
||||
require_once "$IP/extensions/RSS/RSS.php";
|
||||
|
||||
$wgShowExceptionDetails = true;
|
||||
|
||||
$wgSkipSkins = array("chick", "cologneblue", "monobook", "myskin", "nostalgia", "simple", "standard");
|
||||
|
||||
$wgSVGConverter = 'rsvg';
|
||||
|
||||
#We use apache, but apparently it's the same difference
|
||||
$wgUseSquid = true;
|
||||
$wgSquidServers = array(
|
||||
{% if environment == "staging" %}
|
||||
# proxy01.stg
|
||||
"10.5.126.88",
|
||||
{% else %}
|
||||
# proxy01
|
||||
"10.5.126.52",
|
||||
"192.168.1.11",
|
||||
|
||||
# proxy02
|
||||
"85.236.55.5",
|
||||
"2001:4178:2:1269::fed1",
|
||||
"192.168.1.12",
|
||||
|
||||
# proxy03
|
||||
"66.35.62.162",
|
||||
"192.168.1.7",
|
||||
|
||||
# proxy04
|
||||
"152.19.134.142",
|
||||
"2610:28:3090:3001:dead:beef:cafe:fed3",
|
||||
"192.168.1.14",
|
||||
|
||||
# proxy06
|
||||
"140.211.169.196",
|
||||
"192.168.1.63",
|
||||
|
||||
# proxy07
|
||||
"213.175.193.205",
|
||||
"192.168.1.52",
|
||||
{% end %}
|
||||
);
|
||||
$wgSquidServersNoPurge = array('127.0.0.1');
|
||||
$wgSquidMaxage = 432000;
|
||||
|
||||
# Don't add rel="nofollow"
|
||||
$wgNoFollowLinks = false;
|
||||
|
||||
# This can be an array in version 1.14 and above.
|
||||
$wgAllowExternalImagesFrom = array("http://fedoraproject.org/", "http://docs.fedoraproject.org", "http://fedorahosted.org/", "http://fedorapeople.org", "http://planet.fedoraproject.org");
|
||||
|
||||
$wgAllowUserCss = true;
|
||||
$wgAllowUserJs = true;
|
||||
|
||||
$wgEnableWriteAPI = true;
|
||||
|
||||
$wgLogo = "http://fedoraproject.org/static/images/fedora-logo.png";
|
||||
|
||||
### LOCKDOWN PERMISSIONS ###
|
||||
$wgGroupPermissions['Legal']['read'] = true;
|
||||
$wgGroupPermissions['Packaging']['read'] = true;
|
||||
|
||||
require_once( "$IP/extensions/Lockdown/Lockdown.php" );
|
||||
|
||||
$wgSpecialPageLockdown['Export'] = array('*');
|
||||
|
||||
$wgNamespacePermissionLockdown['*']['edit'] = array('user');
|
||||
$wgNamespacePermissionLockdown[NS_FUDCON]['edit'] = array('*');
|
||||
$wgNamespacePermissionLockdown[NS_TEST_DAY]['edit'] = array('*');
|
||||
$wgNamespacePermissionLockdown[NS_TEST_RESULTS]['edit'] = array('*');
|
||||
$wgNamespacePermissionLockdown[NS_LEGAL]['edit'] = array('Legal');
|
||||
$wgNamespacePermissionLockdown[NS_LICENSING]['edit'] = array('Legal');
|
||||
$wgNamespacePermissionLockdown[NS_PACKAGING]['edit'] = array('Packaging');
|
||||
|
||||
$wgNamespacePermissionLockdown['*']['move'] = array('user');
|
||||
$wgNamespacePermissionLockdown[NS_LEGAL]['move'] = array('Legal');
|
||||
$wgNamespacePermissionLockdown[NS_LICENSING]['move'] = array('Legal');
|
||||
$wgNamespacePermissionLockdown[NS_PACKAGING]['move'] = array('Packaging');
|
||||
### END LOCKDOWN PERMISSIONS ###
|
||||
|
||||
# Experimentation - Added by nigelj 30/Dec/2008
|
||||
$wgSearchType = "SearchMySQL";
|
||||
|
||||
# page_counter is known to be slow, disabled for performance reasons
|
||||
$wgDisableCounters = true;
|
||||
|
||||
#$wgReadOnly = "Wiki Maintenance In Progress - ETA: 15 August 08 04:00 UTC";
|
||||
$wgStyleVersion = '273';
|
||||
|
||||
# Fedora Badges Extension
|
||||
require_once( "$IP/extensions/FedoraBadges/FedoraBadges.php" );
|
11
roles/mediawiki/templates/mediawiki-app.conf.j2
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Shared uploads directory.
|
||||
Alias /{{ wpath }}/uploads /srv/web/attachments
|
||||
|
||||
Alias /{{ wpath }} /srv/web/{{ wikiname }}-wiki
|
||||
Alias /{{ wikipath }} /srv/web/{{ wikiname }}-wiki/index.php
|
||||
|
||||
<Directory /srv/web/{{ wikiname }}-wiki>
|
||||
Options SymLinksIfOwnerMatch
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
17
roles/mediawiki/templates/mediawiki-proxy.conf.erb
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% if force_ssl_login %}
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteCond %{QUERY_STRING} Special:Userlogin [NC]
|
||||
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NE,L]
|
||||
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteCond %{QUERY_STRING} action= [NC]
|
||||
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NE,L]
|
||||
{% end %}
|
||||
|
||||
# /wiki must come before /w due to prefix matching.
|
||||
ProxyPass {{ wikipath }} {{ proxyurl }}{{ wikipath }}
|
||||
ProxyPassReverse {{ wikipath }} {{ proxyurl }}{{ wikipath }}
|
||||
|
||||
ProxyPass {{ wpath }} {{ proxyurl }}{{ wpath }}
|
||||
ProxyPassReverse {{ wpath }} {{ proxyurl }}{{ wpath }}
|