mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 20:08:55 +00:00
added some language strings as well as fixing the activity listing (Yawner, could you please test it again at area51?)
git-svn-id: file:///svn/phpbb/trunk@5695 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
b206d63c51
commit
6e166aa889
5 changed files with 96 additions and 74 deletions
|
@ -383,7 +383,7 @@ option {
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
}
|
}
|
||||||
.sep {
|
.sep {
|
||||||
color: white;
|
color: black;
|
||||||
background-color: #FFA34F;
|
background-color: #FFA34F;
|
||||||
}
|
}
|
||||||
textarea {
|
textarea {
|
||||||
|
|
|
@ -772,18 +772,29 @@ class ucp_main
|
||||||
$forum_read_ary = $auth->acl_getf('!f_read');
|
$forum_read_ary = $auth->acl_getf('!f_read');
|
||||||
|
|
||||||
$forum_ary = array();
|
$forum_ary = array();
|
||||||
foreach ($post_count_ary as $forum_id => $allowed)
|
|
||||||
|
// Do not include those forums the user is not having read access to...
|
||||||
|
foreach ($forum_read_ary as $forum_id => $not_allowed)
|
||||||
{
|
{
|
||||||
if ($allowed['f_postcount'] || $forum_read_ary[$forum_id]['f_read'])
|
if ($not_allowed['f_read'])
|
||||||
{
|
{
|
||||||
$forum_ary[] = $forum_id;
|
$forum_ary[] = (int) $forum_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Now do not include those forums where the posts do not count...
|
||||||
|
foreach ($post_count_ary as $forum_id => $not_counted)
|
||||||
|
{
|
||||||
|
if ($not_counted['f_postcount'])
|
||||||
|
{
|
||||||
|
$forum_ary[] = (int) $forum_id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$forum_ary = array_unique($forum_ary);
|
||||||
|
|
||||||
$post_count_sql = (sizeof($forum_ary)) ? 'AND f.forum_id NOT IN (' . implode(', ', $forum_ary) . ')' : '';
|
$post_count_sql = (sizeof($forum_ary)) ? 'AND f.forum_id NOT IN (' . implode(', ', $forum_ary) . ')' : '';
|
||||||
|
|
||||||
if ($post_count_sql)
|
|
||||||
{
|
|
||||||
$sql = 'SELECT f.forum_id, f.forum_name, COUNT(post_id) AS num_posts
|
$sql = 'SELECT f.forum_id, f.forum_name, COUNT(post_id) AS num_posts
|
||||||
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
|
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
|
||||||
WHERE p.poster_id = ' . $user->data['user_id'] . "
|
WHERE p.poster_id = ' . $user->data['user_id'] . "
|
||||||
|
@ -806,7 +817,6 @@ class ucp_main
|
||||||
$result = $db->sql_query_limit($sql, 1);
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
$active_t_row = $db->sql_fetchrow($result);
|
$active_t_row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
}
|
|
||||||
|
|
||||||
$active_f_name = $active_f_id = $active_f_count = $active_f_pct = '';
|
$active_f_name = $active_f_id = $active_f_count = $active_f_pct = '';
|
||||||
if (!empty($active_f_row['num_posts']))
|
if (!empty($active_f_row['num_posts']))
|
||||||
|
|
|
@ -186,6 +186,8 @@ $lang = array_merge($lang, array(
|
||||||
'USER_CANNOT_EDIT' => 'You cannot edit posts in this forum',
|
'USER_CANNOT_EDIT' => 'You cannot edit posts in this forum',
|
||||||
'USER_CANNOT_QUOTE' => 'You cannot quote posts in this forum',
|
'USER_CANNOT_QUOTE' => 'You cannot quote posts in this forum',
|
||||||
'USER_CANNOT_REPLY' => 'You cannot reply in this forum',
|
'USER_CANNOT_REPLY' => 'You cannot reply in this forum',
|
||||||
|
'USERNAME_DISALLOWED' => 'The username you entered has been banned.',
|
||||||
|
'USERNAME_TAKEN' => 'The username you entered is already in use, please select an alternative.',
|
||||||
|
|
||||||
'VIEW_MESSAGE' => 'Click %sHere%s to view your message',
|
'VIEW_MESSAGE' => 'Click %sHere%s to view your message',
|
||||||
|
|
||||||
|
|
|
@ -400,8 +400,9 @@ $lang = array_merge($lang, array(
|
||||||
'UPLOAD_AVATAR_URL_EXPLAIN' => 'Enter the URL of the location containing the image, it will be copied to this site.',
|
'UPLOAD_AVATAR_URL_EXPLAIN' => 'Enter the URL of the location containing the image, it will be copied to this site.',
|
||||||
'USERNAME_ALPHA_ONLY_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only alphanumeric characters',
|
'USERNAME_ALPHA_ONLY_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only alphanumeric characters',
|
||||||
'USERNAME_ALPHA_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use alphanumeric, space or -+_[] characters.',
|
'USERNAME_ALPHA_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use alphanumeric, space or -+_[] characters.',
|
||||||
'USERNAME_CHARS_ANY_EXPLAIN'=> 'Length must be between %1$d and %2$d characters.',
|
'USERNAME_CHARS_ANY_EXPLAIN' => 'Length must be between %1$d and %2$d characters.',
|
||||||
'USERNAME_TAKEN_USERNAME' => 'The username you entered is already in use, please select an alternative.',
|
'USERNAME_TAKEN_USERNAME' => 'The username you entered is already in use, please select an alternative.',
|
||||||
|
'USERNAME_USERNAME_DISALLOWED' => 'The username you entered has been banned.',
|
||||||
'USER_NOT_FOUND' => 'The usernames you specified could not be found.',
|
'USER_NOT_FOUND' => 'The usernames you specified could not be found.',
|
||||||
|
|
||||||
'VIEW_AVATARS' => 'Display Avatars',
|
'VIEW_AVATARS' => 'Display Avatars',
|
||||||
|
|
|
@ -1168,18 +1168,28 @@ function show_user_activity(&$member)
|
||||||
$forum_read_ary = $auth->acl_getf('!f_read');
|
$forum_read_ary = $auth->acl_getf('!f_read');
|
||||||
|
|
||||||
$forum_ary = array();
|
$forum_ary = array();
|
||||||
foreach ($post_count_ary as $forum_id => $allowed)
|
|
||||||
|
// Do not include those forums the user watching this profile is not having read access to...
|
||||||
|
foreach ($forum_read_ary as $forum_id => $not_allowed)
|
||||||
{
|
{
|
||||||
if ($allowed['f_postcount'] || $forum_read_ary[$forum_id]['f_read'])
|
if ($not_allowed['f_read'])
|
||||||
{
|
{
|
||||||
$forum_ary[] = $forum_id;
|
$forum_ary[] = (int) $forum_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Now do not include those forums where the posts do not count for the members profile...
|
||||||
|
foreach ($post_count_ary as $forum_id => $not_counted)
|
||||||
|
{
|
||||||
|
if ($not_counted['f_postcount'])
|
||||||
|
{
|
||||||
|
$forum_ary[] = (int) $forum_id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$forum_ary = array_unique($forum_ary);
|
||||||
$post_count_sql = (sizeof($forum_ary)) ? 'AND f.forum_id NOT IN (' . implode(', ', $forum_ary) . ')' : '';
|
$post_count_sql = (sizeof($forum_ary)) ? 'AND f.forum_id NOT IN (' . implode(', ', $forum_ary) . ')' : '';
|
||||||
|
|
||||||
if ($post_count_sql)
|
|
||||||
{
|
|
||||||
$sql = 'SELECT f.forum_id, f.forum_name, COUNT(post_id) AS num_posts
|
$sql = 'SELECT f.forum_id, f.forum_name, COUNT(post_id) AS num_posts
|
||||||
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . " f
|
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . " f
|
||||||
WHERE p.poster_id = {$member['user_id']}
|
WHERE p.poster_id = {$member['user_id']}
|
||||||
|
@ -1202,7 +1212,6 @@ function show_user_activity(&$member)
|
||||||
$result = $db->sql_query_limit($sql, 1);
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
$active_t_row = $db->sql_fetchrow($result);
|
$active_t_row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
}
|
|
||||||
|
|
||||||
$member['active_t_row'] = $active_t_row;
|
$member['active_t_row'] = $active_t_row;
|
||||||
$member['active_f_row'] = $active_f_row;
|
$member['active_f_row'] = $active_f_row;
|
||||||
|
|
Loading…
Add table
Reference in a new issue