aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-03-22 10:33:30 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-03-22 10:33:30 +0000
commit6e166aa889e30c639c4914f14a41093d708594ad (patch)
tree0564b86657edfa3370a1c4633a256cf06c7c7dcf /phpBB
parentb206d63c51a514f3676f905dc2f11f474ba088fc (diff)
downloadforums-6e166aa889e30c639c4914f14a41093d708594ad.tar
forums-6e166aa889e30c639c4914f14a41093d708594ad.tar.gz
forums-6e166aa889e30c639c4914f14a41093d708594ad.tar.bz2
forums-6e166aa889e30c639c4914f14a41093d708594ad.tar.xz
forums-6e166aa889e30c639c4914f14a41093d708594ad.zip
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
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/admin.css2
-rw-r--r--phpBB/includes/ucp/ucp_main.php66
-rw-r--r--phpBB/language/en/posting.php2
-rw-r--r--phpBB/language/en/ucp.php37
-rw-r--r--phpBB/memberlist.php67
5 files changed, 98 insertions, 76 deletions
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index e9d870f512..444796f931 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -383,7 +383,7 @@ option {
padding-right: 1em;
}
.sep {
- color: white;
+ color: black;
background-color: #FFA34F;
}
textarea {
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index e65e7f1cc4..898103043c 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -772,42 +772,52 @@ class ucp_main
$forum_read_ary = $auth->acl_getf('!f_read');
$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;
}
}
- $post_count_sql = (sizeof($forum_ary)) ? 'AND f.forum_id NOT IN (' . implode(', ', $forum_ary) . ')' : '';
-
- if ($post_count_sql)
+ // Now do not include those forums where the posts do not count...
+ foreach ($post_count_ary as $forum_id => $not_counted)
{
- $sql = 'SELECT f.forum_id, f.forum_name, COUNT(post_id) AS num_posts
- FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
- WHERE p.poster_id = ' . $user->data['user_id'] . "
- AND f.forum_id = p.forum_id
- $post_count_sql
- GROUP BY f.forum_id, f.forum_name
- ORDER BY num_posts DESC";
- $result = $db->sql_query_limit($sql, 1);
- $active_f_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- $sql = 'SELECT t.topic_id, t.topic_title, COUNT(p.post_id) AS num_posts
- FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f
- WHERE p.poster_id = ' . $user->data['user_id'] . "
- AND t.topic_id = p.topic_id
- AND f.forum_id = t.forum_id
- $post_count_sql
- GROUP BY t.topic_id, t.topic_title
- ORDER BY num_posts DESC";
- $result = $db->sql_query_limit($sql, 1);
- $active_t_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
+ 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) . ')' : '';
+
+ $sql = 'SELECT f.forum_id, f.forum_name, COUNT(post_id) AS num_posts
+ FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
+ WHERE p.poster_id = ' . $user->data['user_id'] . "
+ AND f.forum_id = p.forum_id
+ $post_count_sql
+ GROUP BY f.forum_id, f.forum_name
+ ORDER BY num_posts DESC";
+ $result = $db->sql_query_limit($sql, 1);
+ $active_f_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT t.topic_id, t.topic_title, COUNT(p.post_id) AS num_posts
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f
+ WHERE p.poster_id = ' . $user->data['user_id'] . "
+ AND t.topic_id = p.topic_id
+ AND f.forum_id = t.forum_id
+ $post_count_sql
+ GROUP BY t.topic_id, t.topic_title
+ ORDER BY num_posts DESC";
+ $result = $db->sql_query_limit($sql, 1);
+ $active_t_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
$active_f_name = $active_f_id = $active_f_count = $active_f_pct = '';
if (!empty($active_f_row['num_posts']))
{
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index 7ce961c6ae..643c0410af 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -186,6 +186,8 @@ $lang = array_merge($lang, array(
'USER_CANNOT_EDIT' => 'You cannot edit posts in this forum',
'USER_CANNOT_QUOTE' => 'You cannot quote posts 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',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index ec3d50d9bb..6c1d41692e 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -383,26 +383,27 @@ $lang = array_merge($lang, array(
'UCP_USERGROUPS_MEMBER' => 'Memberships',
'UCP_USERGROUPS_MANAGE' => 'Manage groups',
- 'UCP_REGISTER_DISABLE' => 'Creating a new account is currently not possible.',
- 'UCP_REMIND' => 'Send password',
- 'UCP_RESEND' => 'Send activation email',
- 'UCP_WATCHED' => 'Watched items',
- 'UCP_WELCOME' => 'Welcome to the User Control Panel. From here you can monitor, view and update your profile, preferences, subscribed forums and topics. You can also send messages to other users (if permitted). Please ensure you read any announcements before continuing.',
- 'UCP_YIM' => 'Yahoo Messenger',
- 'UCP_ZEBRA' => 'Friends and Foes',
- 'UCP_ZEBRA_FOES' => 'Foes',
- 'UCP_ZEBRA_FRIENDS' => 'Friends',
- 'UNKNOWN_FOLDER' => 'Unknown Folder',
- 'UNREAD_MESSAGES' => 'Unread Messages',
- 'UNWATCH_MARKED' => 'Unwatch marked',
- 'UPLOAD_AVATAR_FILE' => 'Upload from your machine',
- 'UPLOAD_AVATAR_URL' => 'Upload from a URL',
- 'UPLOAD_AVATAR_URL_EXPLAIN' => 'Enter the URL of the location containing the image, it will be copied to this site.',
+ 'UCP_REGISTER_DISABLE' => 'Creating a new account is currently not possible.',
+ 'UCP_REMIND' => 'Send password',
+ 'UCP_RESEND' => 'Send activation email',
+ 'UCP_WATCHED' => 'Watched items',
+ 'UCP_WELCOME' => 'Welcome to the User Control Panel. From here you can monitor, view and update your profile, preferences, subscribed forums and topics. You can also send messages to other users (if permitted). Please ensure you read any announcements before continuing.',
+ 'UCP_YIM' => 'Yahoo Messenger',
+ 'UCP_ZEBRA' => 'Friends and Foes',
+ 'UCP_ZEBRA_FOES' => 'Foes',
+ 'UCP_ZEBRA_FRIENDS' => 'Friends',
+ 'UNKNOWN_FOLDER' => 'Unknown Folder',
+ 'UNREAD_MESSAGES' => 'Unread Messages',
+ 'UNWATCH_MARKED' => 'Unwatch marked',
+ 'UPLOAD_AVATAR_FILE' => 'Upload from your machine',
+ 'UPLOAD_AVATAR_URL' => 'Upload from a URL',
+ '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_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_TAKEN_USERNAME' => 'The username you entered is already in use, please select an alternative.',
- 'USER_NOT_FOUND' => 'The usernames you specified could not be found.',
+ '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_USERNAME_DISALLOWED' => 'The username you entered has been banned.',
+ 'USER_NOT_FOUND' => 'The usernames you specified could not be found.',
'VIEW_AVATARS' => 'Display Avatars',
'VIEW_EDIT' => 'View/Edit',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 546ee37148..afcdafe09f 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1166,44 +1166,53 @@ function show_user_activity(&$member)
$post_count_ary = $auth2->acl_getf('!f_postcount');
$forum_read_ary = $auth->acl_getf('!f_read');
-
+
$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;
}
}
- $post_count_sql = (sizeof($forum_ary)) ? 'AND f.forum_id NOT IN (' . implode(', ', $forum_ary) . ')' : '';
-
- if ($post_count_sql)
+ // 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)
{
- $sql = 'SELECT f.forum_id, f.forum_name, COUNT(post_id) AS num_posts
- FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . " f
- WHERE p.poster_id = {$member['user_id']}
- AND f.forum_id = p.forum_id
- $post_count_sql
- GROUP BY f.forum_id, f.forum_name
- ORDER BY num_posts DESC";
- $result = $db->sql_query_limit($sql, 1);
- $active_f_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- $sql = 'SELECT t.topic_id, t.topic_title, COUNT(p.post_id) AS num_posts
- FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
- WHERE p.poster_id = {$member['user_id']}
- AND t.topic_id = p.topic_id
- AND f.forum_id = t.forum_id
- $post_count_sql
- GROUP BY t.topic_id, t.topic_title
- ORDER BY num_posts DESC";
- $result = $db->sql_query_limit($sql, 1);
- $active_t_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
+ 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) . ')' : '';
+
+ $sql = 'SELECT f.forum_id, f.forum_name, COUNT(post_id) AS num_posts
+ FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . " f
+ WHERE p.poster_id = {$member['user_id']}
+ AND f.forum_id = p.forum_id
+ $post_count_sql
+ GROUP BY f.forum_id, f.forum_name
+ ORDER BY num_posts DESC";
+ $result = $db->sql_query_limit($sql, 1);
+ $active_f_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT t.topic_id, t.topic_title, COUNT(p.post_id) AS num_posts
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
+ WHERE p.poster_id = {$member['user_id']}
+ AND t.topic_id = p.topic_id
+ AND f.forum_id = t.forum_id
+ $post_count_sql
+ GROUP BY t.topic_id, t.topic_title
+ ORDER BY num_posts DESC";
+ $result = $db->sql_query_limit($sql, 1);
+ $active_t_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
$member['active_t_row'] = $active_t_row;
$member['active_f_row'] = $active_f_row;