diff options
-rw-r--r-- | phpBB/db/mysql_basic.sql | 15 | ||||
-rw-r--r-- | phpBB/db/mysql_schema.sql | 17 | ||||
-rw-r--r-- | phpBB/db/postgres_schema.sql | 17 | ||||
-rw-r--r-- | phpBB/includes/page_header.php | 43 | ||||
-rwxr-xr-x | phpBB/language/lang_english.php | 23 | ||||
-rw-r--r-- | phpBB/profile.php | 60 | ||||
-rwxr-xr-x | phpBB/templates/Default/profile_add_body.tpl | 19 | ||||
-rw-r--r-- | phpBB/templates/PSO/overall_header.tpl | 18 | ||||
-rw-r--r-- | phpBB/templates/PSO/profile_add_body.tpl | 126 | ||||
-rw-r--r-- | phpBB/viewonline.php | 124 |
10 files changed, 250 insertions, 212 deletions
diff --git a/phpBB/db/mysql_basic.sql b/phpBB/db/mysql_basic.sql index 1af4bbe987..2f4d2d3e8a 100644 --- a/phpBB/db/mysql_basic.sql +++ b/phpBB/db/mysql_basic.sql @@ -4,18 +4,18 @@ # $Id$ # -- Config -INSERT INTO phpbb_config (config_id, sitename, allow_html, allow_bbcode, allow_smilies, allow_sig, allow_namechange, selected, posts_per_page, hot_threshold, topics_per_page, flood_interval, allow_theme_create, override_themes, email_sig, email_from, default_theme, default_lang, default_dateformat, system_timezone, sys_template, avatar_filesize, avatar_path, allow_avatar_upload, avatar_max_width, avatar_max_height, allow_avatar_local) VALUES ( '1', 'phpbb.com', '0', '1', '1', '1', '0', '1', '10', '10', '25', '10', '0', '0', '', '', '5', 'english', 'd M Y H:i', '0', 'Default', '6144', 'images/avatars', '0', '70', '70', '0'); +INSERT INTO phpbb_config (config_id, sitename, allow_html, allow_bbcode, allow_smilies, allow_sig, allow_namechange, selected, posts_per_page, hot_threshold, topics_per_page, flood_interval, allow_theme_create, override_themes, email_sig, email_from, default_theme, default_lang, default_dateformat, system_timezone, sys_template, avatar_filesize, avatar_path, allow_avatar_upload, avatar_max_width, avatar_max_height, allow_avatar_local) VALUES ( '1', 'phpbb.com', '0', '1', '1', '1', '0', '1', '10', '10', '25', '10', '0', '0', '', '', '1', 'english', 'd M Y H:i', '0', 'Default', '6144', 'images/avatars', '0', '70', '70', '0'); # -- Categories INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1); # -- Forums -INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_votecreate, auth_vote, auth_attachments) VALUES - (1, 'Test Forum 1', 'This is just a test forum, nothing special here.', 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 3, 3, 3); +INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_votecreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum, nothing special here.', 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 3, 3, 3); # -- Users (admin is set as that, an admin ... password is null, change it once online!) -INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_autologin_key, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_theme, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active, user_template) VALUES ( '-1', 'Anonymous', '0', '972086460', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', ''); -INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_autologin_key, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_theme, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active, user_template) VALUES ( '2', 'Admin', '1', NOW(), '', '', 'admin@yourdomain.com', '', '', '', '', '', 'A Signature', '1', '1', '', '', '', '0', '0', '1', '0', '1', '1', '', 'english', '-8', 'd M Y h:i a', '', '', '0', '1', 'Default'); +INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_autologin_key, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_theme, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active, user_template) VALUES ( '-1', 'Anonymous', '0', '972086460', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '0', '0', '1', '', '', '', '', '', '', '', '', '0', '0', ''); + +INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_autologin_key, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_theme, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active, user_template) VALUES ( '2', 'Admin', '1', NOW(), '', '', 'admin@yourdomain.com', '', '', '', '', '', 'A Signature', '1', '1', '', '', '', '0', '0', '1', '0', '1', '1', '1', '1', '1', '', 'english', '-8', 'd M Y h:i a', '', '', '0', '1', 'Default'); # -- Ranks INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_max, rank_special, rank_image) VALUES ( '1', 'Site Admin', '-1', '-1', '1', ''); @@ -55,8 +55,5 @@ INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_col INSERT INTO phpbb_themes (themes_id, themes_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, th_color1, th_color2, th_color3, td_color1, td_color2, td_color3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, img1, img2, img3, img4) VALUES ( '4', 'PSO-Ocean', '', '', 'DFF5FF', '000000', '011001', '2100cc', '', '', '', '', '', '000000', 'A7C1CB', '7897A8', '83D7CC', 'A0CCE0', '', 'verdana,serif', 'arial,helvetica', 'courier', '1', '2', '3', '', '', '', '', '', '', ''); INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, th_color1_name, th_color2_name, th_color3_name, td_color1_name, td_color2_name, td_color3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, img1_name, img2_name, img3_name, img4_name) VALUES ( '4', '', '', '', 'Table Background', 'Title Header', 'Category Header', 'Table background', 'Row Color 1', 'Row Color 2', 'Verdana,Serif', 'Arial,Sans-serif', 'Verdana,serif', 'Smallest', 'Typical', 'Largest', 'All text', '', '', '', '', '', ''); -INSERT INTO phpbb_themes (themes_id, themes_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, th_color1, th_color2, th_color3, td_color1, td_color2, td_color3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, img1, img2, img3, img4) VALUES ( '5', 'PSO-Oranges and Lemons', '', '', 'F6FABC', '000000', '854F37', '488655', '', '', '', '', '', '000000', 'EAC33C', 'E8E660', 'F5ED91', 'FFEB8B', '', 'verdana,serif', 'arial,helvetica', 'courier', '1', '2', '3', '000000', '000000', '000000', '', '', '', ''); -INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, th_color1_name, th_color2_name, th_color3_name, td_color1_name, td_color2_name, td_color3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, img1_name, img2_name, img3_name, img4_name) VALUES ( '5', '', '', '', 'Table Background', 'Title Header', 'Category Header', 'Table background', 'Row Color 1', 'Row Color 2', 'Verdana,Serif', 'Arial,Sans-serif', 'Verdana,serif', 'Smallest', 'Typical', 'Largest', 'All text', '', '', '', '', '', ''); - INSERT INTO phpbb_themes (themes_id, themes_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, th_color1, th_color2, th_color3, td_color1, td_color2, td_color3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, img1, img2, img3, img4) VALUES ( '6', 'PSO-Blue', '', '', 'FFFFFF', '000000', '417FB9', '4E6172', '0000AA', '', '', '', '', '000000', '90BAE2', '518EC7', 'cde3f2', 'daedFd', '', 'verdana,serif', 'arial,helvetica', 'courier', '1', '2', '3', '000000', '', '', '', '', '', ''); -INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, th_color1_name, th_color2_name, th_color3_name, td_color1_name, td_color2_name, td_color3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, img1_name, img2_name, img3_name, img4_name) VALUES ( '6', '', '', '', 'Table Background', 'Title Header', 'Category Header', 'Table background', 'Row Color 1', 'Row Color 2', 'Verdana,Serif', 'Arial,Sans-serif', 'Verdana,serif', 'Smallest', 'Typical', 'Largest', 'All text', '', '', '', '', '', ''); +INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, th_color1_name, th_color2_name, th_color3_name, td_color1_name, td_color2_name, td_color3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, img1_name, img2_name, img3_name, img4_name) VALUES ( '5', '', '', '', 'Table Background', 'Title Header', 'Category Header', 'Table background', 'Row Color 1', 'Row Color 2', 'Verdana,Serif', 'Arial,Sans-serif', 'Verdana,serif', 'Smallest', 'Typical', 'Largest', 'All text', '', '', '', '', '', ''); diff --git a/phpBB/db/mysql_schema.sql b/phpBB/db/mysql_schema.sql index 2e1cd13eff..60ad9010b9 100644 --- a/phpBB/db/mysql_schema.sql +++ b/phpBB/db/mysql_schema.sql @@ -44,7 +44,7 @@ CREATE TABLE phpbb_user_group ( DROP TABLE IF EXISTS phpbb_groups; CREATE TABLE phpbb_groups ( group_id int(11) NOT NULL auto_increment, - group_name varchar(100) NOT NULL, + group_name varchar(40) NOT NULL, group_description varchar(255) NOT NULL, group_moderator int(11) DEFAULT '0' NOT NULL, group_single_user tinyint(1) DEFAULT '0' NOT NULL, @@ -130,7 +130,7 @@ DROP TABLE IF EXISTS phpbb_disallow; CREATE TABLE phpbb_disallow ( disallow_id int(10) NOT NULL auto_increment, - disallow_username varchar(50), + disallow_username varchar(25), PRIMARY KEY (disallow_id) ); @@ -142,11 +142,11 @@ CREATE TABLE phpbb_disallow ( DROP TABLE IF EXISTS phpbb_forum_prune; CREATE TABLE phpbb_forum_prune ( - prune_id int(10) NOT NULL auto_increment, - forum_id int(11) NOT NULL, - prune_days int(3) NOT NULL, - prune_freq int(3) NOT NULL, - PRIMARY KEY(prune_id) + prune_id int(10) NOT NULL auto_increment, + forum_id int(11) NOT NULL, + prune_days int(3) NOT NULL, + prune_freq int(3) NOT NULL, + PRIMARY KEY(prune_id) ); # -------------------------------------------------------- @@ -424,7 +424,7 @@ DROP TABLE IF EXISTS phpbb_users; CREATE TABLE phpbb_users ( user_id int(11) NOT NULL auto_increment, user_active tinyint(4), - username varchar(40) NOT NULL, + username varchar(25) NOT NULL, user_password varchar(32) NOT NULL, user_autologin_key varchar(32), user_level tinyint(4) DEFAULT '0', @@ -440,6 +440,7 @@ CREATE TABLE phpbb_users ( user_allowsmile tinyint(1), user_allowavatar tinyint(1) DEFAULT '1' NOT NULL, user_allow_pm tinyint(1) DEFAULT '1' NOT NULL, + user_allow_viewonline tinyint(1) DEFAULT '1' NOT NULL, user_notify_pm tinyint(1) DEFAULT '1' NOT NULL, user_regdate int(11) DEFAULT '0' NOT NULL, user_rank int(11) DEFAULT '0', diff --git a/phpBB/db/postgres_schema.sql b/phpBB/db/postgres_schema.sql index 00bc330057..c11df794b0 100644 --- a/phpBB/db/postgres_schema.sql +++ b/phpBB/db/postgres_schema.sql @@ -47,7 +47,7 @@ CREATE TABLE phpbb_auth_access ( -------------------------------------------------------- */ CREATE TABLE phpbb_groups ( group_id int DEFAULT nextval('phpbb_groups_id_seq'::text) NOT NULL, - group_name varchar(100) NOT NULL, + group_name varchar(40) NOT NULL, group_description varchar(255) NOT NULL, group_moderator int4 DEFAULT '0' NOT NULL, group_single_user int2 DEFAULT '0' NOT NULL, @@ -123,7 +123,7 @@ CREATE TABLE phpbb_config ( -------------------------------------------------------- */ CREATE TABLE phpbb_disallow ( disallow_id int4 DEFAULT nextval('phpbb_disallow_id_s'::text) NOT NULL, - disallow_username varchar(40), + disallow_username varchar(25), CONSTRAINT phpbb_disallow_pkey PRIMARY KEY (disallow_id) ); @@ -162,11 +162,11 @@ CREATE INDEX forums_order_phpbb_forums_index ON phpbb_forums (forum_order); Table structure for table phpbb_forum_prune -------------------------------------------------------- */ CREATE TABLE phpbb_forum_prune ( - prune_id int4 NOT NULL auto_increment, - forum_id int4 NOT NULL, - prune_days int4 NOT NULL, - prune_freq int4 NOT NULL, - CONSTRAINT phpbb_forum_prune_pkey PRIMARY KEY (prune_id) + prune_id int4 NOT NULL auto_increment, + forum_id int4 NOT NULL, + prune_days int4 NOT NULL, + prune_freq int4 NOT NULL, + CONSTRAINT phpbb_forum_prune_pkey PRIMARY KEY (prune_id) ); CREATE INDEX prune_id_phpbb_forum_prune_index ON phpbb_forum_prune (cat_id); CREATE INDEX forum_id_phpbb_forum_prune_index ON phpbb_forum_prune (forum_id); @@ -402,7 +402,7 @@ CREATE INDEX user_id_phpbb_user_group_index ON phpbb_user_group (user_id); CREATE TABLE phpbb_users ( user_id int4 DEFAULT nextval('phpbb_users_id_seq'::text) NOT NULL, user_active int2, - username varchar(40) DEFAULT '' NOT NULL, + username varchar(25) DEFAULT '' NOT NULL, user_regdate int4 DEFAULT '0' NOT NULL, user_password varchar(32) DEFAULT '' NOT NULL, user_autologin_key varchar(32), @@ -425,6 +425,7 @@ CREATE TABLE phpbb_users ( user_allowsmile int2, user_allow_pm int2 DEFAULT '1' NOT NULL, user_allowavatar int2 DEFAULT '1' NOT NULL, + user_allow_viewonline int2 DEFAULT '1' NOT NULL, user_notify_pm int2 DEFAULT '1' NOT NULL, user_rank int4 DEFAULT '0', user_avatar varchar(100), diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php index 24dcf19ee8..015efa370f 100644 --- a/phpBB/includes/page_header.php +++ b/phpBB/includes/page_header.php @@ -64,11 +64,11 @@ $template->set_filenames(array( // if($userdata['session_logged_in']) { - $logged_in_status = $lang['You_are_logged_in'] . " <b>".$userdata["username"]."</b>."; - $logged_in_status .= " [<a href=\"".append_sid("login.$phpEx?submit=logout")."\">".$lang['Logout']."</a>]"; + $logged_in_status = $lang['You_are_logged_in'] . " <b>" . $userdata["username"] . "</b>."; + $logged_in_status .= " [<a href=\"" . append_sid("login.$phpEx?submit=logout") . "\">" . $lang['Logout'] . "</a>]"; $u_login_logout = "login.$phpEx?submit=logout"; - $l_login_logout = $lang['Logout']." : ".$userdata["username"].""; + $l_login_logout = $lang['Logout'] . " : " . $userdata["username"] . ""; } else { @@ -87,22 +87,22 @@ $s_last_visit = create_date($board_config['default_dateformat'], $userdata['sess // if($board_config['default_timezone'] < 0) { - $s_timezone = $lang['All_times'] . " " .$lang['GMT'] ." - ".(-$board_config['default_timezone']) . " " . $lang['Hours']; + $s_timezone = $lang['All_times'] . " " .$lang['GMT'] . " - " . (-$board_config['default_timezone']) . " " . $lang['Hours']; } else if($board_config['default_timezone'] == 0) { - $s_timezone = $lang['All_times'] . " " .$lang['GMT']; + $s_timezone = $lang['All_times'] . " " . $lang['GMT']; } else { - $s_timezone = $lang['All_times'] . " " .$lang['GMT'] ." + ".$board_config['default_timezone'] . " " . $lang['Hours']; + $s_timezone = $lang['All_times'] . " " . $lang['GMT'] ." + " . $board_config['default_timezone'] . " " . $lang['Hours']; } // // Get basic (usernames + totals) online // situation // -$sql = "SELECT u.username, u.user_id, s.session_logged_in +$sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, s.session_logged_in FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s WHERE u.user_id = s.session_user_id AND s.session_time >= ".(time() - 300); @@ -112,14 +112,22 @@ if(!$result) error_die(SQL_QUERY, "Couldn't obtain user/online information.", __LINE__, __FILE__); } -$logged_online = 0; +$logged_visible_online = 0; +$logged_hidden_online = 0; $guests_online = 0; while($row = $db->sql_fetchrow($result)) { if($row['session_logged_in']) { - $userlist_ary[] = "<a href=\"".append_sid("profile." . $phpEx . "?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . "\">" . $row['username'] . "</a>"; - $logged_online++; + if($row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN) + { + $userlist_ary[] = "<a href=\"" . append_sid("profile." . $phpEx . "?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . "\">" . $row['username'] . "</a>"; + $logged_visible_online++; + } + else + { + $logged_hidden_online++; + } } else { @@ -127,17 +135,18 @@ while($row = $db->sql_fetchrow($result)) } } $userlist = ""; -for($i = 0; $i < $logged_online; $i++) +for($i = 0; $i < $logged_visible_online; $i++) { - $userlist .= ($i == $logged_online - 1 && $logged_online > 1) ? " and " : ""; + $userlist .= ($i == $logged_visible_online - 1 && $logged_visible_online > 1) ? " and " : ""; $userlist .= $userlist_ary[$i]; - $userlist .= ($i < $logged_online - 2) ? ", " : ""; + $userlist .= ($i < $logged_visible_online - 2) ? ", " : ""; } -$l_r_user_s = ($logged_online == 1) ? $lang['User'] : $lang['Users']; $l_g_user_s = ($guests_online == 1) ? $lang['User'] : $lang['Users']; -$l_is_are = ($logged_online == 1) ? $lang['is'] : $lang['are']; -$userlist = ($logged_online > 0) ? $lang['Registered'] ." $l_r_user_s: " . $userlist : $lang['Registered'] . " $l_r_user_s: ".$lang['None']; +$l_h_user_s = ($logged_hidden_online == 1) ? $lang['User'] : $lang['Users']; +$l_r_user_s = ($logged_visible_online == 1) ? $lang['User'] : $lang['Users']; +$l_is_are = ($logged_visible_online == 1) ? $lang['is'] : $lang['are']; +$userlist = ($logged_visible_online > 0) ? $lang['Registered'] ." $l_r_user_s: " . $userlist : $lang['Registered'] . " $l_r_user_s: ".$lang['None']; // // Obtain number of new private messages @@ -183,7 +192,7 @@ $template->assign_vars(array( "PAGE_TITLE" => $page_title, "LOGIN_STATUS" => $logged_in_status, "META_INFO" => $meta_tags, - "TOTAL_USERS_ONLINE" => "$l_There $l_is_are $logged_online $l_Registered $l_r_user_s $l_and $guests_online $l_guest $l_g_user_s $l_online", + "TOTAL_USERS_ONLINE" => $lang['There'] . " $l_is_are $logged_visible_online " . $lang['Registered'] . " $l_r_user_s, $logged_hidden_online " . $lang['Hidden'] . " $l_h_user_s and $guests_online " . $lang['Guest'] . " $l_g_user_s " . $lang['online'], "LOGGED_IN_USER_LIST" => $userlist, "L_USERNAME" => $lang['Username'], diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php index 85c3146456..92287fb171 100755 --- a/phpBB/language/lang_english.php +++ b/phpBB/language/lang_english.php @@ -87,8 +87,12 @@ $lang['Private_messaging'] = "Send a Private Message"; // // Global Header strings // +$lang['There'] = "There"; $lang['Registered'] = "Registered"; +$lang['Guest'] = "Guest"; +$lang['Hidden'] = "Hidden"; $lang['None'] = "None"; +$lang['online'] = "online"; $lang['You_last_visit'] = "You last visited on"; @@ -240,6 +244,7 @@ $lang['Delete_Image'] = "Delete Image"; $lang['Current_Image'] = "Current Image"; $lang['Notify_on_privmsg'] = "Notify on Private Message"; +$lang['Hide_user'] = "Hide your online status"; // @@ -286,6 +291,24 @@ $lang['can_delete_topics'] = " can delete topics in"; $lang['this_forum'] = " this forum"; // +// Viewonline +// +$lang['Who_is_online'] = "Who is online"; +$lang['Location'] = "Location"; +$lang['Last_updated'] = "Last Updated"; + +$lang['Forum_index'] = "Forum index"; +$lang['Loggin_on'] = "Logging on"; +$lang['Searching_forums'] = "Searching forums"; +$lang['Registering'] = "Registering"; +$lang['Viewing_profiles'] = "Viewing profiles"; +$lang['Altering_profile'] = "Altering profile"; +$lang['Viewing_online'] = "Viewing who is online"; +$lang['Viewing_member_list'] = "Viewing member list"; +$lang['Viewing_priv_msgs'] = "Viewing Private Messages"; +$lang['Viewing_FAQ'] = "Viewing FAQ"; + +// // Errors (not related to a // specific failure on a page, eg. // incorrect password messages do diff --git a/phpBB/profile.php b/phpBB/profile.php index c0c5a26319..07d03ce043 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -341,6 +341,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $allowhtml = $HTTP_POST_VARS['allowhtml']; $allowbbcode = $HTTP_POST_VARS['allowbbcode']; $allowsmilies = $HTTP_POST_VARS['allowsmilies']; + $allowviewonline = ($HTTP_POST_VARS['allowviewonline']) ? 0 : 1; $user_theme = ($HTTP_POST_VARS['theme']) ? $HTTP_POST_VARS['theme'] : $board_config['default_theme']; $user_lang = ($HTTP_POST_VARS['language']) ? $HTTP_POST_VARS['language'] : $board_config['default_lang']; @@ -475,29 +476,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) { $sql = "UPDATE ".USERS_TABLE." - SET - username = '$username'".$passwd_sql.", - user_email = '$email', - user_icq = '$icq', - user_website = '$website', - user_occ = '$occupation', - user_from = '$location', - user_interests = '$interests', - user_sig = '$signature', - user_viewemail = $viewemail, - user_aim = '$aim', - user_yim = '$yim', - user_msnm = '$msn', - user_attachsig = '$attachsig', - user_allowsmile = '$allowsmilies', - user_allowhtml = '$allowhtml', - user_allowbbcode = '$allowbbcode', - user_notify_pm = '$notifypm', - user_timezone = '$user_timezone', - user_dateformat = '$user_dateformat', - user_lang = '$user_lang', - user_template = '$user_template', - user_theme = '$user_theme".$avatar_sql."' + SET username = '$username'".$passwd_sql.", user_email = '$email', user_icq = '$icq', user_website = '$website', user_occ = '$occupation', user_from = '$location', user_interests = '$interests', user_sig = '$signature', user_viewemail = $viewemail, user_aim = '$aim', user_yim = '$yim', user_msnm = '$msn', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify_pm = $notifypm, user_timezone = $user_timezone, user_dateformat = '$user_dateformat', user_lang = '$user_lang', user_template = '$user_template', user_theme = $user_theme".$avatar_sql." WHERE user_id = $user_id"; if($result = $db->sql_query($sql)) @@ -570,6 +549,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $allowhtml = $userdata['user_allowhtml']; $allowbbcode = $userdata['user_allowbbcode']; $allowsmilies = $userdata['user_allowsmile']; + $allowviewonline = $userdata['user_allow_viewonline']; $user_avatar = $userdata['user_avatar']; $user_theme = $userdata['user_theme']; @@ -579,6 +559,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $user_dateformat = $userdata['user_dateformat']; } + $s_hidden_fields = '<input type="hidden" name="user_id" value="' . $userdata['user_id'] . '"><input type="hidden" name="mode" value="' . $mode . '"><input type="hidden" name="agreed" value="true"><input type="hidden" name="coppa" value="0">'; + $template->set_filenames(array( "body" => "profile_add_body.tpl", "jumpbox" => "jumpbox.tpl") @@ -590,9 +572,6 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) ); $template->assign_var_from_handle("JUMPBOX", "jumpbox"); $template->assign_vars(array( - "COPPA" => 0, - "MODE" => $mode, - "USER_ID" => $userdata['user_id'], "USERNAME" => stripslashes($username), "EMAIL" => stripslashes($email), "YIM" => stripslashes($yim), @@ -606,6 +585,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "SIGNATURE" => stripslashes(str_replace("<br />", "\n", $signature)), "VIEW_EMAIL_YES" => ($viewemail) ? "CHECKED" : "", "VIEW_EMAIL_NO" => (!$viewemail) ? "CHECKED" : "", + "HIDE_USER_YES" => (!$allowviewonline) ? "CHECKED" : "", + "HIDE_USER_NO" => ($allowviewonline) ? "CHECKED" : "", "NOTIFY_PM_YES" => ($notifypm) ? "CHECKED" : "", "NOTIFY_PM_NO" => (!$notifypm) ? "CHECKED" : "", "ALWAYS_ADD_SIGNATURE_YES" => ($attachsig) ? "CHECKED" : "", @@ -647,7 +628,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "L_USER_UNIQUE" => $l_useruniq, "L_ALWAYS_ALLOW_SMILIES" => $l_alwayssmile, "L_ALWAYS_ALLOW_BBCODE" => $l_alwaysbbcode, - "L_ALWAYS_ALLOW_HTML" => $l_alwayshtml, + "L_ALWAYS_ALLOW_HTML" => $l_alwayshtml, + "L_HIDE_USER" => $lang['Hide_user'], "L_ALWAYS_ADD_SIGNATURE" => $l_alwayssig, "L_AVATAR" => $lang['Avatar'], "L_AVATAR_EXPLAIN" => $lang['Avatar_explain'], @@ -666,6 +648,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "L_CONFIRM" => $l_confirm, "L_EMAIL_ADDRESS" => $l_emailaddress, + "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_PROFILE_ACTION" => append_sid("profile.$phpEx")) ); @@ -698,6 +681,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $allowhtml = (!empty($HTTP_POST_VARS['allowhtml'])) ? $HTTP_POST_VARS['allowhtml'] : $board_config['allow_html']; $allowbbcode = (!empty($HTTP_POST_VARS['allowbbcode'])) ? $HTTP_POST_VARS['allowbbcode'] : $board_config['allow_bbcode']; $allowsmilies = (!empty($HTTP_POST_VARS['allowsmilies'])) ? $HTTP_POST_VARS['allowsmilies'] : $board_config['allow_smilies']; + $allowviewonline = (!empty($HTTP_POST_VARS['allowviewonline'])) ? $HTTP_POST_VARS['allowviewonline'] : 1; $user_theme = ($HTTP_POST_VARS['theme']) ? $HTTP_POST_VARS['theme'] : $board_config['default_theme']; $user_lang = ($HTTP_POST_VARS['language']) ? $HTTP_POST_VARS['language'] : $board_config['default_lang']; @@ -898,8 +882,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) { $md_pass = md5($password); - $sql = "INSERT INTO ".USERS_TABLE." (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_notify_pm, user_timezone, user_dateformat, user_lang, user_template, user_theme, user_level, user_active, user_actkey) - VALUES ($new_user_id, '$username', '$regdate', '$md_pass', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$avatar_filename', '$viewemail', '$aim', '$yim', '$msn', $attachsig, $allowsmilies, '$allowhtml', $allowbbcode, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', '$user_template', $user_theme, 0, "; + $sql = "INSERT INTO ".USERS_TABLE." (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify_pm, user_timezone, user_dateformat, user_lang, user_template, user_theme, user_level, user_active, user_actkey) + VALUES ($new_user_id, '$username', '$regdate', '$md_pass', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$avatar_filename', '$viewemail', '$aim', '$yim', '$msn', $attachsig, $allowsmilies, '$allowhtml', $allowbbcode, $allowviewonline, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', '$user_template', $user_theme, 0, "; if($require_activation || $coppa == 1) { $act_key = generate_activation_key(); @@ -928,7 +912,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) { if($require_activation) { - $msg = $l_accountinactive; + $msg = $l_accountinactive; $email_msg = $l_welcomeemailactivate; } else if($coppa) @@ -1012,6 +996,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $selected_template = $board_config['default_template']; } + $s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '"><input type="hidden" name="agreed" value="true"><input type="hidden" name="coppa" value="' . $coppa . '">'; + // // Load profile_add template // to allow user to insert @@ -1028,14 +1014,12 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) ); $template->assign_var_from_handle("JUMPBOX", "jumpbox"); $template->assign_vars(array( - "MODE" => $mode, "USERNAME" => stripslashes($username), "EMAIL" => stripslashes($email), "YIM" => stripslashes($yim), "ICQ" => stripslashes($icq), "MSN" => stripslashes($msn), "AIM" => stripslashes($aim), - "COPPA" => $coppa, "OCCUPATION" => stripslashes($occupation), "INTERESTS" => stripslashes($interests), "LOCATION" => stripslashes($location), @@ -1043,6 +1027,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "SIGNATURE" => stripslashes($signature), "VIEW_EMAIL_YES" => ($viewemail) ? "CHECKED" : "", "VIEW_EMAIL_NO" => (!$viewemail) ? "CHECKED" : "", + "HIDE_USER_YES" => (!$allowviewonline) ? "CHECKED" : "", + "HIDE_USER_NO" => ($allowviewonline) ? "CHECKED" : "", "NOTIFY_PM_YES" => ($notifypm) ? "CHECKED" : "", "NOTIFY_PM_NO" => (!$notifypm) ? "CHECKED" : "", "ALWAYS_ADD_SIGNATURE_YES" => ($attachsig) ? "CHECKED" : "", @@ -1081,6 +1067,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "L_ALWAYS_ALLOW_SMILIES" => $l_alwayssmile, "L_ALWAYS_ALLOW_BBCODE" => $l_alwaysbbcode, "L_ALWAYS_ALLOW_HTML" => $l_alwayshtml, + "L_HIDE_USER" => $lang['Hide_user'], "L_ALWAYS_ADD_SIGNATURE" => $l_alwayssig, "L_AVATAR_EXPLAIN" => $lang['Avatar_explain'], "L_UPLOAD_IMAGE" => $lang['Upload_Image'], @@ -1098,6 +1085,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "L_CONFIRM" => $l_confirm, "L_EMAIL_ADDRESS" => $l_emailaddress, + "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_PROFILE_ACTION" => append_sid("profile.$phpEx")) ); @@ -1109,16 +1097,16 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) case 'activate': $sql = "SELECT user_id - FROM ".USERS_TABLE." + FROM " . USERS_TABLE . " WHERE user_actkey = '$act_key'"; if($result = $db->sql_query($sql)) { if($num = $db->sql_numrows($result)) { $rowset = $db->sql_fetchrowset($result); - $sql_update = "UPDATE ".USERS_TABLE." + $sql_update = "UPDATE " . USERS_TABLE . " SET user_active = 1, user_actkey = '' - WHERE user_id = ".$rowset[0]['user_id']; + WHERE user_id = " . $rowset[0]['user_id']; if($result = $db->sql_query($sql_update)) { error_die(GENERAL_ERROR, $l_nowactive); @@ -1142,4 +1130,4 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) } -?> +?>
\ No newline at end of file diff --git a/phpBB/templates/Default/profile_add_body.tpl b/phpBB/templates/Default/profile_add_body.tpl index 8a01560de6..1712c023c1 100755 --- a/phpBB/templates/Default/profile_add_body.tpl +++ b/phpBB/templates/Default/profile_add_body.tpl @@ -82,6 +82,14 @@ <td bgcolor="#CCCCCC"><input type="radio" name="viewemail" value="1" {VIEW_EMAIL_YES}> {L_YES} <input type="radio" name="viewemail" value="0" {VIEW_EMAIL_NO}> {L_NO}</td> </tr> <tr class="tablebody"> + <td bgcolor="#DDDDDD"><b>{L_HIDE_USER}:</b></td> + <td bgcolor="#CCCCCC"><input type="radio" name="allowviewonline" value="1" {HIDE_USER_YES}> {L_YES} <input type="radio" name="allowviewonline" value="0" {HIDE_USER_NO}> {L_NO}</td> + </tr> + <tr class="tablebody"> + <td bgcolor="#DDDDDD"><b>{L_NOTIFY_ON_PRIVMSG}:</b></td> + <td bgcolor="#CCCCCC"><input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES}> {L_YES} <input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO}> {L_NO}</td> + </tr> + <tr class="tablebody"> <td bgcolor="#DDDDDD"><b>{L_ALWAYS_ADD_SIGNATURE}:</b></td> <td bgcolor="#CCCCCC"><input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES}> {L_YES} <input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO}> {L_NO}</td> </tr> @@ -117,14 +125,9 @@ <td bgcolor="#DDDDDD" width="30%"><b>{L_DATE_FORMAT}:</b><br /><font style="{font-size: 8pt;}">{L_DATE_FORMAT_EXPLANATION}</font></td> <td bgcolor="#CCCCCC"><input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="16"></td> </tr> - <tr class="tableheader"> - <td align="center" colspan="2"> - <input type="hidden" name="user_id" value="{USER_ID}"> - <input type="hidden" name="mode" value="{MODE}"> - <input type="hidden" name="agreed" value="true"> - <input type="hidden" name="coppa" value="{COPPA}"> - <input type="submit" name="submit" value="{L_SUBMIT}"> - </tr> + <tr class="tableheader"> + <td align="center" colspan="2">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}"> </td> + </tr> </table> </td> </tr> diff --git a/phpBB/templates/PSO/overall_header.tpl b/phpBB/templates/PSO/overall_header.tpl index 08cfa07308..84fe322041 100644 --- a/phpBB/templates/PSO/overall_header.tpl +++ b/phpBB/templates/PSO/overall_header.tpl @@ -9,20 +9,20 @@ P {font-family:{T_FONTFACE1};font-size:10pt} -TH {background-color:{T_TH_COLOR3};font-family:{T_FONTFACE2};font-size:8pt;font-weight:normal} - +TH {background-color:{T_TH_COLOR3};font-family:{T_FONTFACE2};font-size:8pt;font-weight:normal} +TH.secondary {background-color:{T_TH_COLOR3};font-family:{T_FONTFACE1};font-size:10pt;font-weight:normal;text-align:left} TD.tablebg {background-color:{T_TH_COLOR1}} TD.cat {background-color:{T_TH_COLOR2}} -TD.row_1 {background-color:{T_TD_COLOR1}} -TD.row_2 {background-color:{T_TD_COLOR2}} +TD.row1 {background-color:{T_TD_COLOR1}} +TD.row2 {background-color:{T_TD_COLOR2}} -SPAN.title {font-family:Impact,sans-serif;font-size:36pt} -SPAN.cattitle {font-family:{T_FONTFACE1};font-size:12pt;} -SPAN.gen {font-family:{T_FONTFACE1};font-size:10pt} +SPAN.title {font-family:Impact,sans-serif;font-size:36pt} +SPAN.cattitle {font-family:{T_FONTFACE1};font-size:12pt;font-weight:bold} +SPAN.gen {font-family:{T_FONTFACE1};font-size:10pt} SPAN.gensmall {font-family:{T_FONTFACE1};font-size:8pt} SELECT.small {font-family:"Courier New",courier;font-size:8pt;width:140px} -INPUT.text {font-family:"Courier New",courier;font-size:8pt;} +INPUT.text {font-family:"Courier New",courier;font-size:8pt;} //--> </style> @@ -43,7 +43,7 @@ INPUT.text {font-family:"Courier New",courier;font-size:8pt;} </table></td> </tr> <tr> - <td class="row_1"><table width="100%" cellspacing="0" cellpadding="4" border="0"> + <td class="row1"><table width="100%" cellspacing="0" cellpadding="4" border="0"> <tr> <td><span class="gensmall"><a href="{U_FAQ}">{L_FAQ}</a> | <a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a> | <a href="{U_REGISTER}">{L_REGISTER}</a> | <a href="{U_SEARCH}">{L_SEARCH}</a></span></td> <td align="center"><span class="gensmall">{L_LAST_VISIT} {S_LAST_VISIT_DATE}</span></td> diff --git a/phpBB/templates/PSO/profile_add_body.tpl b/phpBB/templates/PSO/profile_add_body.tpl index 259e2e03aa..123d228768 100644 --- a/phpBB/templates/PSO/profile_add_body.tpl +++ b/phpBB/templates/PSO/profile_add_body.tpl @@ -1,103 +1,107 @@ <div align="center"><table width="98%" cellspacing="0" cellpadding="4" border="0"> <tr> - <td align="left"><font face="{T_FONTFACE1}" size="{T_FONTSIZE1}" color="{T_FONTCOLOR1}"><a href="/">{SITENAME} {L_INDEX}</a></font></td> + <td align="left"><span class="gensmall"><a href="{U_INDEX}">{SITENAME} {L_INDEX}</a></span></td> </tr> </table></div> <div align="center"><table width="98%" cellpadding="1" cellspacing="0" border="0"> <tr><form action="{S_PROFILE_ACTION}" enctype="multipart/form-data" method="post"> - <td bgcolor="{T_TH_COLOR1}"><table border="0" cellpadding="3" cellspacing="1" width="100%"> + <td class="tablebg"><table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> - <td colspan="2" bgcolor="{T_TH_COLOR3}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}" color="{T_FONTCOLOR1}"> <b>{L_REGISTRATION_INFO}</b></font> <font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">[{L_ITEMS_REQUIRED}]</font> </td> + <th class="secondary" colspan="2"> <b>{L_REGISTRATION_INFO}</b> <span class="gensmall">[{L_ITEMS_REQUIRED}]</span> </th> </tr> - <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_USERNAME}: *</b><br>{L_USER_UNIQ}</td> - <td bgcolor="{T_TD_COLOR2}"><input type="text" name="username" size="35" maxlength="40" value="{USERNAME}"></td> - </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_EMAIL_ADDRESS}: *</b></td> - <td bgcolor="{T_TD_COLOR2}"><input type="text" name="email" size="35" maxlength="255" value="{EMAIL}"></td> + <td class="row1"><span class="gen">{L_USERNAME}: *</b><br>{L_USER_UNIQ}</td> + <td class="row2"><input type="text" name="username" size="35" maxlength="40" value="{USERNAME}"></td> </tr> - <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_PASSWORD}: *</b></font><br /><font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">{L_PASSWORD_IF_CHANGED}</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="password" name="password" size="35" maxlength="100" value="{PASSWORD}"></td> + <tr> + <td class="row1"><span class="gen">{L_EMAIL_ADDRESS}: *</b></td> + <td class="row2"><input type="text" name="email" size="35" maxlength="255" value="{EMAIL}"></td> + </tr> + <tr> + <td class="row1"><span class="gen">{L_PASSWORD}: *</b></span><br /><span class="gensmall">{L_PASSWORD_IF_CHANGED}</span></td> + <td class="row2"><input type="password" name="password" size="35" maxlength="100" value="{PASSWORD}"></td> + </tr> + <tr> + <td class="row1"><span class="gen">{L_CONFIRM} {L_PASSWORD}: * </b></span><br /><span class="gensmall">{L_PASSWORD_CONFIRM_IF_CHANGED}</span></td> + <td class="row2"><input type="password" name="password_confirm" size="35" maxlength="100" value="{PASSWORD_CONFIRM}"></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_CONFIRM} {L_PASSWORD}: * </b></font><br /><font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">{L_PASSWORD_CONFIRM_IF_CHANGED}</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="password" name="password_confirm" size="35" maxlength="100" value="{PASSWORD_CONFIRM}"></td> + <th class="secondary" colspan="2"> <b>{L_PROFILE_INFO}</b> <span class="gensmall">[{L_PROFILE_INFO_NOTICE}]</span></td> </tr> <tr> - <td colspan="2" bgcolor="{T_TH_COLOR3}"> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}"><b>{L_PROFILE_INFO}</b></font> <font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">[{L_PROFILE_INFO_NOTICE}]</font></td> + <td class="row1"><span class="gen">{L_ICQ_NUMBER}:</span></td> + <td class="row2"><input type="text" name="icq" size="10" maxlength="15" value="{ICQ}"></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_ICQ_NUMBER}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="text" name="icq" size="10" maxlength="15" value="{ICQ}"></td> + <td class="row1"><span class="gen">{L_AIM}:</span></td> + <td class="row2"><input type="text" name="aim" size="20" maxlength="255" value="{AIM}"></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_AIM}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="text" name="aim" size="20" maxlength="255" value="{AIM}"></td> + <td class="row1"><span class="gen">{L_MESSENGER}:</span></td> + <td class="row2"><input type="text" name="msn" size="20" maxlength="255" value="{MSN}"></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_MESSENGER}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="text" name="msn" size="20" maxlength="255" value="{MSN}"></td> + <td class="row1"><span class="gen">{L_YAHOO}:</span></td> + <td class="row2"><input type="text" name="yim" size="20" maxlength="255" value="{YIM}"></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_YAHOO}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="text" name="yim" size="20" maxlength="255" value="{YIM}"></td> + <td class="row1"><span class="gen">{L_WEBSITE}:</span></td> + <td class="row2"><input type="text" name="website" size="35" maxlength="255" value="{WEBSITE}"></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_WEBSITE}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="text" name="website" size="35" maxlength="255" value="{WEBSITE}"></td> + <td class="row1"><span class="gen">{L_LOCATION}:</span></td> + <td class="row2"><input type="text" name="location" size="35" maxlength="100" value="{LOCATION}"></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_LOCATION}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="text" name="location" size="35" maxlength="100" value="{LOCATION}"></td> + <td class="row1"><span class="gen">{L_OCCUPATION}:</span></td> + <td class="row2"><input type="text" name="occupation" size="35" maxlength="100" value="{OCCUPATION}"></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_OCCUPATION}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="text" name="occupation" size="35" maxlength="100" value="{OCCUPATION}"></td> + <td class="row1"><span class="gen">{L_INTERESTS}:</span></td> + <td class="row2"><input type="text" name="interests" size="35" maxlength="150" value="{INTERESTS}"></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_INTERESTS}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="text" name="interests" size="35" maxlength="150" value="{INTERESTS}"></td> + <td class="row1"><span class="gen">{L_SIGNATURE}:</b></span><br /><font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">{L_SIGNATURE_EXPLAIN}</span></td> + <td class="row2"><textarea name="signature" rows="6" cols="45">{SIGNATURE}</textarea></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_SIGNATURE}:</b></font><br /><font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">{L_SIGNATURE_EXPLAIN}</font></td> - <td bgcolor="{T_TD_COLOR2}"><textarea name="signature" rows="6" cols="45">{SIGNATURE}</textarea></td> + <th class="secondary" colspan="2"> <b>{L_PREFERENCES}</b></td> </tr> <tr> - <td colspan="2" bgcolor="{T_TH_COLOR3}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}"><b>{L_PREFERENCES}</b></font></td> + <td class="row1"><span class="gen">{L_PUBLIC_VIEW_EMAIL}:</span></td> + <td class="row2"><input type="radio" name="viewemail" value="1" {VIEW_EMAIL_YES}> <span class="gen">{L_YES}</span> <input type="radio" name="viewemail" value="0" {VIEW_EMAIL_NO}> <span class="gen">{L_NO}</span></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_PUBLIC_VIEW_EMAIL}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="radio" name="viewemail" value="1" {VIEW_EMAIL_YES}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_YES}</font> <input type="radio" name="viewemail" value="0" {VIEW_EMAIL_NO}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_NO}</font></td> + <td class="row1"><span class="gen">{L_HIDE_USER}:</span></td> + <td class="row2"><input type="radio" name="allowviewonline" value="1" {HIDE_USER_YES}> <span class="gen">{L_YES}</span> <input type="radio" name="allowviewonline" value="0" {HIDE_USER_NO}> <span class="gen">{L_NO}</span></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_NOTIFY_ON_PRIVMSG}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_YES}</font> <input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_NO}</font></td> + <td class="row1"><span class="gen">{L_NOTIFY_ON_PRIVMSG}:</span></td> + <td class="row2"><input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES}> <span class="gen">{L_YES}</span> <input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO}> <span class="gen">{L_NO}</span></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_ALWAYS_ADD_SIGNATURE}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_YES}</font> <input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_NO}</font></td> + <td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}:</span></td> + <td class="row2"><input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES}> <span class="gen">{L_YES}</span> <input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO}> <span class="gen">{L_NO}</span></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_ALWAYS_ALLOW_BBCODE}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_YES}</font> <input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_NO}</font></td> + <td class="row1"><span class="gen">{L_ALWAYS_ALLOW_BBCODE}:</span></td> + <td class="row2"><input type="radio" name="allowbbcode" value="1" {ALWAYS_ALLOW_BBCODE_YES}> <span class="gen">{L_YES}</span> <input type="radio" name="allowbbcode" value="0" {ALWAYS_ALLOW_BBCODE_NO}> <span class="gen">{L_NO}</span></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_ALWAYS_ALLOW_HTML}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_YES}</font> <input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_NO}</font></td> + <td class="row1"><span class="gen">{L_ALWAYS_ALLOW_HTML}:</span></td> + <td class="row2"><input type="radio" name="allowhtml" value="1" {ALWAYS_ALLOW_HTML_YES}> <span class="gen">{L_YES}</span> <input type="radio" name="allowhtml" value="0" {ALWAYS_ALLOW_HTML_NO}> <span class="gen">{L_NO}</span></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_ALWAYS_ALLOW_SMILIES}:</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_YES}</font> <input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_NO}</font></td> + <td class="row1"><span class="gen">{L_ALWAYS_ALLOW_SMILIES}:</span></td> + <td class="row2"><input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES}> <span class="gen">{L_YES}</span> <input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO}> <span class="gen">{L_NO}</span></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_AVATAR}:</b></font><br /><font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">{L_AVATAR_EXPLAIN}</font></td> - <td bgcolor="{T_TD_COLOR2}"><table cellspacing="2" cellpadding="0" border="0"> + <td class="row1"><span class="gen">{L_AVATAR}:</span><br /><span class="gensmall">{L_AVATAR_EXPLAIN}</span></td> + <td class="row2"><table cellspacing="2" cellpadding="0" border="0"> <tr> - <td align="center"><font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">{L_CURRENT_IMAGE}</font></td> - <td rowspan="2" valign="bottom"> <font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">{L_UPLOAD_IMAGE}:</font><br> <input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}"><input type="file" name="avatar"><br> <font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">{L_DELETE_IMAGE}:</font><input type="checkbox" name="avatardel"></td> + <td align="center"><span class="gensmall">{L_CURRENT_IMAGE}</span></td> + <td rowspan="2" valign="bottom"> <span class="gensmall">{L_UPLOAD_IMAGE}:</span><br> <input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}"><input type="file" name="avatar"><br> <span class="gensmall">{L_DELETE_IMAGE}:</span><input type="checkbox" name="avatardel"></td> </tr> <tr> <td align="center"> {AVATAR} </td> @@ -105,27 +109,27 @@ </table></td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_BOARD_LANGUAGE}:</font></td> - <td bgcolor="{T_TD_COLOR2}">{LANGUAGE_SELECT}</td> + <td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td> + <td class="row2">{LANGUAGE_SELECT}</td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_BOARD_THEME}:</font></td> - <td bgcolor="{T_TD_COLOR2}">{THEME_SELECT}</td> + <td class="row1"><span class="gen">{L_BOARD_THEME}:</span></td> + <td class="row2">{THEME_SELECT}</td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_BOARD_TEMPLATE}:</font></td> - <td bgcolor="{T_TD_COLOR2}">{TEMPLATE_SELECT}</td> + <td class="row1"><span class="gen">{L_BOARD_TEMPLATE}:</span></td> + <td class="row2">{TEMPLATE_SELECT}</td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_TIMEZONE}:</font></td> - <td bgcolor="{T_TD_COLOR2}">{TIMEZONE_SELECT}</td> + <td class="row1"><span class="gen">{L_TIMEZONE}:</span></td> + <td class="row2">{TIMEZONE_SELECT}</td> </tr> <tr> - <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_DATE_FORMAT}:</font><br /><font face="{T_FONTFACE1}" size="{T_FONTSIZE1}">{L_DATE_FORMAT_EXPLANATION}</font></td> - <td bgcolor="{T_TD_COLOR2}"><input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="16"></td> + <td class="row1"><span class="gen">{L_DATE_FORMAT}:</span><br /><span class="gensmall">{L_DATE_FORMAT_EXPLANATION}</span></td> + <td class="row2"><input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="16"></td> </tr> <tr> - <td colspan="2" bgcolor="{T_TH_COLOR3}" align="center"><input type="hidden" name="user_id" value="{USER_ID}"><input type="hidden" name="mode" value="{MODE}"><input type="hidden" name="agreed" value="true"><input type="hidden" name="coppa" value="{COPPA}"><input type="submit" name="submit" value="{L_SUBMIT}"></td> + <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}"></td> </tr> </table></td> </form></tr> diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index 7b89476aa4..b8b26eefa1 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -36,12 +36,6 @@ init_userprefs($userdata); // End session management // -$total_posts = get_db_stat('postcount'); -$total_users = get_db_stat('usercount'); -$newest_userdata = get_db_stat('newestuser'); -$newest_user = $newest_userdata["username"]; -$newest_uid = $newest_userdata["user_id"]; - // // Output page header and load // viewonline template @@ -58,20 +52,11 @@ $template->assign_vars(array( "SELECT_NAME" => POST_FORUM_URL) ); $template->assign_var_from_handle("JUMPBOX", "jumpbox"); -$template->assign_vars(array( - "TOTAL_POSTS" => $total_posts, - "TOTAL_USERS" => $total_users, - "POST_USER_URL" => POST_USERS_URL, - "NEWEST_USER" => $newest_user, - "NEWEST_UID" => $newest_uid, - - "U_NEWEST_USER_PROFILE" => append_sid("profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=$newest_uid")) -); // // End header // -$sql = "SELECT u.username, u.user_id, s.session_page, s.session_logged_in, s.session_time +$sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, s.session_page, s.session_logged_in, s.session_time FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s WHERE u.user_id = s.session_user_id AND s.session_time >= ".(time()-300)." @@ -103,11 +88,10 @@ if(!$onlinerow || !$forum_data) } $template->assign_vars(array( - "L_WHOSONLINE" => $l_whosonline, - "L_USERNAME" => $l_username, - "L_LOCATION" => $l_forum_location, - "L_LAST_UPDATE" => $l_last_updated - ) + "L_WHOSONLINE" => $lang['Who_is_online'], + "L_USERNAME" => $lang['Username'], + "L_LOCATION" => $lang['Location'], + "L_LAST_UPDATE" => $lang['Last_updated']) ); $active_users = 0; @@ -121,31 +105,54 @@ if($online_count) if(!($i % 2)) { - $row_color = "#".$theme['td_color1']; + $row_color = "#" . $theme['td_color1']; } else { - $row_color = "#".$theme['td_color2']; + $row_color = "#" . $theme['td_color2']; } - if($onlinerow[$i]['user_id'] != ANONYMOUS && $onlinerow[$i]['user_id'] != DELETED) + if($onlinerow[$i]['user_id'] != ANONYMOUS) { if($onlinerow[$i]['session_logged_in']) { - $username = $onlinerow[$i]['username']; - $logged_on = TRUE; - $active_users++; + if($onlinerow[$i]['user_allow_viewonline']) + { + $username = $onlinerow[$i]['username']; + $hidden = FALSE; + $logged_on = TRUE; + $active_users++; + } + else + { + $username = $onlinerow[$i]['username']; + $hidden = TRUE; + $logged_on = TRUE; + $hidden_users++; + } } else { - $username = $onlinerow[$i]['username']; - $logged_on = FALSE; - $guest_users++; + if($onlinerow[$i]['user_allow_viewonline']) + { + $username = $onlinerow[$i]['username']; + $hidden = FALSE; + $logged_on = FALSE; + $guest_users++; + } + else + { + $username = $onlinerow[$i]['username']; + $hidden = TRUE; + $logged_on = FALSE; + $guest_users++; + } } } else { - $username = $l_anonymous; + $username = $lang['Anonymous']; + $hidden = FALSE; $logged_on = FALSE; $guest_users++; } @@ -155,49 +162,53 @@ if($online_count) switch($onlinerow[$i]['session_page']) { case PAGE_INDEX: - $location = $l_forum_index; - $location_url = "index.".$phpEx; + $location = $lang['Forum_index']; + $location_url = "index.$phpEx"; break; case PAGE_LOGIN: - $location = $l_logging_on; - $location_url = "index.".$phpEx; + $location = $lang['Loggin_on']; + $location_url = "index.$phpEx"; break; case PAGE_SEARCH: - $location = $l_searching; - $location_url = "search.".$phpEx; + $location = $lang['Searching_forums']; + $location_url = "search.$phpEx"; break; case PAGE_REGISTER: - $location = $l_registering; - $location_url = "index.".$phpEx; + $location = $lang['Registering']; + $location_url = "index.$phpEx"; break; case PAGE_VIEWPROFILE: - $location = $l_viewing_profiles; - $location_url = "index.".$phpEx; + $location = $lang['Viewing_profiles']; + $location_url = "index.$phpEx"; break; case PAGE_ALTERPROFILE: - $location = $l_altering_profile; - $location_url = "index.".$phpEx; + $location = $lang['Altering_profile']; + $location_url = "index.$phpEx"; break; case PAGE_VIEWONLINE: - $location = $l_viewing_online; - $location_url = "viewonline.".$phpEx; + $location = $lang['Viewing_online']; + $location_url = "viewonline.$phpEx"; break; case PAGE_VIEWMEMBERS: - $location = $l_viewing_members; - $location_url = "memberlist.".$phpEx; + $location = $lang['Viewing_member_list']; + $location_url = "memberlist.$phpEx"; + break; + case PAGE_PRIVMSGS: + $location = $lang['Viewing_priv_msgs']; + $location_url = "privmsg.$phpEx"; break; case PAGE_FAQ: - $location = $l_viewing_faq; - $location_url = "faq.".$phpEx; + $location = $lang['Viewing_FAQ']; + $location_url = "faq.$phpEx"; break; default: - $location = $l_forum_index; - $location_url = "index.".$phpEx; + $location = $lang['Forum_index']; + $location_url = "index.$phpEx"; } } else { - $location_url = append_sid("viewforum.".$phpEx."?".POST_FORUM_URL."=".$onlinerow[$i]['session_page']); + $location_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $onlinerow[$i]['session_page']); $location = $forum_data[$onlinerow[$i]['session_page']]; } @@ -209,7 +220,7 @@ if($online_count) // if... constructs in the templating system // for that ... // - if($logged_on) + if( $logged_on && ( !$hidden || $userdata['user_level'] == ADMIN ) ) { $template->assign_block_vars("userrow", array( @@ -218,7 +229,7 @@ if($online_count) "LOGGED_ON" => $logged_on, "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow[$i]['session_time'], $board_config['default__timezone']), "LOCATION" => $location, - "U_USER_PROFILE" => append_sid("profile.".$phpEx."?mode=viewprofile&".POST_USERS_URL."=".$onlinerow[$i]['user_id']), + "U_USER_PROFILE" => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $onlinerow[$i]['user_id']), "U_FORUM_LOCATION" => append_sid($location_url) ) ); @@ -227,7 +238,8 @@ if($online_count) } $template->assign_vars(array( - "ACTIVE_USERS" => $active_users, + "ACTIVE_USERS" => $active_users, + "HIDDEN_USERS" => $hidden_users, "GUEST_USERS" => $guest_users ) ); @@ -241,4 +253,4 @@ else include('includes/page_tail.'.$phpEx); -?> +?>
\ No newline at end of file |