Go to the documentation of this file.
36 return $this->
msg(
'creditspage' )->escaped();
47 if ( $this->
page->getID() == 0 ) {
48 $s = $this->
msg(
'nocredits' )->parse();
71 if ( $cnt > 1 || $cnt < 0 ) {
99 return $this->
msg(
'lastmodifiedatby', $d,
$t )->rawParams(
112 $contributors = $this->
page->getContributors();
114 $others_link =
false;
116 # Hmm... too many to fit!
117 if ( $cnt > 0 && $contributors->count() > $cnt ) {
120 return $this->
msg(
'othercontribs' )->rawParams(
121 $others_link )->params( $contributors->count() )->escaped();
125 $real_names =
array();
126 $user_names =
array();
129 # Sift for real versus user names
131 foreach ( $contributors
as $user ) {
133 if (
$user->isLoggedIn() ) {
135 if ( !in_array(
'realname', $wgHiddenPrefs ) &&
$user->getRealName() ) {
136 $real_names[] =
$link;
138 $user_names[] =
$link;
141 $anon_ips[] = $this->
link( $user );
151 if ( count( $real_names ) ) {
152 $real = $lang->listToText( $real_names );
157 # "ThisSite user(s) A, B and C"
158 if ( count( $user_names ) ) {
159 $user = $this->
msg(
'siteusers' )->rawParams( $lang->listToText( $user_names ) )->params(
160 count( $user_names ) )->escaped();
165 if ( count( $anon_ips ) ) {
166 $anon = $this->
msg(
'anonusers' )->rawParams( $lang->listToText( $anon_ips ) )->params(
167 count( $anon_ips ) )->escaped();
172 # This is the big list, all mooshed together. We sift for blank strings
175 if (
$s !==
false ) {
176 array_push( $fulllist,
$s );
180 $count = count( $fulllist );
182 # "Based on work by ..."
184 ? $this->
msg(
'othercontribs' )->rawParams(
185 $lang->listToText( $fulllist ) )->params(
$count )->escaped()
196 if ( !in_array(
'realname', $wgHiddenPrefs ) && !
$user->isAnon() ) {
197 $real =
$user->getRealName();
204 :
$user->getUserPage();
216 if (
$user->isAnon() ) {
217 return $this->
msg(
'anonuser' )->rawParams(
$link )->parse();
220 if ( !in_array(
'realname', $wgHiddenPrefs ) &&
$user->getRealName() ) {
223 return $this->
msg(
'siteuser' )->rawParams(
$link )->params( $user->
getName() )->escaped();
235 $this->
msg(
'others' )->escaped(),
237 array(
'action' =>
'credits' )
Abstract class for type hinting (accepts WikiPage, Article, ImagePage, CategoryPage)
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
wfProfileIn( $functionname)
Begin profiling of a function.
getName()
Return the name of the action this object responds to.
getUserText( $audience=Revision::FOR_PUBLIC, User $user=null)
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
set to $title object and return false for a match for latest after cache objects are set use the ContentHandler facility to handle CSS and JavaScript for highlighting & $link
static linkKnown( $target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses'))
Identical to link(), except $options defaults to 'known'.
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 noclasses just before the function returns a value If you return true
getAuthor(Page $page)
Get the last author with the last modification time.
static link( $target, $html=null, $customAttribs=array(), $query=array(), $options=array())
This function returns an HTML link to the given target.
othersLink()
Get a link to action=credits of $article page.
wfProfileOut( $functionname='missing')
Stop profiling of a function.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
getCredits( $cnt, $showIfMax=true)
Get a list of contributors.
processing should stop and the error should be shown to the user * false
link(User $user)
Get a link to $user's user page.
getDescription()
Returns the description that goes below the <h1> tag.
getTitle()
Shortcut to get the Title object from the page.
onView()
This is largely cadged from PageHistory::history.
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
msg()
Get a Message object with context set Parameters are the same as wfMessage()
WikiPage Article ImagePage CategoryPage Page $page
Page on which we're performing the action $page.
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
getLanguage()
Shortcut to get the user Language being used for this instance.
getContributors( $cnt, $showIfMax)
Get a list of contributors of $article.
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
getName()
Get the user name, or the IP of an anonymous user.
userLink(User $user)
Get a link to $user's user page.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk page