[Mediawiki-l] How to change defaults for preferences for all users?
Monahon, Peter B.
Peter.Monahon at USPTO.GOV
Wed Sep 26 20:23:14 UTC 2007
[Re: How to change defaults for preferences for all users?]
Well, that' SEARCH - and that's FANTASTIC, Dan - thanks:
> ... Set up default preferences
> for all NEW users (who have
> never logged in yet)...in
> LocalSettings.php by setting
$wgNamespacesToBeSearchedDefault
> For example:
# Choose default SEARCH namespaces:
$myAdditionalNamespacesSearchDefault = array(
NS_MAIN,
NS_TALK,
NS_USER,
NS_USER_TALK,
NS_PROJECT,
NS_PROJECT_TALK,
NS_IMAGE,
NS_IMAGE_TALK,
NS_MEDIAWIKI,
NS_MEDIAWIKI_TALK,
NS_TEMPLATE,
NS_TEMPLATE_TALK,
NS_HELP,
NS_HELP_TALK,
NS_CATEGORY,
NS_CATEGORY_TALK
);
foreach ($myAdditionalNamespacesSearchDefault as $value) {
$wgNamespacesToBeSearchedDefault[$value] = true;
}
That really should go on
http://www.mediawiki.org/wiki/Manual:%24wgNamespacesToBeSearchedDefault
==
Now for the other user preferences defaults - here are the ones
I care about - I wish there was a sysop special page to configure these:
[User profile]
[x] E-mail me when a page I'm watching is changed
[x] E-mail me when my user talk page is changed
[x] E-mail me also for minor edits of pages
[x] Enable e-mail from other users
[x] Send me copies of emails I send to other users
[Editing]
[x] Enable section editing via [edit] links
[x] Enable section editing by right clicking on section titles
(JavaScript)
[x] Edit pages on double click (JavaScript)
[x] Show edit toolbar (JavaScript)
[x] Show preview on first edit
[x] Show preview before edit box
[x] Mark all edits minor by default
[x] Prompt me when entering a blank edit summary
[Recent changes]
[x] Enhanced recent changes (JavaScript)Watchlist
[Search]
Hits per page: 40
Lines per hit: 10
Context per line: 100
[x] all namespaces - see above in LocalSettings.php for new users, see
http://lists.wikimedia.org/pipermail/mediawiki-l/2007-September/023696.h
tml for SQL for existing users!
[Misc]
Underline links: [always]
... other wiki sysops may want to set and or lock other defaults
to pre-configure their wikis to best server their audience, such as
eliminating Skins other than Monobook.
==
I'm reading
http://www.mediawiki.org/wiki/Manual:%24wgDefaultUserOptions ... it seem
like THIS below would be an appropriate cut and paste to add to
LocalSettings.php and change the "defaults" to my preferences:
// ## user preference defaults:
// ## User Profile
// $wgDefaultUserOptions['fancysig'] = 0 ;
// $wgDefaultUserOptions['rememberpassword'] = 0 ; // Remember my login
on this computer.
// $wgDefaultUserOptions['enotifwatchlistpages'] = 0 ; // Only used if
$wgEnotifWatchlist is set.
// $wgDefaultUserOptions['enotifusertalkpages'] = 1 ; // Only used if
$wgEnotifUserTalk is set.
// $wgDefaultUserOptions['enotifminoredits'] = 0 ; // Only used if
$wgEnotifWatchlist and $wgEnotifUserTalk are set.
// $wgDefaultUserOptions['enotifminoredits'] = 1 ; // Only used if
$wgEnotifWatchlist and $wgEnotifUserTalk are set.
// $wgDefaultUserOptions['enotifrevealaddr'] = 0 ; // Only used if
$wgEnotifRevealEditorAddress and either $wgEnotifWatchlist or
$wgEnotifUserTalk are set.
// ## Quickbar
// $wgDefaultUserOptions['quickbar'] = 1 ; // Quickbar location (only
applies if using Cologne Blue or Classic skins). Options are: 0 - None,
1 - Fixed left, 2 - Fixed right, 3 - Floating left, 4 - Floating right.
// ## Skin
// $wgDefaultUserOptions['skin'] = $wgDefaultSkin ;
// ## Math
// $wgDefaultUserOptions['math'] = 1 ; // How to render in-line maths
(contents of <math></math> tags). Only applies if $wgUseTeX is set.
Options are: 0 - Always render PNG, 1 - HTML if very simple or else PNG,
2 - HTML if possible or else PNG, 3 - Leave it as TeX (for text
browsers), 4 - Recommended for modern browsers, 5 - MathML if possible
(experimental)
// ## Files
// $wgDefaultUserOptions['imagesize'] = 2 ; // Size to limit images on
description pages to. Values correspond to the entries in
$wgImageLimits. By default, 2 is 800*600.
// $wgDefaultUserOptions['thumbsize'] = 2 ; // Thumbnail size - Values
Correspond to the entries in $wgThumbLimits. By default, 2 is 180px.
// ## Date and Time
// $wgDefaultUserOptions['date'] = 0 ; // Date format. 0 = No
preference.
// $wgDefaultUserOptions['timecorrection'] = NULL ; // Timezone offset
// ## Editing
// $wgDefaultUserOptions['rows'] = 25 ; // Edit box size (rows)
// $wgDefaultUserOptions['cols'] = 80 ; // Edit box size (columns)
// $wgDefaultUserOptions['editsection'] = 0 ; // Enable section editing
via [edit] links
// $wgDefaultUserOptions['editsectiononrightclick'] = 0 ; // Enable
section editing by right clicking on section titles (JavaScript)
// $wgDefaultUserOptions['editondblclick'] = 0 ; // Edit pages on double
click (JavaScript)
// $wgDefaultUserOptions['editwidth'] = 0 ; // Edit box has full width
// $wgDefaultUserOptions['showtoolbar'] = 1 ; // Show edit toolbar
(requires javascript)
// $wgDefaultUserOptions['previewonfirst'] = 0 ; // Show preview on
first edit
// $wgDefaultUserOptions['previewontop'] = 1 ; // Show preview before
edit box
// $wgDefaultUserOptions['minordefault'] = 0 ; // Mark all edits minor
by default
// $wgDefaultUserOptions['externaleditor'] = 0 ; // Use external editor
by default
// $wgDefaultUserOptions['externaldiff'] = 0 ; // Use external diff by
default
// $wgDefaultUserOptions['uselivepreview'] = 0 ; // Only used if
$wgLivePreview is true.
// $wgDefaultUserOptions['forceeditsummary'] = 0 ; // Prompt user when
entering a blank edit summary
// ## Recent changes
// $wgDefaultUserOptions['rclimit'] = 50 ; // Titles in recent changes
// $wgDefaultUserOptions['hideminor'] = FALSE ; // Hide minor edits in
recent changes
// $wgDefaultUserOptions['shownumberswatching'] = ? ; // Show the number
users, who are watching this page (on recent changes, watch list and
artice pages). Only used if $wgRCShowWatchingUsers is set.
// $wgDefaultUserOptions['usenewrc'] = FALSE ; // Enhanced recent
changes - javascript collapsable tree
// ## Watchlist
// $wgDefaultUserOptions['watchlistdays'] = 3 ; // Number of days to
show in watchlist
// $wgDefaultUserOptions['extendwatchlist'] = 0 ; // Expand watchlist to
show all applicable changes
// $wgDefaultUserOptions['wllimit'] = 250 ; // Number of edits to show
in expanded watchlist (if'extendwatchlist'== 1)
// $wgDefaultUserOptions['watchlisthideown'] = 0 ; // Hide the user's
own edits from the watchlist
// $wgDefaultUserOptions['watchlisthidebots'] = 0 ; // Hide bot edits
from the watchlist
// $wgDefaultUserOptions['watchlisthideminor'] = 0 ; // Hide minor edits
from the watchlist
// $wgDefaultUserOptions['watchcreations'] = 0 ; // Add pages the user
creates to their watchlist
// $wgDefaultUserOptions['watchdefault'] = 0 ; // Add pages the user
edits to their watchlist
// $wgDefaultUserOptions['watchmoves'] = 0 ; // Add pages the user moves
to their watchlist
// $wgDefaultUserOptions['watchdeletion'] = 0 ; // Add pages the user
deletes to their watchlist
// ## Search
// $wgDefaultUserOptions['searchlimit'] = 20 ; // Hits per page
// $wgDefaultUserOptions['contextlines'] = 5 ; // Lines per hit
// $wgDefaultUserOptions['contextchars'] = 50 ; // Context per line
// ## Misc
// $wgDefaultUserOptions['stubthreshold'] = 0 ; // Threshold for stub
display
// $wgDefaultUserOptions['underline'] = 2 ; // Whether to underline
links. Options are: 0 - never, 1 - always, 2 - browser default
// $wgDefaultUserOptions['highlightbroken'] = 1 ; // Format broken links
as red-underlined links (alternative: with a questionmark as the link,
like this?).
// $wgDefaultUserOptions['justify'] = 0 ; // Justify paragraphs
// $wgDefaultUserOptions['numberheadings'] = 0 ; // Option
"Auto-numbering Headings", 1 turns on the numbering of all headings
within articles
// $wgDefaultUserOptions['showtoc'] = 1 ; // Boolean. 1 is show the TOC,
0 is hide it.
// $wgDefaultUserOptions['nocache'] = 0 ; // Disable page caching
// $wgDefaultUserOptions['showjumplinks'] = 1 ; // Enable "jump to"
accessibility links
// $wgDefaultUserOptions['diffonly'] = 0 ; // Don't show page content
below diffs
... and just change the "= number" and remove the leading "//"
to engage the option, then register as a new user and see if it sticks!
It does.
I'll cut and paste these two sections into all my MediaWiki
LocalSettings.php files from here on to help custom configure them on
demand!
Thanks, Dan - you provided the missing link with the search
default settings.
Does someone want to cut and paste this info into
http://www.MediaWiki.org/ - even on the talk discussion page as "here's
how we use these settings" information (and fix the wrapped text lines
to unwrap so that ALL lines start with "//")?
More information about the MediaWiki-l
mailing list