diff -r 993fb077944f -r ac34de920762 plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Fri Dec 28 00:07:53 2007 -0500 +++ b/plugins/SpecialUserFuncs.php Fri Dec 28 16:52:03 2007 -0500 @@ -1655,16 +1655,16 @@ # - Username + ' . $lang->get('userfuncs_ml_column_username') . ' - Title + ' . $lang->get('userfuncs_ml_column_userlevel') . ' - E-mail + ' . $lang->get('userfuncs_ml_column_email') . ' - Registered + ' . $lang->get('userfuncs_ml_column_regtime') . ' '; @@ -1678,8 +1678,16 @@ if ( !empty($finduser_url) ) { - $s = ( $num_rows == 1 ) ? '' : 'es'; - echo "

Search returned $num_rows match$s

"; + switch ( $num_rows ) + { + case 0: + $str = $lang->get('userfuncs_ml_msg_matches_zero'); break; + case 1: + $str = $lang->get('userfuncs_ml_msg_matches_one'); break; + default: + $str = $lang->get('userfuncs_ml_msg_matches', array('matches' => $num_rows)); break; + } + echo "

$str

"; } // main selector @@ -1718,14 +1726,16 @@
' . ( urlSeparator == '&' ? '' : '' ) . ( $session->sid_super ? '' : '') - . '

Find a member: ' . $template->username_field('finduser') . '
You may use the following wildcards: * to match multiple characters, ? to match a single character.

' + . '

' . $lang->get('userfuncs_ml_lbl_finduser') . ' ' . $template->username_field('finduser') . '
+ ' . $lang->get('userfuncs_ml_tip_wildcard') . '

' . '
' // Footer (printed after rows) ); if ( $num_rows < 1 ) { - echo ( isset($_GET['finduser']) ) ? '

Sorry - no users that matched your query could be found. Please try some different search terms.

' : '

Sorry - no users with usernames that start with that letter could be found.

'; + echo ( isset($_GET['finduser']) ) ? '

' . $lang->get('userfuncs_ml_err_nousers_find') . '

' : + '

' . $lang->get('userfuncs_ml_err_nousers') . '

'; } else { @@ -1745,37 +1755,41 @@ function username($username, $row) { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; + $userpage = $paths->nslist['User'] . sanitize_page_id($username); - $class = ( isPage($userpage) ) ? ' title="Click to view this user\'s userpage"' : ' class="wikilink-nonexistent" title="This user hasn\'t created a userpage yet, but you can still view profile details by clicking this link."'; + $class = ( isPage($userpage) ) ? ' title="' . $lang->get('userfuncs_ml_tip_userpage') . '"' : ' class="wikilink-nonexistent" title="' . $lang->get('userfuncs_ml_tip_nouserpage') . '"'; $anchor = '' . htmlspecialchars($username) . ''; if ( $session->user_level >= USER_LEVEL_ADMIN ) { $anchor .= ' - Administer user'; + onclick="ajaxAdminUser(\'' . addslashes(htmlspecialchars($username)) . '\'); return false;">' . $lang->get('userfuncs_ml_btn_adminuser') . ''; } return $anchor; } function user_level($level, $row) { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; switch ( $level ) { case USER_LEVEL_GUEST: - $s_level = 'Guest'; break; + $s_level = $lang->get('userfuncs_ml_level_guest'); break; case USER_LEVEL_MEMBER: case USER_LEVEL_CHPREF: - $s_level = 'Member'; break; + $s_level = $lang->get('userfuncs_ml_level_member'); break; case USER_LEVEL_MOD: - $s_level = 'Moderator'; break; + $s_level = $lang->get('userfuncs_ml_level_mod'); break; case USER_LEVEL_ADMIN: - $s_level = 'Site administrator'; break; + $s_level = $lang->get('userfuncs_ml_level_admin'); break; default: - $s_level = 'Unknown (level ' . $level . ')'; + $s_level = $lang->get('userfuncs_ml_level_unknown', array( 'level' => $level )); } return $s_level; } function email($addy, $row) { + global $lang; if ( $row['email_public'] == '1' ) { global $email; @@ -1784,7 +1798,7 @@ } else { - return '<Non-public>'; + return '<' . $lang->get('userfuncs_ml_email_nonpublic') . '>'; } } /** @@ -1795,6 +1809,7 @@ function format_date($time) { + global $lang; // Our formattting string to pass to date() // This should not include minute/second info, only today's date in whatever format suits your fancy $formatstring = 'F j, Y'; @@ -1814,16 +1829,16 @@ if ( $then == $days_ago ) { // yes, return $i - return "$i days ago"; + return $lang->get('userfuncs_ml_date_daysago', array('days_ago' => $i)); } } // either yesterday, today, or before 6 days ago switch($then) { case $today: - return 'Today'; + return $lang->get('userfuncs_ml_date_today'); case $yesterday: - return 'Yesterday'; + return $lang->get('userfuncs_ml_date_yesterday'); default: return $then; }