31 $expirationDays = ceil( $wgCookieExpiration / ( 3600 * 24 ) );
33 <div
class=
"mw-ui-container">
34 <div
id=
"userloginprompt"><?
php $this->
msgWiki(
'loginprompt') ?></div>
36 <div
id=
"languagelinks">
37 <p><?
php $this->
html(
'languages' ); ?></p>
40 <div
id=
"userloginForm">
41 <
form name=
"userlogin" class=
"mw-ui-vform" method=
"post" action=
"<?php $this->text( 'action' ); ?>">
42 <?
php if ( $this->
data[
'loggedin'] ) { ?>
43 <div
class=
"warningbox">
44 <?
php echo $this->
getMsg(
'userlogin-loggedin' )->params( $this->
data[
'loggedinuser'] )->parse(); ?>
47 <section
class=
"mw-form-header">
48 <?
php $this->
html(
'header' ); ?>
51 <?
php if ( $this->
data[
'message'] ) { ?>
52 <div
class=
"<?php $this->text( 'messagetype' ); ?>box">
53 <?
php if ( $this->
data[
'messagetype'] ==
'error' ) { ?>
54 <strong><?
php $this->
msg(
'loginerror' ); ?></strong>
57 <?
php $this->
html(
'message' ); ?>
61 <?
php if ( $this->
data[
'formheader'] ) { ?>
62 <div
class=
"mw-form-formheader">
63 <?
php $this->
html(
'formheader' ); ?>
66 <div
class=
"mw-ui-vform-field">
69 $this->
msg(
'userlogin-yourname' );
71 if ( $this->
data[
'secureLoginUrl'] ) {
73 'href' => $this->
data[
'secureLoginUrl'],
74 'class' =>
'mw-ui-flush-right mw-secure',
75 ], $this->
getMsg(
'userlogin-signwithsecure' )->
text() );
81 'class' =>
'loginText mw-ui-input',
88 'autofocus' => !$this->
data[
'name'],
89 'placeholder' => $this->
getMsg(
'userlogin-yourname-ph' )->
text()
94 <div
class=
"mw-ui-vform-field">
95 <label
for=
"wpPassword1">
97 $this->
msg(
'userlogin-yourpassword' );
101 echo
Html::input(
'wpPassword', null,
'password', [
102 'class' =>
'loginPassword mw-ui-input',
103 'id' =>
'wpPassword1',
106 'autofocus' => (
bool)$this->
data[
'name'],
107 'placeholder' => $this->
getMsg(
'userlogin-yourpassword-ph' )->
text()
113 if ( isset( $this->data[
'usedomain'] ) && $this->data[
'usedomain'] ) {
114 $select =
new XmlSelect(
'wpDomain',
false, $this->data[
'domain'] );
115 $select->setAttribute(
'tabindex', 3 );
116 foreach ( $this->data[
'domainnames']
as $dom ) {
117 $select->addOption( $dom );
120 <div
class=
"mw-ui-vform-field" id=
"mw-user-domain-section">
121 <label
for=
"wpDomain"><?
php $this->
msg(
'yourdomainname' ); ?></label>
122 <?
php echo $select->getHTML(); ?>
127 if ( $this->
haveData(
'extrafields' ) ) {
128 echo $this->data[
'extrafields'];
132 <div
class=
"mw-ui-vform-field">
133 <?
php if ( $this->data[
'canremember'] ) { ?>
134 <div
class=
"mw-ui-checkbox">
135 <input name=
"wpRemember" type=
"checkbox" value=
"1" id=
"wpRemember" tabindex=
"4"
136 <?
php if ( $this->data[
'remember'] ) {
137 echo
'checked="checked"';
139 ><label
for=
"wpRemember">
140 <?
php echo $this->
getMsg(
'userlogin-remembermypassword' )->numParams( $expirationDays )->escaped(); ?></label>
145 <div
class=
"mw-ui-vform-field">
148 'id' =>
'wpLoginAttempt',
149 'name' =>
'wpLoginAttempt',
159 <div
class=
"mw-ui-vform-field mw-form-related-link-container" id=
"mw-userlogin-help">
168 $this->
getMsg(
'userlogin-helplink2' )->
text()
174 if ( $this->data[
'useemail'] && $this->data[
'canreset'] && $this->data[
'resetlink'] ===
true ) {
178 'class' =>
'mw-ui-vform-field mw-form-related-link-container',
182 $this->
getMsg(
'userlogin-resetpassword-link' )->escaped()
187 if ( $this->
haveData(
'createOrLoginHref' ) ) {
188 if ( $this->data[
'loggedin'] ) { ?>
189 <div
class=
"mw-form-related-link-container mw-ui-vform-field">
190 <a
href=
"<?php $this->text( 'createOrLoginHref' ); ?>" id=
"mw-createaccount-join" tabindex=
"7"><?
php $this->
msg(
'userlogin-createanother' ); ?></a>
193 <div
id=
"mw-createaccount-cta" class=
"mw-ui-vform-field">
194 <?
php $this->
msg(
'userlogin-noaccount' ); ?><a
href=
"<?php $this->text( 'createOrLoginHref' ); ?>" id=
"mw-createaccount-join" tabindex=
"7" class=
"mw-ui-button"><?
php $this->
msg(
'userlogin-joinproject' ); ?></a>
202 if ( $this->
haveData(
'uselang' ) ) {
203 $fields .=
Html::hidden(
'uselang', $this->data[
'uselang'] );
206 $fields .=
Html::hidden(
'wpLoginToken', $this->data[
'token'] );
208 if ( $this->data[
'cansecurelogin'] ) {
209 $fields .=
Html::hidden(
'wpForceHttps', $this->data[
'stickhttps'] );
211 if ( $this->data[
'cansecurelogin'] && $this->
haveData(
'fromhttp' ) ) {
212 $fields .=
Html::hidden(
'wpFromhttp', $this->data[
'fromhttp'] );
null means default in associative array form
static getTitleFor($name, $subpage=false, $fragment= '')
Get a localised Title object for a specified special page name.
static rawElement($element, $attribs=[], $contents= '')
Returns an HTML element in a string.
static hidden($name, $value, array $attribs=[])
Convenience function to produce an input element with type=hidden.
Class for generating HTML <select> or <datalist> elements.
New base template for a skin's template extended from QuickTemplate this class features helper method...
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of data
when a variable name is used in a it is silently declared as a new local masking the global
getMsg($name)
Get a Message object with its context set.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned after processing after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock()-offset Set to overwrite offset parameter in $wgRequest set to ''to unsetoffset-wrap String Wrap the message in html(usually something like"<
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static link($target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
$wgCookieExpiration
Default cookie lifetime, in seconds.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
This document describes the state of Postgres support in and is fairly well maintained The main code is very well while extensions are very hit and miss it is probably the most supported database after MySQL Much of the work in making MediaWiki database agnostic came about through the work of creating Postgres as and are nearing end of but without copying over all the usage comments General notes on the but these can almost always be programmed around *Although Postgres has a true BOOLEAN type
static submitButton($contents, array $attrs, array $modifiers=[])
Returns an HTML link element in a string styled as a button (when $wgUseMediaWikiUIEverywhere is enab...
static input($name, $value= '', $type= 'text', array $attribs=[])
Convenience function to produce an "<input>" element.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at name
static makeInternalOrExternalUrl($name)
If url string starts with http, consider as external URL, else internal.
static element($element, $attribs=[], $contents= '')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).