Main Page: Difference between revisions

From Test Wiki
Jump to navigation Jump to search
No edit summary
(→‎Configuration Notes: -- update LocalSettings)
Line 19: Line 19:
$wgContentNamespaces[] = 3000;</pre>
$wgContentNamespaces[] = 3000;</pre>


And to style the LOFE pages I have added multiple classes to [[MediaWiki:Common.css]]. Every custom CSS entry Common.css is limited in scope either with an "lofe-" prefix before the class or object ID:
Trying a new configuration now, saving the one above in case I need to go back:
 
<pre>define("NS_LOFE", 3000);
define("NS_LOFE_TALK", 3001);
define("NS_LIBRARY_OF_FORMATTING_EXAMPLES", 3002);
define("NS_LIBRARY_OF_FORMATTING_EXAMPLES_TALK", 3003);
$wgExtraNamespaces[NS_LOFE] = "LOFE";
$wgExtraNamespaces[NS_LOFE_TALK] = "LOFE_talk";
$wgExtraNamespaces[NS_LIBRARY_OF_FORMATTING_EXAMPLES] = "Library_of_Formatting_Examples";
$wgExtraNamespaces[NS_LIBRARY_OF_FORMATTING_EXAMPLES_TALK] = "Library_of_Formatting_Examples_talk";
$wgContentNamespaces[] = 3000;</pre>
 
To style the LOFE pages I have added multiple classes to [[MediaWiki:Common.css]]. Every custom CSS entry Common.css is limited in scope either with an "lofe-" prefix before the class or object ID:


<pre>div.lofe-side {
<pre>div.lofe-side {

Revision as of 23:08, 26 August 2025

Welcome!

I've set up this wiki to demonstrate a possible new format for the Library of Formatting Examples. Click the link below to view it.

Library of Formatting Examples

Configuration Notes

In order to set up the LOFE domain, I added this to LocalSettings.php:

define("NS_LOFE", 3000);
define("NS_LOFE_TALK", 3001);
$wgExtraNamespaces[NS_LOFE] = "LOFE";
$wgExtraNamespaces[NS_LOFE_TALK] = "LOFE_talk";
$wgContentNamespaces[] = 3000;

Trying a new configuration now, saving the one above in case I need to go back:

define("NS_LOFE", 3000);
define("NS_LOFE_TALK", 3001);
define("NS_LIBRARY_OF_FORMATTING_EXAMPLES", 3002);
define("NS_LIBRARY_OF_FORMATTING_EXAMPLES_TALK", 3003);
$wgExtraNamespaces[NS_LOFE] = "LOFE";
$wgExtraNamespaces[NS_LOFE_TALK] = "LOFE_talk";
$wgExtraNamespaces[NS_LIBRARY_OF_FORMATTING_EXAMPLES] = "Library_of_Formatting_Examples";
$wgExtraNamespaces[NS_LIBRARY_OF_FORMATTING_EXAMPLES_TALK] = "Library_of_Formatting_Examples_talk";
$wgContentNamespaces[] = 3000;

To style the LOFE pages I have added multiple classes to MediaWiki:Common.css. Every custom CSS entry Common.css is limited in scope either with an "lofe-" prefix before the class or object ID:

div.lofe-side {
  max-width:49%;
  float:left;
}

or with the .ns-3000 or .ns-3001 classes representing the custom LOFE namespace.

.ns-3000 #content, .ns-3001 #content {
  background-color:#f6f6f6;
}

The namespace tags will need to be adjusted if the namespace constant is changed in LocalSettings.php.