From 0c03ef5dce4f21bbff2b45861b871b57aad3632c Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Fri, 20 Jul 2001 17:30:17 +0000 Subject: [PATCH] A few new vars sent to view profile, remain l_ vars changed to lang array git-svn-id: file:///svn/phpbb/trunk@709 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/language/lang_english.php | 33 ++++- phpBB/profile.php | 132 ++++++++++-------- phpBB/templates/Default/profile_view_body.tpl | 2 +- phpBB/templates/PSO/profile_view_body.tpl | 66 ++++++--- 4 files changed, 151 insertions(+), 82 deletions(-) diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php index 0a9e700c33..2cdbfc8c58 100755 --- a/phpBB/language/lang_english.php +++ b/phpBB/language/lang_english.php @@ -315,8 +315,27 @@ $lang['No_folder'] = "No folder specified"; // // Profiles/Registration // +$lang['Viewing_profile_of'] = "Viewing profile of"; // followed by username +$lang['Preferences'] = "Preferences"; +$lang['Items_required'] = "Items marked with a * are required unless stated otherwise"; +$lang['Registration_info'] = "Registraction Information"; +$lang['Profile_info'] = "Profile Information"; +$lang['Profile_info_warn'] = "This information will be publicly viewable"; +$lang['Avatar_panel'] = "Avatar control panel"; + $lang['Website'] = "Website"; $lang['From'] = "From"; +$lang['Contact'] = "Contact"; +$lang['Email_address'] = "Email address"; +$lang['Email'] = "Email"; +$lang['Private_message'] = "Send Private Message"; +$lang['Hidden'] = "[ Hidden email address ]"; +$lang['Search_user_posts'] = "Search for posts by this user"; +$lang['Interests'] = "Interests"; +$lang['Occupation'] = "Occupation"; + +$lang['posts_per_day'] = "posts per day"; +$lang['of_total'] = "of total"; // follows percentage of total posts $lang['Wrong_Profile'] = "You cannot modify a profile that is not your own."; $lang['Bad_username'] = "The username you choose has been taken or is disallowed by the administrator."; @@ -330,12 +349,20 @@ $lang['Always_smile'] = "Always enable Smilies"; $lang['Always_html'] = "Always allow HTML"; $lang['Always_bbcode'] = "Always allow BBCode"; $lang['Always_add_sig'] = "Always attach my signature"; +$lang['Board_template'] = "Board Template"; $lang['Board_theme'] = "Board Theme"; $lang['Board_lang'] = "Board Language"; $lang['No_themes'] = "No Themes In database"; $lang['Timezone'] = "Timezone"; +$lang['Date_format'] = "Date format"; +$lang['Date_format_explain'] = "The syntax used is identical to the PHP date() function"; +$lang['Signature'] = "Signature"; +$lang['Signature_explain'] = "This is a block of text that can be added to posts you make. There is a 255 character limit"; +$lang['Public_view_email'] = "Always show my Email Address"; + +$lang['password_if_changed'] = "You only need to supply a password if you want to change it"; +$lang['password_confirm_if_changed'] = "You only need to confirm your password if you changed it above"; -$lang['Avatar_panel'] = "Avatar control panel"; $lang['Avatar'] = "Avatar"; $lang['Avatar_explain'] = "Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than " . $board_config['avatar_max_width'] . " pixels, a height no greater than " . $board_config['avatar_max_height'] . " pixels and a file size no more than " . (round($board_config['avatar_filesize'] / 1024)) . " kB."; $lang['Upload_Avatar_file'] = "Upload Avatar from your machine"; @@ -686,7 +713,7 @@ $l_website = "Web Site Address"; $l_occupation = "Occupation"; $l_interests = "Interests"; $l_signature = "Signature"; -$l_sigexplain = "This is a block of text that can be added to posts you make. There is a 255 character limit"; +$l_sigexplain = ""; $l_usertaken = "The $l_username you picked has been taken."; $l_userdisallowed= "The $l_username you picked has been disallowed by the administrator. $l_tryagain"; $l_infoupdated = "Your Information has been updated"; @@ -699,7 +726,7 @@ $l_boardtemplate = "Select Template"; $l_date_format = "Date format"; -$l_date_format_explanation = "The syntax used is identical to the PHP date() function"; +$l_date_format_explanation = ""; $l_password_if_changed = "You only need to supply a password if you want to change it."; $l_password_confirm_if_changed = "You only need to confirm your password if you changed it above."; diff --git a/phpBB/profile.php b/phpBB/profile.php index ea6adb1787..763c27a938 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -196,7 +196,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) if($mode == "viewprofile") { $pagetype = "profile"; - $page_title = "$l_profile"; + $page_title = $lang['Viewing_profile']; // // Output page header and @@ -249,31 +249,38 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) // Replace the @ with 'at'. Some anti-spam mesures. $email_addr = str_replace("@", " at ", $profiledata['user_email']); $email = "$email_addr"; + $email_img = "\"""; } else { - $email = $l_hidden; + $email = $lang['Hidden']; + $email_img = $lang['Hidden']; } if($members[$i]['user_icq']) { - $icq_status = ""; + $icq_status_img = ""; - $icq_add = "\"""; + $icq_add_img = "\"""; } else { - $icq_status = " "; - $icq_add = " "; + $icq_status_img = " "; + $icq_add_img = " "; } - $aim = ($members[$i]['user_aim']) ? "" : " "; + $aim_img = ($profiledata['user_aim']) ? "" : " "; - $msnm = ($members[$i]['user_msnm']) ? "" : " "; + $msnm_img = ($profiledata['user_msnm']) ? "" : " "; - $yim = ($members[$i]['user_yim']) ? "" : " "; + $yim_img = ($members[$i]['user_yim']) ? "" : " "; - $search = ""; + $search_img = "\"""; + $search = "" . $lang['Search_user_posts'] . ""; + + $www_img = ($profiledata['user_website']) ? "\""" : " "; + + $pm_img = "\"""; $template->assign_vars(array( "USERNAME" => stripslashes($profiledata['username']), @@ -282,31 +289,40 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "POSTS" => $profiledata['user_posts'], "PERCENTAGE" => $percentage . "%", "EMAIL" => $email, - "ICQ_STATUS" => $icq_status, - "AIM" => stripslashes($profiledata['user_aim']), - "MSN" => stripslashes($profiledata['user_msnm']), - "YIM" => stripslashes($profiledata['user_yim']), - "WEBSITE" => stripslashes($profiledata['user_website']), - "LOCATION" => stripslashes($profiledata['user_from']), - "OCCUPATION" => stripslashes($profiledata['user_occ']), - "INTERESTS" => stripslashes($profiledata['user_interests']), - "AVATAR_IMG" => $board_config['avatar_path'] . "/" . stripslashes($profiledata['user_avatar']), + "EMAIL_IMG" => $email_img, + "PM_IMG" => $pm_img, + "UL_SEARCH" => $search, + "SEARCH_IMG" => $search_img, + "ICQ_ADD_IMG" => $icq_add_img, + "ICQ_STATUS_IMG" => $icq_status_img, + "AIM" => ( ($profiledata['user_aim']) ? stripslashes($profiledata['user_aim']) : "" ), + "AIM_IMG" => $aim_img, + "MSN" => ( ($profiledata['user_msnm']) ? stripslashes($profiledata['user_msnm']) : "" ), + "MSN_IMG" => $msnm_img, + "YIM" => ( ($profiledata['user_yim']) ? stripslashes($profiledata['user_yim']) : "" ), + "YIM_IMG" => $yim_img, + "WEBSITE" => ( ($profiledata['user_website']) ? stripslashes($profiledata['user_website']) : "" ), + "WEBSITE_IMG" => $www_img, + "LOCATION" => ( ($profiledatas['user_from']) ? stripslashes($profiledata['user_from']) : "" ), + "OCCUPATION" => ( ($profiledata['user_occ']) ? stripslashes($profiledata['user_occ']) : "" ), + "INTERESTS" => ( ($profiledata['user_interests']) ? stripslashes($profiledata['user_interests']) : "" ), + "AVATAR_IMG" => "", - "L_VIEWING_PROFILE" => $l_viewing_profile, - "L_USERNAME" => $lang['Username'], - "L_VIEW_USERS_POSTS" => $l_view_users_posts, - "L_JOINED" => $l_joined, - "L_PER_DAY" => $l_per_day, - "L_OF_TOTAL" => $l_of_total, - "L_EMAIL_ADDRESS" => $l_emailaddress, - "L_ICQ_NUMBER" => $l_icq_number, - "L_YAHOO" => $l_yahoo, - "L_AIM" => $l_aim, - "L_WEBSITE" => $l_website, - "L_MESSENGER" => $l_messenger, - "L_LOCATION" => $l_from, - "L_OCCUPATION" => $l_occupation, - "L_INTERESTS" => $l_interests, + "L_VIEWING_PROFILE" => $lang['Viewing_profile_of'], + "L_PER_DAY" => $lang['posts_per_day'], + "L_OF_TOTAL" => $lang['of_total'], + "L_CONTACT" => $lang['Contact'], + "L_EMAIL_ADDRESS" => $lang['Email_address'], + "L_EMAIL" => $lang['Email'], + "L_PM" => $lang['Private_message'], + "L_ICQ_NUMBER" => $lang['ICQ'], + "L_YAHOO" => $lang['YIM'], + "L_AIM" => $lang['AIM'], + "L_MESSENGER" => $lang['MSNM'], + "L_WEBSITE" => $lang['Website'], + "L_LOCATION" => $lang['From'], + "L_OCCUPATION" => $lang['Occupation'], + "L_INTERESTS" => $lang['Interests'], "U_SEARCH_USER" => append_sid("search.$phpEx?a=" . urlencode($profiledata['username']) . "&f=all&b=0&d=DESC&c=100&dosearch=1"), "U_USER_WEBSITE" => stripslashes($profiledata['user_website']), @@ -382,6 +398,13 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $yim = (!empty($HTTP_POST_VARS['yim'])) ? trim(strip_tags($HTTP_POST_VARS['yim'])) : ""; $website = (!empty($HTTP_POST_VARS['website'])) ? trim(strip_tags($HTTP_POST_VARS['website'])) : ""; + if($website != "") + { + if( !ereg("^http\:\/\/", $website) ) + { + $website = "http://" . $website; + } + } $location = (!empty($HTTP_POST_VARS['location'])) ? trim(strip_tags($HTTP_POST_VARS['location'])) : ""; $occupation = (!empty($HTTP_POST_VARS['occupation'])) ? trim(strip_tags($HTTP_POST_VARS['occupation'])) : ""; $interests = (!empty($HTTP_POST_VARS['interests'])) ? trim(strip_tags($HTTP_POST_VARS['interests'])) : ""; @@ -829,8 +852,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) } else { - $msg = $lang['Account_added']; //$l_acountadded; - $email_msg = $lang['Welcome_email']; //$l_welcomemail; + $msg = $lang['Account_added']; + $email_msg = $lang['Welcome_email']; } if(!$coppa) @@ -977,8 +1000,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "DATE_FORMAT" => stripslashes($user_dateformat), "TEMPLATE_SELECT" => template_select($user_template), - "L_PASSWORD_IF_CHANGED" => ($mode == "editprofile") ? $l_password_if_changed : "", - "L_PASSWORD_CONFIRM_IF_CHANGED" => ($mode == "editprofile") ? $l_password_confirm_if_changed : "", + "L_PASSWORD_IF_CHANGED" => ($mode == "editprofile") ? $lang['password_if_changed'] : "", + "L_PASSWORD_CONFIRM_IF_CHANGED" => ($mode == "editprofile") ? $lang['password_confirm_if_changed'] : "", "L_SUBMIT" => $lang['Submit'], "L_RESET" => $lang['Reset'], "L_ICQ_NUMBER" => $lang['ICQ'], @@ -987,17 +1010,16 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "L_WEBSITE" => $lang['Website'], "L_AIM" => $lang['AIM'], "L_LOCATION" => $lang['From'], - "L_OCCUPATION" => $l_occupation, + "L_OCCUPATION" => $lang['Occupation'], "L_BOARD_LANGUAGE" => $lang['Board_lang'], "L_BOARD_THEME" => $lang['Board_theme'], - "L_BOARD_TEMPLATE" => $l_boardtemplate, - "L_TIMEZONE" => $l_timezone, - "L_DATE_FORMAT" => $l_date_format, - "L_DATE_FORMAT_EXPLANATION" => $l_date_format_explanation, + "L_BOARD_TEMPLATE" => $lang['Board_template'], + "L_TIMEZONE" => $lang['Timezone'], + "L_DATE_FORMAT" => $lang['Date_format'], + "L_DATE_FORMAT_EXPLAIN" => $lang['Date_format_explain'], "L_YES" => $lang['Yes'], "L_NO" => $lang['No'], - "L_INTERESTS" => $l_interests, - "L_USER_UNIQUE" => $l_useruniq, + "L_INTERESTS" => $lang['Interests'], "L_ALWAYS_ALLOW_SMILIES" => $lang['Always_smile'], "L_ALWAYS_ALLOW_BBCODE" => $lang['Always_bbcode'], "L_ALWAYS_ALLOW_HTML" => $lang['Always_html'], @@ -1016,17 +1038,17 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "L_DELETE_AVATAR" => $lang['Delete_Image'], "L_CURRENT_IMAGE" => $lang['Current_Image'], - "L_SIGNATURE" => $l_signature, - "L_SIGNATURE_EXPLAIN" => $l_sigexplain, + "L_SIGNATURE" => $lang['Signature'], + "L_SIGNATURE_EXPLAIN" => $lang['Signature_explain'], "L_NOTIFY_ON_PRIVMSG" => $lang['Notify_on_privmsg'], - "L_PREFERENCES" => $l_preferences, - "L_PUBLIC_VIEW_EMAIL" => $l_publicmail, - "L_ITEMS_REQUIRED" => $l_itemsreq, - "L_REGISTRATION_INFO" => $l_reginfo, - "L_PROFILE_INFO" => $l_profile_info, - "L_PROFILE_INFO_NOTICE" => $l_profile_info_notice, - "L_CONFIRM" => $l_confirm, - "L_EMAIL_ADDRESS" => $l_emailaddress, + "L_PREFERENCES" => $lang['Preferences'], + "L_PUBLIC_VIEW_EMAIL" => $lang['Public_view_email'], + "L_ITEMS_REQUIRED" => $lang['Items_required'], + "L_REGISTRATION_INFO" => $lang['Registration_info'], + "L_PROFILE_INFO" => $lang['Profile_info'], + "L_PROFILE_INFO_NOTICE" => $lang['Profile_info_warn'], + "L_CONFIRM" => $lang['Confirm'], + "L_EMAIL_ADDRESS" => $lang['Email_address'], "S_ALLOW_AVATAR_UPLOAD" => $board_config['allow_avatar_upload'], "S_ALLOW_AVATAR_LOCAL" => $board_config['allow_avatar_local'], diff --git a/phpBB/templates/Default/profile_view_body.tpl b/phpBB/templates/Default/profile_view_body.tpl index 72fcc63d79..66d68e274e 100755 --- a/phpBB/templates/Default/profile_view_body.tpl +++ b/phpBB/templates/Default/profile_view_body.tpl @@ -8,7 +8,7 @@ {L_VIEWING_PROFILE} {USERNAME} {L_USERNAME}: - {USERNAME} ({L_VIEW_USERS_POSTS}) + {USERNAME} ({UL_SEARCH}) {L_JOINED}: diff --git a/phpBB/templates/PSO/profile_view_body.tpl b/phpBB/templates/PSO/profile_view_body.tpl index 009138d0b5..389dee7c6c 100644 --- a/phpBB/templates/PSO/profile_view_body.tpl +++ b/phpBB/templates/PSO/profile_view_body.tpl @@ -8,54 +8,74 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - +
{L_VIEWING_PROFILE} {USERNAME}{L_VIEWING_PROFILE} {USERNAME}
{L_USERNAME}:{USERNAME} [{L_VIEW_USERS_POSTS}]{L_USERNAME}: + + + + + +
{USERNAME}      {AVATAR_IMG}
{L_JOINED}:{JOINED} [{POSTS_PER_DAY} {L_PER_DAY}]{L_JOINED}:{JOINED}
{L_POSTS}:{POSTS} [{PERCENTAGE} {L_OF_TOTAL}]{L_POSTS}: + + + + + + + +
{POSTS}     [ {PERCENTAGE} {L_OF_TOTAL} / {POSTS_PER_DAY} {L_PER_DAY}]     {SEARCH_IMG}
{L_EMAIL_ADDRESS}:{EMAIL} {PM_IMG}{L_CONTACT}: + + + + + +
{EMAIL_IMG}     {PM_IMG}
{L_ICQ_NUMBER}:{ICQ}{L_ICQ_NUMBER}:{ICQ_IMG}
{L_AIM}:{AIM}{L_AIM}:{AIM_IMG}
{L_MESSENGER}:{MSN}{L_MESSENGER}:{MSN_IMG}
{L_YAHOO}:{YIM}{L_YAHOO}:{YIM_IMG}
{L_WEBSITE}:{WEBSITE}{L_WEBSITE}:{WEBSITE_IMG}
{L_LOCATION}:{L_LOCATION}: {LOCATION}
{L_OCCUPATION}:{OCCUPATION}{L_OCCUPATION}:{OCCUPATION}
{L_INTERESTS}:{L_INTERESTS}: {INTERESTS}