--- a/includes/pageprocess.php Mon Jan 21 23:02:16 2008 -0500
+++ b/includes/pageprocess.php Tue Jan 22 00:22:14 2008 -0500
@@ -673,7 +673,7 @@
$page_data = $paths->pages[$page_id_key];
$title = ( isset($page_data['name']) ) ? $page_data['name'] : $paths->nslist[$oldtarget[1]] . htmlspecialchars( str_replace('_', ' ', dirtify_page_id( $oldtarget[0] ) ) );
$a = '<a href="' . $url . '">' . $title . '</a>';
- echo '<small>(Redirected from ' . $a . ')<br /></small>';
+ echo '<small>' . $lang->get('page_msg_redirected_from', array('from' => $a)) . '<br /></small>';
}
}
display_page_headers();
@@ -681,7 +681,17 @@
if ( $this->revision_id )
{
- echo '<div class="info-box" style="margin-left: 0; margin-top: 5px;"><b>Notice:</b><br />The page you are viewing was archived on '.enano_date('F d, Y \a\t h:i a', $this->revision_id).'.<br /><a href="'.makeUrlNS($this->namespace, $this->page_id).'" onclick="ajaxReset(); return false;">View current version</a> | <a href="'.makeUrlNS($this->namespace, $this->page_id, 'do=rollback&id='.$this->revision_id).'" onclick="ajaxRollback(\''.$this->revision_id.'\')">Restore this version</a></div><br />';
+ echo '<div class="info-box" style="margin-left: 0; margin-top: 5px;">
+ <b>' . $lang->get('page_msg_archived_title') . '</b><br />
+ ' . $lang->get('page_msg_archived_body', array(
+ 'archive_date' => enano_date('F d, Y', $this->revision_id),
+ 'archive_time' => enano_date('h:i a', $this->revision_id),
+ 'current_link' => makeUrlNS($this->namespace, $this->page_id),
+ 'restore_link' => makeUrlNS($this->namespace, $this->page_id, 'do=rollback&id='.$this->revision_id),
+ 'restore_onclick' => 'ajaxRollback(\''.$this->revision_id.'\'); return false;',
+ )) . '
+ </div>
+ <br />';
}
if ( $redir_enabled )
@@ -948,29 +958,29 @@
// Basic user info
- echo '<tr><th class="subhead">All about ' . htmlspecialchars($target_username) . '</th></tr>';
+ echo '<tr><th class="subhead">' . $lang->get('userpage_heading_basics', array('username' => htmlspecialchars($target_username))) . '</th></tr>';
if ( $userdata['user_has_avatar'] == '1' )
{
echo '<tr><td class="row1" style="text-align: center;"><img alt="' . $lang->get('usercp_avatar_image_alt', array('username' => $userdata['username'])) . '" src="' . make_avatar_url(intval($userdata['authoritative_uid']), $userdata['avatar_type']) . '" /></td></tr>';
}
- echo '<tr><td class="row3">Joined: ' . enano_date('F d, Y h:i a', $userdata['reg_time']) . '</td></tr>';
- echo '<tr><td class="row1">Total comments: ' . $userdata['n_comments'] . '</td></tr>';
+ echo '<tr><td class="row3">' . $lang->get('userpage_lbl_joined') . ' ' . enano_date('F d, Y h:i a', $userdata['reg_time']) . '</td></tr>';
+ echo '<tr><td class="row1">' . $lang->get('userpage_lbl_num_comments') . ' ' . $userdata['n_comments'] . '</td></tr>';
if ( !empty($userdata['real_name']) )
{
- echo '<tr><td class="row3">Real name: ' . $userdata['real_name'] . '</td></tr>';
+ echo '<tr><td class="row3">' . $lang->get('userpage_lbl_real_name') . ' ' . $userdata['real_name'] . '</td></tr>';
}
// Administer user button
if ( $session->user_level >= USER_LEVEL_ADMIN )
{
- echo '<tr><td class="row1"><a href="' . makeUrlNS('Special', 'Administration', 'module=' . $paths->nslist['Admin'] . 'UserManager&src=get&user=' . urlencode($target_username), true) . '" onclick="ajaxAdminUser(\'' . addslashes($target_username) . '\'); return false;">Administer user</a></td></tr>';
+ echo '<tr><td class="row1"><a href="' . makeUrlNS('Special', 'Administration', 'module=' . $paths->nslist['Admin'] . 'UserManager&src=get&user=' . urlencode($target_username), true) . '" onclick="ajaxAdminUser(\'' . addslashes($target_username) . '\'); return false;">' . $lang->get('userpage_btn_administer_user') . '</a></td></tr>';
}
// Comments
- echo '<tr><th class="subhead">' . htmlspecialchars($target_username) . '\'s latest comments</th></tr>';
+ echo '<tr><th class="subhead">' . $lang->get('userpage_heading_comments', array('username' => htmlspecialchars($target_username))) . '</th></tr>';
$q = $db->sql_query('SELECT page_id, namespace, subject, time FROM '.table_prefix.'comments WHERE name=\'' . $db->escape($target_username) . '\' AND user_id=' . $userdata['authoritative_uid'] . ' AND approved=1 ORDER BY time DESC LIMIT 5;');
if ( !$q )
$db->_die();
@@ -1001,7 +1011,7 @@
$tpl = '<tr>
<td class="{CLASS}">
<a href="{PAGE_LINK}" <!-- BEGINNOT page_exists -->class="wikilink-nonexistent"<!-- END page_exists -->>{PAGE}</a><br />
- <small>Posted {DATE}<br /></small>
+ <small>{lang:userpage_comments_lbl_posted} {DATE}<br /></small>
<b><a href="{COMMENT_LINK}">{SUBJECT}</a></b>
</td>
</tr>';
@@ -1040,7 +1050,7 @@
}
else
{
- echo '<tr><td class="' . $class . '">This user has not posted any comments.</td></tr>';
+ echo '<tr><td class="' . $class . '">' . $lang->get('userpage_msg_no_comments') . '</td></tr>';
}
echo '</table>';
@@ -1093,7 +1103,7 @@
// Contact information
- echo '<tr><th class="subhead">Get in touch</th></tr>';
+ echo '<tr><th class="subhead">' . $lang->get('userpage_heading_contact') . '</th></tr>';
$class = 'row3';
@@ -1101,71 +1111,71 @@
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
$email_link = $email->encryptEmail($userdata['email']);
- echo '<tr><td class="'.$class.'">E-mail address: ' . $email_link . '</td></tr>';
+ echo '<tr><td class="'.$class.'">' . $lang->get('userpage_lbl_email') . ' ' . $email_link . '</td></tr>';
}
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
if ( $session->user_logged_in )
{
- echo '<tr><td class="'.$class.'">Send ' . htmlspecialchars($target_username) . ' a <a href="' . makeUrlNS('Special', 'PrivateMessages/Compose/to/' . $this->page_id, false, true) . '">Private Message</a>!</td></tr>';
+ echo '<tr><td class="'.$class.'">' . $lang->get('userpage_btn_send_pm', array('username' => htmlspecialchars($target_username), 'pm_link' => makeUrlNS('Special', 'PrivateMessages/Compose/to/' . $this->page_id, false, true))) . '</td></tr>';
}
else
{
- echo '<tr><td class="'.$class.'">You could send ' . htmlspecialchars($target_username) . ' a private message if you were <a href="' . makeUrlNS('Special', 'Login/' . $paths->nslist[$this->namespace] . $this->page_id) . '">logged in</a>.</td></tr>';
+ echo '<tr><td class="'.$class.'">' . $lang->get('userpage_btn_send_pm_guest', array('username' => htmlspecialchars($target_username), 'login_flags' => 'href="' . makeUrlNS('Special', 'Login/' . $paths->nslist[$this->namespace] . $this->page_id) . '" onclick="ajaxStartLogin(); return false;"')) . '</td></tr>';
}
if ( !empty($userdata['user_aim']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo '<tr><td class="'.$class.'">AIM: ' . $userdata['user_aim'] . '</td></tr>';
+ echo '<tr><td class="'.$class.'">' . $lang->get('userpage_lbl_aim') . ' ' . $userdata['user_aim'] . '</td></tr>';
}
if ( !empty($userdata['user_yahoo']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo '<tr><td class="'.$class.'">Yahoo! IM: ' . $userdata['user_yahoo'] . '</td></tr>';
+ echo '<tr><td class="'.$class.'">' . $lang->get('userpage_lbl_yim') . ' ' . $userdata['user_yahoo'] . '</td></tr>';
}
if ( !empty($userdata['user_msn']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
$email_link = $email->encryptEmail($userdata['user_msn']);
- echo '<tr><td class="'.$class.'">WLM: ' . $email_link . '</td></tr>';
+ echo '<tr><td class="'.$class.'">' . $lang->get('userpage_lbl_wlm') . ' ' . $email_link . '</td></tr>';
}
if ( !empty($userdata['user_xmpp']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
$email_link = $email->encryptEmail($userdata['user_xmpp']);
- echo '<tr><td class="'.$class.'">XMPP/Jabber: ' . $email_link . '</td></tr>';
+ echo '<tr><td class="'.$class.'">' . $lang->get('userpage_lbl_xmpp') . ' ' . $email_link . '</td></tr>';
}
// Real life
- echo '<tr><th class="subhead">' . htmlspecialchars($target_username) . ' in real life</th></tr>';
+ echo '<tr><th class="subhead">' . $lang->get('userpage_heading_real_life', array('username' => htmlspecialchars($target_username))) . '</th></tr>';
if ( !empty($userdata['user_location']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo '<tr><td class="'.$class.'">Location: ' . $userdata['user_location'] . '</td></tr>';
+ echo '<tr><td class="'.$class.'">' . $lang->get('userpage_lbl_location') . ' ' . $userdata['user_location'] . '</td></tr>';
}
if ( !empty($userdata['user_job']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo '<tr><td class="'.$class.'">Job/occupation: ' . $userdata['user_job'] . '</td></tr>';
+ echo '<tr><td class="'.$class.'">' . $lang->get('userpage_lbl_job') . ' ' . $userdata['user_job'] . '</td></tr>';
}
if ( !empty($userdata['user_hobbies']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo '<tr><td class="'.$class.'">Enjoys: ' . $userdata['user_hobbies'] . '</td></tr>';
+ echo '<tr><td class="'.$class.'">' . $lang->get('userpage_lbl_hobbies') . ' ' . $userdata['user_hobbies'] . '</td></tr>';
}
if ( empty($userdata['user_location']) && empty($userdata['user_job']) && empty($userdata['user_hobbies']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo '<tr><td class="'.$class.'">' . htmlspecialchars($target_username) . ' hasn\'t posted any real-life contact information.</td></tr>';
+ echo '<tr><td class="'.$class.'">' . $lang->get('userpage_msg_no_contact_info', array('username' => htmlspecialchars($target_username))) . '</td></tr>';
}
$code = $plugins->setHook('userpage_sidebar_right');
@@ -1181,7 +1191,10 @@
else:
- echo '<p>Additional information: user "' . htmlspecialchars($target_username) . '" does not exist.</p>';
+ if ( !is_valid_ip($target_username) )
+ {
+ echo '<p>' . $lang->get('userpage_msg_user_not_exist', array('username' => htmlspecialchars($target_username))) . '</p>';
+ }
endif;
--- a/language/english/core.json Mon Jan 21 23:02:16 2008 -0500
+++ b/language/english/core.json Tue Jan 22 00:22:14 2008 -0500
@@ -110,6 +110,10 @@
To create a redirect page, make the <i>first characters</i> in the page content <tt>#redirect [[Page_ID]]</tt>. For more information, see the
Enano <a href="http://enanocms.org/Help:Wiki_formatting" onclick="window.open(this.href); return false;">Wiki formatting guide</a>.<br /><br />
This page redirects to %redirect_target%.',
+ msg_redirected_from: '(Redirected from %from%)',
+
+ msg_archived_title: 'Notice:',
+ msg_archived_body: 'The page you are viewing was archived on %archive_date% at %archive_time%.<br /><a href="%current_link%" onclick="ajaxReset(); return false;">View current version</a> | <a href="%restore_link%" onclick="%restore_onclick%">Restore this version</a>',
autosuggest_heading: 'Page name matches',
autosuggest_col_name: 'Page title',
--- a/language/english/user.json Mon Jan 21 23:02:16 2008 -0500
+++ b/language/english/user.json Tue Jan 22 00:22:14 2008 -0500
@@ -12,7 +12,7 @@
var enano_lang = {
categories: [
- 'user', 'usercp', 'groupcp', 'privmsgs', 'userfuncs',
+ 'user', 'usercp', 'groupcp', 'privmsgs', 'userfuncs', 'userpage',
],
strings: {
meta: {
@@ -21,6 +21,7 @@
groupcp: 'Group control panel',
privmsgs: 'Private message and buddy list CP',
userfuncs: 'User management pages',
+ userpage: 'User pages',
},
user: {
login_message_short: 'Please enter your username and password to log in.',
@@ -475,6 +476,30 @@
ml_msg_matches_zero: 'Search returned no matches',
ml_msg_matches_one: 'Search returned 1 match',
ml_msg_matches: 'Search returned %matches% matches',
+ },
+ userpage: {
+ heading_basics: 'All about %username%',
+ lbl_joined: 'Joined:',
+ lbl_num_comments: 'Total comments:',
+ lbl_real_name: 'Real name:',
+ btn_administer_user: 'Administer user',
+ heading_comments: '%username%\'s latest comments',
+ comments_lbl_posted: 'Posted',
+ msg_no_comments: 'This user has not posted any comments.',
+ heading_contact: 'Get in touch',
+ lbl_email: 'E-mail address:',
+ btn_send_pm: 'Send %username% a <a href="%pm_link%">Private Message!</a>',
+ btn_send_pm_guest: 'You could send %username% a Private Message if you were <a %login_flags%>logged in</a>.',
+ lbl_aim: 'AIM:',
+ lbl_yim: 'Yahoo! IM:',
+ lbl_wlm: 'WLM:',
+ lbl_xmpp: 'XMPP/Jabber™:',
+ heading_real_life: '%username% in real life',
+ lbl_location: 'Location:',
+ lbl_job: 'Job/occupation:',
+ lbl_hobbies: 'Enjoys:',
+ msg_no_contact_info: '%username% hasn\'t posted any real-life contact information.',
+ msg_user_not_exist: 'Additional information: user "%username%" does not exist.',
}
}
};