$text .= wfMsg( 'userstatstext',
$wgLang->formatNum( $users ),
$wgLang->formatNum( $admins ),
- '[[' . wfMsgForContent( 'administrators' ) . ']]',
- // should logically be after #admins, damn backwards compatability!
- $wgLang->formatNum( sprintf( '%.2f', $admins / $users * 100 ) )
+ '[[' . wfMsgForContent( 'administrators' ) . ']]', # TODO somehow remove, kept for backwards compatibility
+ $wgLang->formatNum( sprintf( '%.2f', $admins / $users * 100 ) ),
+ User::makeGroupLinkWiki( 'sysop' )
);
$wgOut->addWikiText( $text );
-
+
global $wgDisableCounters, $wgMiserMode, $wgUser, $wgLang, $wgContLang;
if( !$wgDisableCounters && !$wgMiserMode ) {
$sql = "SELECT page_namespace, page_title, page_counter FROM {$page} WHERE page_is_redirect = 0 AND page_counter > 0 ORDER BY page_counter DESC";
* @return array list of permission key names for given groups combined
* @static
*/
- function getGroupPermissions( $groups ) {
+ static function getGroupPermissions( $groups ) {
global $wgGroupPermissions;
$rights = array();
foreach( $groups as $group ) {
* @return string localized descriptive name for group, if provided
* @static
*/
- function getGroupName( $group ) {
+ static function getGroupName( $group ) {
$key = "group-$group";
$name = wfMsg( $key );
if( $name == '' || $name == "<$key>" ) {
* @return string localized descriptive name for member of a group, if provided
* @static
*/
- function getGroupMember( $group ) {
+ static function getGroupMember( $group ) {
$key = "group-$group-member";
$name = wfMsg( $key );
if( $name == '' || $name == "<$key>" ) {
}
}
-
/**
* Return the set of defined explicit groups.
* The *, 'user', 'autoconfirmed' and 'emailconfirmed'
* @return array
* @static
*/
- function getAllGroups() {
+ static function getAllGroups() {
global $wgGroupPermissions;
return array_diff(
array_keys( $wgGroupPermissions ),
array( '*', 'user', 'autoconfirmed', 'emailconfirmed' ) );
}
-
+
/**
* Get the title of a page describing a particular group
*
* @param $group Name of the group
* @return mixed
*/
- function getGroupPage( $group ) {
+ static function getGroupPage( $group ) {
$page = wfMsgForContent( 'grouppage-' . $group );
if( !wfEmptyMsg( 'grouppage-' . $group, $page ) ) {
$title = Title::newFromText( $page );
}
return false;
}
-
-
+
+ /**
+ * Create a link to the group in HTML, if available
+ *
+ * @param $group Name of the group
+ * @param $text The text of the link
+ * @return mixed
+ */
+ static function makeGroupLinkHTML( $group, $text = '' ) {
+ if( $text == '' ) {
+ $text = self::getGroupName( $group );
+ }
+ $title = self::getGroupPage( $group );
+ if( $title ) {
+ global $wgUser;
+ $sk = $wgUser->getSkin();
+ return $sk->makeLinkObj( $title, $text );
+ } else {
+ return $text;
+ }
+ }
+
+ /**
+ * Create a link to the group in Wikitext, if available
+ *
+ * @param $group Name of the group
+ * @param $text The text of the link (by default, the name of the group)
+ * @return mixed
+ */
+ static function makeGroupLinkWiki( $group, $text = '' ) {
+ if( $text == '' ) {
+ $text = self::getGroupName( $group );
+ }
+ $title = self::getGroupPage( $group );
+ if( $title ) {
+ $page = $title->getPrefixedText();
+ return "[[$page|$text]]";
+ } else {
+ return $text;
+ }
+ }
}
?>
בסך הכול בוצעו בממוצע \'\'\'$5\'\'\' עריכות לדף, והיו \'\'\'$6\'\'\' צפיות לכל עריכה.
-אורך [http://meta.wikimedia.org/wiki/Help:Job_queue תור המשימות] הוא \'\'\'$7\'\'\'
+אורך [http://meta.wikimedia.org/wiki/Help:Job_queue תור המשימות] הוא \'\'\'$7\'\'\'.
\'\'\'$8\'\'\' קבצים הועלו לאתר עד כה.',
-"userstatstext" => "×\99×©× ×\9d '''$1''' [[{{ns:special}}:Listusers|×\9eשת×\9eש×\99×\9d רש×\95×\9e×\99×\9d]] ×\91×\90תר, '''$2''' (×\90×\95 $4%) ×\9eת×\95×\9b×\9d ×\9eפע×\99×\9c×\99 ×\9eער×\9bת (ר×\90×\95 $3).",
+"userstatstext" => "×\99×©× ×\9d '''$1''' [[{{ns:special}}:Listusers|×\9eשת×\9eש×\99×\9d רש×\95×\9e×\99×\9d]] ×\91×\90תר, '''$2''' (×\90×\95 $4%) ×\9eת×\95×\9b×\9d ×\94×\9d $5.",
"statistics-mostpopular" => "הדפים הנצפים ביותר",
# Disambiguations Page