diff options
121 files changed, 1458 insertions, 1083 deletions
diff --git a/.travis.yml b/.travis.yml index 70428d611d..4d14c16977 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ script: - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysql' ]; then ../phpBB/vendor/bin/phing sniff; fi" - cd .. - phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysql' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH...FETCH_HEAD; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysql' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi" matrix: allow_failures: diff --git a/build/package.php b/build/package.php index 97bfc4ea5c..89f9d9a1ee 100755 --- a/build/package.php +++ b/build/package.php @@ -428,14 +428,22 @@ chdir($package->get('dest_dir') . '/install'); // $package->run_command('rm -v database_update.php'); $package->run_command('rm -v install_update.php'); +chdir($package->get('dest_dir')); +$package->run_command('mv -v styles/subsilver2 ../subsilver2'); +$package->run_command('cp -p docs/COPYING ../subsilver2/license.txt'); + chdir($package->locations['package_dir']); foreach ($compress_programs as $extension => $compress_command) { $package->begin_status('Packaging phpBB for ' . $extension); $package->run_command('rm -v ./release_files/' . $package->get('release_filename') . ".{$extension}"); + $package->run_command('rm -v ./release_files/subsilver2_' . $package->get('new_version_number') . ".{$extension}"); // Build Package $package->run_command("$compress_command ./release_files/" . $package->get('release_filename') . '.' . $extension . ' ' . $package->get('package_name')); + + // Build subSilver2 Package + $package->run_command("$compress_command ./release_files/subsilver2_" . $package->get('new_version_number') . '.' . $extension . ' subsilver2'); } // Microsoft Web PI packaging diff --git a/git-tools/commit-msg-hook-range.sh b/git-tools/commit-msg-hook-range.sh index 66628c1d17..2b408c3e79 100755 --- a/git-tools/commit-msg-hook-range.sh +++ b/git-tools/commit-msg-hook-range.sh @@ -5,26 +5,47 @@ # # Calls the git commit-msg hook on all non-merge commits in a given commit range. # -set -e if [ "$#" -ne 1 ]; then - echo "Expected one argument (commit range, e.g. eef1b586...1666476b)." + echo "Expected one argument (commit range, e.g. phpbb/develop..ticket/12345)." exit fi DIR=$(dirname "$0") -COMMIT_MSG_HOOK_PATH="$DIR/hooks/commit-msg" - COMMIT_RANGE="$1" +COMMIT_MSG_HOOK_PATH="$DIR/hooks/commit-msg" +COMMIT_MSG_HOOK_FATAL=$(git config --bool phpbb.hooks.commit-msg.fatal 2> /dev/null) +git config phpbb.hooks.commit-msg.fatal true +EXIT_STATUS=0 for COMMIT_HASH in $(git rev-list --no-merges "$COMMIT_RANGE") do + echo "Inspecting commit message of commit $COMMIT_HASH" + # The git commit-msg hook takes a path to a file containing a commit # message. So we have to extract the commit message into a file first, # which then also needs to be deleted after our work is done. COMMIT_MESSAGE_PATH="$DIR/commit_msg.$COMMIT_HASH" git log -n 1 --pretty=format:%B "$COMMIT_HASH" > "$COMMIT_MESSAGE_PATH" + + # Invoke hook on commit message file. "$COMMIT_MSG_HOOK_PATH" "$COMMIT_MESSAGE_PATH" + + # If any commit message hook complains with a non-zero exit status, we + # will send a non-zero exit status upstream. + if [ $? -ne 0 ] + then + EXIT_STATUS=1 + fi + rm "$COMMIT_MESSAGE_PATH" done + +# Restore phpbb.hooks.commit-msg.fatal config +if [ -n "$COMMIT_MSG_HOOK_FATAL" ] +then + git config phpbb.hooks.commit-msg.fatal "$COMMIT_MSG_HOOK_FATAL" +fi + +exit $EXIT_STATUS diff --git a/phpBB/adm/style/acp_ext_delete_data.html b/phpBB/adm/style/acp_ext_delete_data.html index 5b38d9b8d0..0f3adb7cfe 100644 --- a/phpBB/adm/style/acp_ext_delete_data.html +++ b/phpBB/adm/style/acp_ext_delete_data.html @@ -1,6 +1,6 @@ <!-- INCLUDE overall_header.html --> - <a name="maincontent"></a> + <a id="maincontent"></a> <h1>{L_EXTENSIONS_ADMIN}</h1> diff --git a/phpBB/adm/style/acp_ext_details.html b/phpBB/adm/style/acp_ext_details.html index 18786d80f9..986aa24b1b 100644 --- a/phpBB/adm/style/acp_ext_details.html +++ b/phpBB/adm/style/acp_ext_details.html @@ -1,6 +1,6 @@ <!-- INCLUDE overall_header.html --> -<a name="maincontent"></a> +<a id="maincontent"></a> <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a> @@ -10,38 +10,38 @@ <legend>{L_EXT_DETAILS}</legend> <!-- IF META_DISPLAY_NAME --> <dl> - <dt><label for="meta_display_name">{L_DISPLAY_NAME}{L_COLON}</label></dt> + <dt><label>{L_DISPLAY_NAME}{L_COLON}</label></dt> <dd><strong id="meta_display_name">{META_DISPLAY_NAME}</strong></dd> </dl> <!-- ENDIF --> <dl> - <dt><label for="meta_name">{L_CLEAN_NAME}{L_COLON}</label></dt> + <dt><label>{L_CLEAN_NAME}{L_COLON}</label></dt> <dd><strong id="meta_name">{META_NAME}</strong></dd> </dl> <!-- IF META_DESCRIPTION --> <dl> - <dt><label for="meta_description">{L_DESCRIPTION}{L_COLON}</label></dt> + <dt><label>{L_DESCRIPTION}{L_COLON}</label></dt> <dd><p id="meta_description">{META_DESCRIPTION}</p></dd> </dl> <!-- ENDIF --> <dl> - <dt><label for="meta_version">{L_VERSION}{L_COLON}</label></dt> + <dt><label>{L_VERSION}{L_COLON}</label></dt> <dd><p id="meta_version">{META_VERSION}</p></dd> </dl> <!-- IF META_HOMEPAGE --> <dl> - <dt><label for="meta_homepage">{L_HOMEPAGE}{L_COLON}</label></dt> - <dd><p id="meta_homepage">{META_HOMEPAGE}</p></dd> + <dt><label>{L_HOMEPAGE}{L_COLON}</label></dt> + <dd><strong id="meta_homepage"><a href="{META_HOMEPAGE}">{META_HOMEPAGE}</a></strong></dd> </dl> <!-- ENDIF --> <!-- IF META_TIME --> <dl> - <dt><label for="meta_time">{L_TIME}{L_COLON}</label></dt> + <dt><label>{L_TIME}{L_COLON}</label></dt> <dd><p id="meta_time">{META_TIME}</p></dd> </dl> <!-- ENDIF --> <dl> - <dt><label for="meta_license">{L_LICENCE}{L_COLON}</label></dt> + <dt><label>{L_LICENCE}{L_COLON}</label></dt> <dd><p id="meta_license">{META_LICENCE}</p></dd> </dl> </fieldset> @@ -51,13 +51,13 @@ <legend>{L_REQUIREMENTS}</legend> <!-- IF META_REQUIRE_PHPBB --> <dl<!-- IF META_REQUIRE_PHPBB_FAIL --> class="requirements_not_met"<!-- ENDIF -->> - <dt><label for="require_phpbb">{L_PHPBB_VERSION}{L_COLON}</label></dt> + <dt><label>{L_PHPBB_VERSION}{L_COLON}</label></dt> <dd><p id="require_phpbb">{META_REQUIRE_PHPBB}</p></dd> </dl> <!-- ENDIF --> <!-- IF META_REQUIRE_PHP --> <dl<!-- IF META_REQUIRE_PHP_FAIL --> class="requirements_not_met"<!-- ENDIF -->> - <dt><label for="require_php">{L_PHP_VERSION}{L_COLON}</label></dt> + <dt><label>{L_PHP_VERSION}{L_COLON}</label></dt> <dd><p id="require_php">{META_REQUIRE_PHP}</p></dd> </dl> <!-- ENDIF --> @@ -69,25 +69,25 @@ <!-- BEGIN meta_authors --> <fieldset> <dl> - <dt><label for="meta_author_name">{L_AUTHOR_NAME}{L_COLON}</label></dt> - <dd><strong id="meta_author_name">{meta_authors.AUTHOR_NAME}</strong></dd> + <dt><label>{L_AUTHOR_NAME}{L_COLON}</label></dt> + <dd><strong>{meta_authors.AUTHOR_NAME}</strong></dd> </dl> <!-- IF meta_authors.AUTHOR_EMAIL --> <dl> - <dt><label for="meta_author_email">{L_AUTHOR_EMAIL}{L_COLON}</label></dt> - <dd><strong id="meta_author_email"><a href="mailto:{meta_authors.AUTHOR_EMAIL}">{meta_authors.AUTHOR_EMAIL}</a></strong></dd> + <dt><label>{L_AUTHOR_EMAIL}{L_COLON}</label></dt> + <dd><strong><a href="mailto:{meta_authors.AUTHOR_EMAIL}">{meta_authors.AUTHOR_EMAIL}</a></strong></dd> </dl> <!-- ENDIF --> <!-- IF meta_authors.AUTHOR_HOMEPAGE --> <dl> - <dt><label for="meta_author_url">{L_AUTHOR_HOMEPAGE}{L_COLON}</label></dt> - <dd><strong id="meta_author_url"><a href="{meta_authors.AUTHOR_HOMEPAGE}">{meta_authors.AUTHOR_HOMEPAGE}</a></strong></dd> + <dt><label>{L_AUTHOR_HOMEPAGE}{L_COLON}</label></dt> + <dd><strong><a href="{meta_authors.AUTHOR_HOMEPAGE}">{meta_authors.AUTHOR_HOMEPAGE}</a></strong></dd> </dl> <!-- ENDIF --> <!-- IF meta_authors.AUTHOR_ROLE --> <dl> - <dt><label for="author_role">{L_AUTHOR_ROLE}{L_COLON}</label></dt> - <dd><strong id="meta_author_role">{meta_authors.AUTHOR_ROLE}</strong></dd> + <dt><label>{L_AUTHOR_ROLE}{L_COLON}</label></dt> + <dd><strong>{meta_authors.AUTHOR_ROLE}</strong></dd> </dl> <!-- ENDIF --> </fieldset> diff --git a/phpBB/adm/style/acp_ext_disable.html b/phpBB/adm/style/acp_ext_disable.html index 4fa0893be7..d650544ff7 100644 --- a/phpBB/adm/style/acp_ext_disable.html +++ b/phpBB/adm/style/acp_ext_disable.html @@ -1,6 +1,6 @@ <!-- INCLUDE overall_header.html --> - <a name="maincontent"></a> + <a id="maincontent"></a> <h1>{L_EXTENSIONS_ADMIN}</h1> diff --git a/phpBB/adm/style/acp_ext_enable.html b/phpBB/adm/style/acp_ext_enable.html index 670904a2ce..42523f1f58 100644 --- a/phpBB/adm/style/acp_ext_enable.html +++ b/phpBB/adm/style/acp_ext_enable.html @@ -1,6 +1,6 @@ <!-- INCLUDE overall_header.html --> - <a name="maincontent"></a> + <a id="maincontent"></a> <h1>{L_EXTENSIONS_ADMIN}</h1> diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html index 09cf6a31f5..2fcc6eab31 100644 --- a/phpBB/adm/style/acp_ext_list.html +++ b/phpBB/adm/style/acp_ext_list.html @@ -1,6 +1,6 @@ <!-- INCLUDE overall_header.html --> -<a name="maincontent"></a> +<a id="maincontent"></a> <h1>{L_EXTENSIONS_ADMIN}</h1> diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index 04e6d9f12b..64bc3df09b 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -79,6 +79,12 @@ <dt><label for="field_hide">{L_HIDE_PROFILE_FIELD}{L_COLON}</label><br /><span>{L_HIDE_PROFILE_FIELD_EXPLAIN}</span></dt> <dd><input type="checkbox" class="radio" id="field_hide" name="field_hide" value="1"<!-- IF S_FIELD_HIDE --> checked="checked"<!-- ENDIF --> /></dd> </dl> + <dl> + <dt><label for="field_is_contact">{L_FIELD_IS_CONTACT}{L_COLON}</label><br /><span>{L_FIELD_IS_CONTACT_EXPLAIN}</span></dt> + <dd><input type="checkbox" class="radio" id="field_is_contact" name="field_is_contact" value="1"<!-- IF S_FIELD_CONTACT --> checked="checked"<!-- ENDIF --> /></dd> + <dd><input class="text medium" type="text" name="field_contact_desc" id="field_contact_desc" value="{FIELD_CONTACT_DESC}" /> <label for="field_contact_desc">{L_FIELD_CONTACT_DESC}</label></dd> + <dd><input class="text medium" type="text" name="field_contact_url" id="field_contact_url" value="{FIELD_CONTACT_URL}" /> <label for="field_contact_url">{L_FIELD_CONTACT_URL}</label></dd> + </dl> </fieldset> <!-- IF S_EDIT_MODE --> diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html index 2bbb03a834..b8c271355b 100644 --- a/phpBB/adm/style/acp_prune_users.html +++ b/phpBB/adm/style/acp_prune_users.html @@ -19,11 +19,7 @@ <dd><input type="text" id="email" name="email" /></dd> </dl> <dl> - <dt><label for="email">{L_WEBSITE}{L_COLON}</label></dt> - <dd><input type="text" id="website" name="website" /></dd> -</dl> -<dl> - <dt><label for="joined">{L_JOINED}{L_COLON}</label><br /><span>{L_JOINED_EXPLAIN}</span></dt> + <dt><label for="joined_after">{L_JOINED}{L_COLON}</label><br /><span>{L_JOINED_EXPLAIN}</span></dt> <dd> <strong>{L_AFTER}</strong> <input type="text" id="joined_after" name="joined_after" /> <br /> <br /> <strong>{L_BEFORE}</strong> <input type="text" id="joined_before" name="joined_before" /> @@ -44,7 +40,7 @@ <!-- IF S_GROUP_LIST --> <dl> <dt><label for="group_id">{L_GROUP}{L_COLON}</label><br /><span>{L_PRUNE_USERS_GROUP_EXPLAIN}</span></dt> - <dd><select name="group_id">{S_GROUP_LIST}</select></dd> + <dd><select id="group_id" name="group_id">{S_GROUP_LIST}</select></dd> </dl> <!-- ENDIF --> </fieldset> diff --git a/phpBB/adm/style/acp_users_profile.html b/phpBB/adm/style/acp_users_profile.html index f4a3c06e67..d32348ff1c 100644 --- a/phpBB/adm/style/acp_users_profile.html +++ b/phpBB/adm/style/acp_users_profile.html @@ -3,30 +3,10 @@ <fieldset> <legend>{L_USER_PROFILE}</legend> <dl> - <dt><label for="icq">{L_UCP_ICQ}{L_COLON}</label></dt> - <dd><input type="text" id="icq" name="icq" value="{ICQ}" /></dd> - </dl> - <dl> - <dt><label for="aim">{L_UCP_AIM}{L_COLON}</label></dt> - <dd><input type="text" id="aim" name="aim" value="{AIM}" /></dd> - </dl> - <dl> - <dt><label for="msn">{L_UCP_MSNM}{L_COLON}</label></dt> - <dd><input type="email" id="msn" name="msn" value="{MSN}" /></dd> - </dl> - <dl> - <dt><label for="yim">{L_UCP_YIM}{L_COLON}</label></dt> - <dd><input type="text" id="yim" name="yim" value="{YIM}" /></dd> - </dl> - <dl> <dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt> <dd><input type="email" id="jabber" name="jabber" value="{JABBER}" /></dd> </dl> <dl> - <dt><label for="website">{L_WEBSITE}{L_COLON}</label></dt> - <dd><input type="url" id="website" name="website" value="{WEBSITE}" /></dd> - </dl> - <dl> <dt><label for="birthday">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt> <dd>{L_DAY}{L_COLON} <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}{L_COLON} <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}{L_COLON} <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd> </dl> diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 3c7e378b2b..7ef74e4db0 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1572,7 +1572,7 @@ input.button1:focus, input.button2:focus, input.button3:focus { top: 150px; left: 0; right: 0; - max-width: 600px; + width: 620px; margin: 0 auto; z-index: 50; padding: 25px; @@ -1642,7 +1642,7 @@ input.button1:focus, input.button2:focus, input.button3:focus { @media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { .phpbb_alert { - max-width: none; + width: auto; margin: 0 25px; } } diff --git a/phpBB/adm/style/custom_profile_fields.html b/phpBB/adm/style/custom_profile_fields.html deleted file mode 100644 index 982356bfa7..0000000000 --- a/phpBB/adm/style/custom_profile_fields.html +++ /dev/null @@ -1,32 +0,0 @@ - -<!-- BEGIN dropdown --> - <select name="{dropdown.FIELD_IDENT}" id="{dropdown.FIELD_IDENT}"> - <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options --> - </select> -<!-- END dropdown --> - -<!-- BEGIN text --> - <textarea name="{text.FIELD_IDENT}" id="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea> -<!-- END text --> - -<!-- BEGIN string --> - <input type="text" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" /> -<!-- END string --> - -<!-- BEGIN bool --> - <!-- IF bool.FIELD_LENGTH eq 1 --> - <!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options --> - <!-- ELSE --> - <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}" value="1"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> /> - <!-- ENDIF --> -<!-- END bool --> - -<!-- BEGIN int --> - <input type="text" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" /> -<!-- END int --> - -<!-- BEGIN date --> - <span>{L_DAY}{L_COLON}</span> <select name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select> - <span>{L_MONTH}{L_COLON}</span> <select name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select> - <span>{L_YEAR}{L_COLON}</span> <select name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select> -<!-- END date --> diff --git a/phpBB/adm/style/profilefields/url.html b/phpBB/adm/style/profilefields/url.html new file mode 100644 index 0000000000..8dd3a90de1 --- /dev/null +++ b/phpBB/adm/style/profilefields/url.html @@ -0,0 +1,3 @@ +<!-- BEGIN url --> +<input type="url" class="inputbox autowidth" name="{url.FIELD_IDENT}" id="{url.FIELD_IDENT}" size="{url.FIELD_LENGTH}" maxlength="{url.FIELD_MAXLEN}" value="{url.FIELD_VALUE}" /> +<!-- END url --> diff --git a/phpBB/config/profilefields.yml b/phpBB/config/profilefields.yml index 5a861a4b56..d12a1f8a37 100644 --- a/phpBB/config/profilefields.yml +++ b/phpBB/config/profilefields.yml @@ -80,3 +80,12 @@ services: - @user tags: - { name: profilefield.type } + + profilefields.type.url: + class: phpbb\profilefields\type\type_url + arguments: + - @request + - @template + - @user + tags: + - { name: profilefield.type } diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php index d5eaed3bc7..27176c97d3 100644 --- a/phpBB/develop/benchmark.php +++ b/phpBB/develop/benchmark.php @@ -366,15 +366,10 @@ function make_user($username) $password = md5("benchpass"); $email = "nobody@localhost"; - $icq = "12345678"; - $website = "http://www.phpbb.com"; $signature = "$username: phpBB tester."; $signature_bbcode_uid = ""; $avatar_filename = ""; $viewemail = 0; - $aim = 0; - $yim = 0; - $msn = 0; $attachsig = 1; $allowsmilies = 1; $allowhtml = 1; @@ -419,8 +414,8 @@ function make_user($username) } - $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) - VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, "; + $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) + VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, "; $sql .= "1, '')"; diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index db7107b96d..57a47cbf84 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -78,6 +78,22 @@ acp_users_signature_editor_buttons_before * Since: 3.1.0-a3 * Purpose: Add content before BBCode posting buttons in the ACP user signature +forumlist_body_category_header_after +==== +* Locations: + + styles/prosilver/template/forumlist_body.html + + styles/subsilver2/template/forumlist_body.html +* Since: 3.1.0-a4 +* Purpose: Add content after the header of the category on the forum list. + +forumlist_body_category_header_before +==== +* Locations: + + styles/prosilver/template/forumlist_body.html + + styles/subsilver2/template/forumlist_body.html +* Since: 3.1.0-a4 +* Purpose: Add content before the header of the category on the forum list. + forumlist_body_last_post_title_prepend ==== * Locations: @@ -86,6 +102,22 @@ forumlist_body_last_post_title_prepend * Since: 3.1.0-a1 * Purpose: Add content before the post title of the latest post in a forum on the forum list. +forumlist_body_subforums_after +==== +* Locations: + + styles/prosilver/template/forumlist_body.html + + styles/subsilver2/template/forumlist_body.html +* Since: 3.1.0-a4 +* Purpose: Add content after the list of subforums (if any) for each forum on the forum list. + +forumlist_body_subforums_before +==== +* Locations: + + styles/prosilver/template/forumlist_body.html + + styles/subsilver2/template/forumlist_body.html +* Since: 3.1.0-a4 +* Purpose: Add content before the list of subforums (if any) for each forum on the forum list. + index_body_linklist_after === * Locations: diff --git a/phpBB/docs/sphinx.sample.conf b/phpBB/docs/sphinx.sample.conf index 620ec25761..0a210ecd1a 100644 --- a/phpBB/docs/sphinx.sample.conf +++ b/phpBB/docs/sphinx.sample.conf @@ -38,7 +38,7 @@ source source_phpbb_{SPHINX_ID}_main sql_attr_bool = deleted sql_attr_timestamp = post_time sql_attr_timestamp = topic_last_post_time - sql_attr_str2ordinal = post_subject + sql_attr_string = post_subject } source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main { diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 3a5298fb58..4d316d84e4 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -386,6 +386,9 @@ class acp_profile 'field_show_on_pm' => 0, 'field_show_on_vt' => 0, 'field_show_on_ml' => 0, + 'field_is_contact' => 0, + 'field_contact_desc'=> '', + 'field_contact_url' => '', 'lang_name' => utf8_normalize_nfc(request_var('field_ident', '', true)), 'lang_explain' => '', 'lang_default_value'=> '') @@ -396,7 +399,7 @@ class acp_profile // $exclude contains the data we gather in each step $exclude = array( - 1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_pm', 'field_show_on_vt', 'field_show_on_ml', 'field_required', 'field_show_novalue', 'field_hide', 'field_show_profile', 'field_no_view'), + 1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_pm', 'field_show_on_vt', 'field_show_on_ml', 'field_required', 'field_show_novalue', 'field_hide', 'field_show_profile', 'field_no_view', 'field_is_contact', 'field_contact_desc', 'field_contact_url'), 2 => array('field_length', 'field_maxlen', 'field_minlen', 'field_validation', 'field_novalue', 'field_default_value'), 3 => array('l_lang_name', 'l_lang_explain', 'l_lang_default_value', 'l_lang_options') ); @@ -411,21 +414,24 @@ class acp_profile 'field_show_on_ml', 'field_show_profile', 'field_hide', + 'field_is_contact', ); $options = $profile_field->prepare_options_form($exclude, $visibility_ary); $cp->vars['field_ident'] = ($action == 'create' && $step == 1) ? utf8_clean_string(request_var('field_ident', $field_row['field_ident'], true)) : request_var('field_ident', $field_row['field_ident']); - $cp->vars['lang_name'] = utf8_normalize_nfc(request_var('lang_name', $field_row['lang_name'], true)); - $cp->vars['lang_explain'] = utf8_normalize_nfc(request_var('lang_explain', $field_row['lang_explain'], true)); - $cp->vars['lang_default_value'] = utf8_normalize_nfc(request_var('lang_default_value', $field_row['lang_default_value'], true)); + $cp->vars['lang_name'] = $request->variable('lang_name', $field_row['lang_name'], true); + $cp->vars['lang_explain'] = $request->variable('lang_explain', $field_row['lang_explain'], true); + $cp->vars['lang_default_value'] = $request->variable('lang_default_value', $field_row['lang_default_value'], true); + $cp->vars['field_contact_desc'] = $request->variable('field_contact_desc', $field_row['field_contact_desc'], true); + $cp->vars['field_contact_url'] = $request->variable('field_contact_url', $field_row['field_contact_url'], true); foreach ($visibility_ary as $val) { - $cp->vars[$val] = ($submit || $save) ? request_var($val, 0) : $field_row[$val]; + $cp->vars[$val] = ($submit || $save) ? $request->variable($val, 0) : $field_row[$val]; } - $cp->vars['field_no_view'] = request_var('field_no_view', (int) $field_row['field_no_view']); + $cp->vars['field_no_view'] = $request->variable('field_no_view', (int) $field_row['field_no_view']); // If the user has submitted a form with options (i.e. dropdown field) if ($options) @@ -626,6 +632,9 @@ class acp_profile 'S_FIELD_HIDE' => ($cp->vars['field_hide']) ? true : false, 'S_SHOW_PROFILE' => ($cp->vars['field_show_profile']) ? true : false, 'S_FIELD_NO_VIEW' => ($cp->vars['field_no_view']) ? true : false, + 'S_FIELD_CONTACT' => $cp->vars['field_is_contact'], + 'FIELD_CONTACT_DESC'=> $cp->vars['field_contact_desc'], + 'FIELD_CONTACT_URL' => $cp->vars['field_contact_url'], 'L_LANG_SPECIFIC' => sprintf($user->lang['LANG_SPECIFIC_OPTIONS'], $config['default_lang']), 'FIELD_TYPE' => $profile_field->get_name(), @@ -886,7 +895,10 @@ class acp_profile 'field_show_on_ml' => $cp->vars['field_show_on_ml'], 'field_hide' => $cp->vars['field_hide'], 'field_show_profile' => $cp->vars['field_show_profile'], - 'field_no_view' => $cp->vars['field_no_view'] + 'field_no_view' => $cp->vars['field_no_view'], + 'field_is_contact' => $cp->vars['field_is_contact'], + 'field_contact_desc' => $cp->vars['field_contact_desc'], + 'field_contact_url' => $cp->vars['field_contact_url'], ); if ($action == 'create') diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php index 5d9080b55b..0f9ca9bab3 100644 --- a/phpBB/includes/acp/acp_prune.php +++ b/phpBB/includes/acp/acp_prune.php @@ -388,7 +388,6 @@ class acp_prune { $username = request_var('username', '', true); $email = request_var('email', ''); - $website = request_var('website', ''); $active_select = request_var('active_select', 'lt'); $count_select = request_var('count_select', 'eq'); @@ -438,7 +437,6 @@ class acp_prune $where_sql = ''; $where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : ''; $where_sql .= ($email) ? ' AND user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : ''; - $where_sql .= ($website) ? ' AND user_website ' . $db->sql_like_expression(str_replace('*', $db->any_char, $website)) . ' ' : ''; $where_sql .= $joined_sql; $where_sql .= ($count) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : ''; diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 87582dcedb..603cb17941 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1360,12 +1360,7 @@ class acp_users $user_row['iso_lang_id'] = $row['lang_id']; $data = array( - 'icq' => request_var('icq', $user_row['user_icq']), - 'aim' => request_var('aim', $user_row['user_aim']), - 'msn' => request_var('msn', $user_row['user_msnm']), - 'yim' => request_var('yim', $user_row['user_yim']), 'jabber' => utf8_normalize_nfc(request_var('jabber', $user_row['user_jabber'], true)), - 'website' => request_var('website', $user_row['user_website']), 'bday_day' => 0, 'bday_month' => 0, 'bday_year' => 0, @@ -1385,18 +1380,9 @@ class acp_users if ($submit) { $error = validate_data($data, array( - 'icq' => array( - array('string', true, 3, 15), - array('match', true, '#^[0-9]+$#i')), - 'aim' => array('string', true, 3, 255), - 'msn' => array('string', true, 5, 255), 'jabber' => array( array('string', true, 5, 255), array('jabber')), - 'yim' => array('string', true, 5, 255), - 'website' => array( - array('string', true, 12, 255), - array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), 'bday_day' => array('num', true, 1, 31), 'bday_month' => array('num', true, 1, 12), 'bday_year' => array('num', true, 1901, gmdate('Y', time())), @@ -1418,12 +1404,7 @@ class acp_users if (!sizeof($error)) { $sql_ary = array( - 'user_icq' => $data['icq'], - 'user_aim' => $data['aim'], - 'user_msnm' => $data['msn'], - 'user_yim' => $data['yim'], 'user_jabber' => $data['jabber'], - 'user_website' => $data['website'], 'user_birthday' => $data['user_birthday'], ); @@ -1467,13 +1448,7 @@ class acp_users unset($now); $template->assign_vars(array( - 'ICQ' => $data['icq'], - 'YIM' => $data['yim'], - 'AIM' => $data['aim'], - 'MSN' => $data['msn'], 'JABBER' => $data['jabber'], - 'WEBSITE' => $data['website'], - 'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options, 'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options, 'S_BIRTHDAY_YEAR_OPTIONS' => $s_birthday_year_options, diff --git a/phpBB/includes/db/schema_data.php b/phpBB/includes/db/schema_data.php index 0447895433..1a08149f66 100644 --- a/phpBB/includes/db/schema_data.php +++ b/phpBB/includes/db/schema_data.php @@ -777,6 +777,9 @@ $schema_data['phpbb_profile_fields'] = array( 'field_no_view' => array('BOOL', 0), 'field_active' => array('BOOL', 0), 'field_order' => array('UINT', 0), + 'field_is_contact' => array('BOOL', 0), + 'field_contact_desc' => array('VCHAR', ''), + 'field_contact_url' => array('VCHAR', ''), ), 'PRIMARY_KEY' => 'field_id', 'KEYS' => array( @@ -791,6 +794,11 @@ $schema_data['phpbb_profile_fields_data'] = array( 'pf_phpbb_location' => array('VCHAR', ''), 'pf_phpbb_interests' => array('TEXT_UNI', ''), 'pf_phpbb_occupation' => array('TEXT_UNI', ''), + 'pf_phpbb_icq' => array('VCHAR', ''), + 'pf_phpbb_aol' => array('VCHAR', ''), + 'pf_phpbb_wlm' => array('VCHAR', ''), + 'pf_phpbb_yahoo' => array('VCHAR', ''), + 'pf_phpbb_website' => array('VCHAR', ''), ), 'PRIMARY_KEY' => 'user_id', ); @@ -1169,12 +1177,7 @@ $schema_data['phpbb_users'] = array( 'user_sig' => array('MTEXT_UNI', ''), 'user_sig_bbcode_uid' => array('VCHAR:8', ''), 'user_sig_bbcode_bitfield' => array('VCHAR:255', ''), - 'user_icq' => array('VCHAR:15', ''), - 'user_aim' => array('VCHAR_UNI', ''), - 'user_yim' => array('VCHAR_UNI', ''), - 'user_msnm' => array('VCHAR_UNI', ''), 'user_jabber' => array('VCHAR_UNI', ''), - 'user_website' => array('VCHAR_UNI:200', ''), 'user_form_salt' => array('VCHAR_UNI:32', ''), 'user_new' => array('BOOL', 1), 'user_reminded' => array('TINT:4', 0), diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 689a682de3..03cd235f86 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -368,41 +368,6 @@ function still_on_time($extra_time = 15) } /** -* Hash the password -* -* @deprecated 3.1.0-a2 (To be removed: 3.3.0) -* -* @param string $password Password to be hashed -* -* @return string|bool Password hash or false if something went wrong during hashing -*/ -function phpbb_hash($password) -{ - global $phpbb_container; - - $passwords_manager = $phpbb_container->get('passwords.manager'); - return $passwords_manager->hash($password); -} - -/** -* Check for correct password -* -* @deprecated 3.1.0-a2 (To be removed: 3.3.0) -* -* @param string $password The password in plain text -* @param string $hash The stored password hash -* -* @return bool Returns true if the password is correct, false if not. -*/ -function phpbb_check_hash($password, $hash) -{ - global $phpbb_container; - - $passwords_manager = $phpbb_container->get('passwords.manager'); - return $passwords_manager->check($password, $hash); -} - -/** * Hashes an email address to a big integer * * @param string $email Email address @@ -885,46 +850,6 @@ else } } -/** -* Eliminates useless . and .. components from specified path. -* -* Deprecated, use filesystem class instead -* -* @param string $path Path to clean -* @return string Cleaned path -* -* @deprecated -*/ -function phpbb_clean_path($path) -{ - global $phpbb_path_helper, $phpbb_container; - - if (!$phpbb_path_helper && $phpbb_container) - { - $phpbb_path_helper = $phpbb_container->get('path_helper'); - } - else if (!$phpbb_path_helper) - { - // The container is not yet loaded, use a new instance - if (!class_exists('\phpbb\path_helper')) - { - global $phpbb_root_path, $phpEx; - require($phpbb_root_path . 'phpbb/path_helper.' . $phpEx); - } - - $phpbb_path_helper = new phpbb\path_helper( - new phpbb\symfony_request( - new phpbb\request\request() - ), - new phpbb\filesystem(), - $phpbb_root_path, - $phpEx - ); - } - - return $phpbb_path_helper->clean_path($path); -} - // functions used for building option fields /** diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php index 2197815087..024c656267 100644 --- a/phpBB/includes/functions_compatibility.php +++ b/phpBB/includes/functions_compatibility.php @@ -48,3 +48,78 @@ function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $ return phpbb_get_avatar($row, $alt, $ignore_config); } + +/** +* Hash the password +* +* @deprecated 3.1.0-a2 (To be removed: 3.3.0) +* +* @param string $password Password to be hashed +* +* @return string|bool Password hash or false if something went wrong during hashing +*/ +function phpbb_hash($password) +{ + global $phpbb_container; + + $passwords_manager = $phpbb_container->get('passwords.manager'); + return $passwords_manager->hash($password); +} + +/** +* Check for correct password +* +* @deprecated 3.1.0-a2 (To be removed: 3.3.0) +* +* @param string $password The password in plain text +* @param string $hash The stored password hash +* +* @return bool Returns true if the password is correct, false if not. +*/ +function phpbb_check_hash($password, $hash) +{ + global $phpbb_container; + + $passwords_manager = $phpbb_container->get('passwords.manager'); + return $passwords_manager->check($password, $hash); +} + +/** +* Eliminates useless . and .. components from specified path. +* +* Deprecated, use filesystem class instead +* +* @param string $path Path to clean +* @return string Cleaned path +* +* @deprecated +*/ +function phpbb_clean_path($path) +{ + global $phpbb_path_helper, $phpbb_container; + + if (!$phpbb_path_helper && $phpbb_container) + { + $phpbb_path_helper = $phpbb_container->get('path_helper'); + } + else if (!$phpbb_path_helper) + { + // The container is not yet loaded, use a new instance + if (!class_exists('\phpbb\path_helper')) + { + global $phpbb_root_path, $phpEx; + require($phpbb_root_path . 'phpbb/path_helper.' . $phpEx); + } + + $phpbb_path_helper = new phpbb\path_helper( + new phpbb\symfony_request( + new phpbb\request\request() + ), + new phpbb\filesystem(), + $phpbb_root_path, + $phpEx + ); + } + + return $phpbb_path_helper->clean_path($path); +} diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index e663ac90c5..05313e849d 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -962,6 +962,7 @@ function display_custom_bbcodes() 'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'", 'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2), 'BBCODE_TAG' => $row['bbcode_tag'], + 'BBCODE_TAG_CLEAN' => str_replace('=', '-', $row['bbcode_tag']), 'BBCODE_HELPLINE' => $row['bbcode_helpline'], 'A_BBCODE_HELPLINE' => str_replace(array('&', '"', "'", '<', '>'), array('&', '"', "\'", '<', '>'), $row['bbcode_helpline']), ); diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index a2a79e032f..17d67b4a23 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1561,7 +1561,7 @@ function get_folder_status($folder_id, $folder) 'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? round(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0, ); - $return['message'] = $user->lang('FOLDER_STATUS_MSG', (int) $return['max'], $return['cur'], $return['percent']); + $return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), $return['cur'], $return['percent']); return $return; } diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php index bf7334b307..26ce6ed28f 100644 --- a/phpBB/includes/ucp/ucp_pm_options.php +++ b/phpBB/includes/ucp/ucp_pm_options.php @@ -230,7 +230,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit // Something went wrong, only partially moved? if ($num_moved != $folder_row['pm_count']) { - trigger_error($user->lang('MOVE_PM_ERROR', (int) $folder_row['pm_count'], $num_moved)); + trigger_error($user->lang('MOVE_PM_ERROR', $user->lang('MESSAGES_COUNT', (int) $folder_row['pm_count']), $num_moved)); } break; @@ -421,7 +421,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit $folder[PRIVMSGS_INBOX] = array( 'folder_name' => $user->lang['PM_INBOX'], - 'message_status' => $user->lang('FOLDER_MESSAGE_STATUS', (int) $user->data['message_limit'], $num_messages), + 'message_status' => $user->lang('FOLDER_MESSAGE_STATUS', $user->lang('MESSAGES_COUNT', (int) $user->data['message_limit']), $num_messages), ); $sql = 'SELECT folder_id, folder_name, pm_count @@ -435,7 +435,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit $num_user_folder++; $folder[$row['folder_id']] = array( 'folder_name' => $row['folder_name'], - 'message_status' => $user->lang('FOLDER_MESSAGE_STATUS', (int) $user->data['message_limit'], $row['pm_count']), + 'message_status' => $user->lang('FOLDER_MESSAGE_STATUS', $user->lang('MESSAGES_COUNT', (int) $user->data['message_limit']), (int) $row['pm_count']), ); } $db->sql_freeresult($result); diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index e513b8ade2..b68389cba7 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -63,7 +63,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) { $cp = $phpbb_container->get('profilefields.manager'); - $profile_fields = $cp->generate_profile_fields_template('grab', $author_id); + $profile_fields = $cp->grab_profile_fields_data($author_id); } // Assign TO/BCC Addresses to template @@ -173,7 +173,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) if (isset($profile_fields[$author_id])) { - $cp_row = $cp->generate_profile_fields_template('show', false, $profile_fields[$author_id]); + $cp_row = $cp->generate_profile_fields_template_data($profile_fields[$author_id]); } } @@ -209,11 +209,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'MESSAGE_ID' => $message_row['msg_id'], 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $author_id) : '', - 'U_WWW' => (!empty($user_info['user_website'])) ? $user_info['user_website'] : '', - 'U_ICQ' => ($user_info['user_icq']) ? 'http://www.icq.com/people/' . urlencode($user_info['user_icq']) . '/' : '', - 'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $author_id) : '', - 'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($user_info['user_yim']) . '&.src=pg' : '', - 'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $author_id) : '', 'U_JABBER' => ($user_info['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $author_id) : '', 'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '', diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 8def48b1b4..3772d56e28 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -264,12 +264,7 @@ class ucp_profile $cp_data = $cp_error = array(); $data = array( - 'icq' => request_var('icq', $user->data['user_icq']), - 'aim' => request_var('aim', $user->data['user_aim']), - 'msn' => request_var('msn', $user->data['user_msnm']), - 'yim' => request_var('yim', $user->data['user_yim']), 'jabber' => utf8_normalize_nfc(request_var('jabber', $user->data['user_jabber'], true)), - 'website' => request_var('website', $user->data['user_website']), ); if ($config['allow_birthdays']) @@ -292,18 +287,9 @@ class ucp_profile if ($submit) { $validate_array = array( - 'icq' => array( - array('string', true, 3, 15), - array('match', true, '#^[0-9]+$#i')), - 'aim' => array('string', true, 3, 255), - 'msn' => array('string', true, 5, 255), 'jabber' => array( array('string', true, 5, 255), array('jabber')), - 'yim' => array('string', true, 5, 255), - 'website' => array( - array('string', true, 12, 255), - array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), ); if ($config['allow_birthdays']) @@ -343,12 +329,7 @@ class ucp_profile } $sql_ary = array( - 'user_icq' => $data['icq'], - 'user_aim' => $data['aim'], - 'user_msnm' => $data['msn'], - 'user_yim' => $data['yim'], 'user_jabber' => $data['jabber'], - 'user_website' => $data['website'], 'user_notify_type' => $data['notify'], ); @@ -410,13 +391,7 @@ class ucp_profile $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', - - 'ICQ' => $data['icq'], - 'YIM' => $data['yim'], - 'AIM' => $data['aim'], - 'MSN' => $data['msn'], 'JABBER' => $data['jabber'], - 'WEBSITE' => $data['website'], )); // Get additional profile fields and assign them to the template block var 'profile_fields' diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 94f685fa2f..034b590331 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -906,12 +906,7 @@ if (!$get_info) array('user_inactive_reason', '', 'phpbb_inactive_reason'), array('user_inactive_time', '', 'phpbb_inactive_time'), - array('user_website', 'users.user_website', 'validate_website'), array('user_jabber', '', ''), - array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')), - array('user_yim', 'users.user_yim', array('function1' => 'phpbb_set_encoding')), - array('user_aim', 'users.user_aim', array('function1' => 'phpbb_set_encoding')), - array('user_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')), array('user_rank', 'users.user_rank', 'intval'), array('user_permissions', '', ''), @@ -963,6 +958,11 @@ if (!$get_info) array('pf_phpbb_occupation', 'users.user_occ', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_location', 'users.user_from', array('function1' => 'phpbb_set_encoding')), + array('pf_phpbb_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')), + array('pf_phpbb_wlm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')), + array('pf_phpbb_yahoo', 'users.user_yim', array('function1' => 'phpbb_set_encoding')), + array('pf_phpbb_aol', 'users.user_aim', array('function1' => 'phpbb_set_encoding')), + array('pf_phpbb_website', 'users.user_website', 'validate_website'), 'where' => 'users.user_id <> -1', ), diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 263ebb4490..3782fc66ff 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -926,7 +926,10 @@ CREATE TABLE phpbb_profile_fields ( field_hide INTEGER DEFAULT 0 NOT NULL, field_no_view INTEGER DEFAULT 0 NOT NULL, field_active INTEGER DEFAULT 0 NOT NULL, - field_order INTEGER DEFAULT 0 NOT NULL + field_order INTEGER DEFAULT 0 NOT NULL, + field_is_contact INTEGER DEFAULT 0 NOT NULL, + field_contact_desc VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + field_contact_url VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_profile_fields ADD PRIMARY KEY (field_id);; @@ -950,7 +953,12 @@ CREATE TABLE phpbb_profile_fields_data ( user_id INTEGER DEFAULT 0 NOT NULL, pf_phpbb_location VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, pf_phpbb_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - pf_phpbb_occupation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL + pf_phpbb_occupation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, + pf_phpbb_icq VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + pf_phpbb_aol VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + pf_phpbb_wlm VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + pf_phpbb_yahoo VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + pf_phpbb_website VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);; @@ -1422,12 +1430,7 @@ CREATE TABLE phpbb_users ( user_sig BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, user_sig_bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, user_sig_bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_icq VARCHAR(15) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_aim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_yim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_new INTEGER DEFAULT 1 NOT NULL, user_reminded INTEGER DEFAULT 0 NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 11309d67a5..66e64cf651 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1132,7 +1132,10 @@ CREATE TABLE [phpbb_profile_fields] ( [field_hide] [int] DEFAULT (0) NOT NULL , [field_no_view] [int] DEFAULT (0) NOT NULL , [field_active] [int] DEFAULT (0) NOT NULL , - [field_order] [int] DEFAULT (0) NOT NULL + [field_order] [int] DEFAULT (0) NOT NULL , + [field_is_contact] [int] DEFAULT (0) NOT NULL , + [field_contact_desc] [varchar] (255) DEFAULT ('') NOT NULL , + [field_contact_url] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO @@ -1157,7 +1160,12 @@ CREATE TABLE [phpbb_profile_fields_data] ( [user_id] [int] DEFAULT (0) NOT NULL , [pf_phpbb_location] [varchar] (255) DEFAULT ('') NOT NULL , [pf_phpbb_interests] [varchar] (4000) DEFAULT ('') NOT NULL , - [pf_phpbb_occupation] [varchar] (4000) DEFAULT ('') NOT NULL + [pf_phpbb_occupation] [varchar] (4000) DEFAULT ('') NOT NULL , + [pf_phpbb_icq] [varchar] (255) DEFAULT ('') NOT NULL , + [pf_phpbb_aol] [varchar] (255) DEFAULT ('') NOT NULL , + [pf_phpbb_wlm] [varchar] (255) DEFAULT ('') NOT NULL , + [pf_phpbb_yahoo] [varchar] (255) DEFAULT ('') NOT NULL , + [pf_phpbb_website] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO @@ -1738,12 +1746,7 @@ CREATE TABLE [phpbb_users] ( [user_sig] [text] DEFAULT ('') NOT NULL , [user_sig_bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , [user_sig_bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , - [user_icq] [varchar] (15) DEFAULT ('') NOT NULL , - [user_aim] [varchar] (255) DEFAULT ('') NOT NULL , - [user_yim] [varchar] (255) DEFAULT ('') NOT NULL , - [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL , [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL , - [user_website] [varchar] (200) DEFAULT ('') NOT NULL , [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL , [user_new] [int] DEFAULT (1) NOT NULL , [user_reminded] [int] DEFAULT (0) NOT NULL , diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 16c26fac4a..66c08156d0 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -664,6 +664,9 @@ CREATE TABLE phpbb_profile_fields ( field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + field_is_contact tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_contact_desc varbinary(255) DEFAULT '' NOT NULL, + field_contact_url varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id), KEY fld_type (field_type), KEY fld_ordr (field_order) @@ -676,6 +679,11 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_location varbinary(255) DEFAULT '' NOT NULL, pf_phpbb_interests blob NOT NULL, pf_phpbb_occupation blob NOT NULL, + pf_phpbb_icq varbinary(255) DEFAULT '' NOT NULL, + pf_phpbb_aol varbinary(255) DEFAULT '' NOT NULL, + pf_phpbb_wlm varbinary(255) DEFAULT '' NOT NULL, + pf_phpbb_yahoo varbinary(255) DEFAULT '' NOT NULL, + pf_phpbb_website varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ); @@ -1031,12 +1039,7 @@ CREATE TABLE phpbb_users ( user_sig mediumblob NOT NULL, user_sig_bbcode_uid varbinary(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, - user_icq varbinary(15) DEFAULT '' NOT NULL, - user_aim blob NOT NULL, - user_yim blob NOT NULL, - user_msnm blob NOT NULL, user_jabber blob NOT NULL, - user_website blob NOT NULL, user_form_salt varbinary(96) DEFAULT '' NOT NULL, user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_reminded tinyint(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index b345e1f474..8119d4cd93 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -664,6 +664,9 @@ CREATE TABLE phpbb_profile_fields ( field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + field_is_contact tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_contact_desc varchar(255) DEFAULT '' NOT NULL, + field_contact_url varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id), KEY fld_type (field_type), KEY fld_ordr (field_order) @@ -676,6 +679,11 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_location varchar(255) DEFAULT '' NOT NULL, pf_phpbb_interests text NOT NULL, pf_phpbb_occupation text NOT NULL, + pf_phpbb_icq varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_aol varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_wlm varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_yahoo varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_website varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -1031,12 +1039,7 @@ CREATE TABLE phpbb_users ( user_sig mediumtext NOT NULL, user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - user_icq varchar(15) DEFAULT '' NOT NULL, - user_aim varchar(255) DEFAULT '' NOT NULL, - user_yim varchar(255) DEFAULT '' NOT NULL, - user_msnm varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, - user_website varchar(200) DEFAULT '' NOT NULL, user_form_salt varchar(32) DEFAULT '' NOT NULL, user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_reminded tinyint(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index b819ba2c59..b1f39da7bc 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1236,6 +1236,9 @@ CREATE TABLE phpbb_profile_fields ( field_no_view number(1) DEFAULT '0' NOT NULL, field_active number(1) DEFAULT '0' NOT NULL, field_order number(8) DEFAULT '0' NOT NULL, + field_is_contact number(1) DEFAULT '0' NOT NULL, + field_contact_desc varchar2(255) DEFAULT '' , + field_contact_url varchar2(255) DEFAULT '' , CONSTRAINT pk_phpbb_profile_fields PRIMARY KEY (field_id) ) / @@ -1269,6 +1272,11 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_location varchar2(255) DEFAULT '' , pf_phpbb_interests clob DEFAULT '' , pf_phpbb_occupation clob DEFAULT '' , + pf_phpbb_icq varchar2(255) DEFAULT '' , + pf_phpbb_aol varchar2(255) DEFAULT '' , + pf_phpbb_wlm varchar2(255) DEFAULT '' , + pf_phpbb_yahoo varchar2(255) DEFAULT '' , + pf_phpbb_website varchar2(255) DEFAULT '' , CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id) ) / @@ -1855,12 +1863,7 @@ CREATE TABLE phpbb_users ( user_sig clob DEFAULT '' , user_sig_bbcode_uid varchar2(8) DEFAULT '' , user_sig_bbcode_bitfield varchar2(255) DEFAULT '' , - user_icq varchar2(15) DEFAULT '' , - user_aim varchar2(765) DEFAULT '' , - user_yim varchar2(765) DEFAULT '' , - user_msnm varchar2(765) DEFAULT '' , user_jabber varchar2(765) DEFAULT '' , - user_website varchar2(600) DEFAULT '' , user_form_salt varchar2(96) DEFAULT '' , user_new number(1) DEFAULT '1' NOT NULL, user_reminded number(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index be8af3c873..36eaddbb78 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -872,6 +872,9 @@ CREATE TABLE phpbb_profile_fields ( field_no_view INT2 DEFAULT '0' NOT NULL CHECK (field_no_view >= 0), field_active INT2 DEFAULT '0' NOT NULL CHECK (field_active >= 0), field_order INT4 DEFAULT '0' NOT NULL CHECK (field_order >= 0), + field_is_contact INT2 DEFAULT '0' NOT NULL CHECK (field_is_contact >= 0), + field_contact_desc varchar(255) DEFAULT '' NOT NULL, + field_contact_url varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id) ); @@ -886,6 +889,11 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_location varchar(255) DEFAULT '' NOT NULL, pf_phpbb_interests varchar(4000) DEFAULT '' NOT NULL, pf_phpbb_occupation varchar(4000) DEFAULT '' NOT NULL, + pf_phpbb_icq varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_aol varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_wlm varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_yahoo varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_website varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ); @@ -1303,12 +1311,7 @@ CREATE TABLE phpbb_users ( user_sig TEXT DEFAULT '' NOT NULL, user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - user_icq varchar(15) DEFAULT '' NOT NULL, - user_aim varchar(255) DEFAULT '' NOT NULL, - user_yim varchar(255) DEFAULT '' NOT NULL, - user_msnm varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, - user_website varchar(200) DEFAULT '' NOT NULL, user_form_salt varchar(32) DEFAULT '' NOT NULL, user_new INT2 DEFAULT '1' NOT NULL CHECK (user_new >= 0), user_reminded INT2 DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 2aff81a6a5..33470eca20 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -171,10 +171,10 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_load', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_search_load', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_anon_lastread', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_birthdays', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_memberlist', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_pm', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_memberlist', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofile', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'); @@ -467,10 +467,10 @@ INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48); # -- Users / Anonymous user -INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', 0); +INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_jabber, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', 0); # -- username: Admin password: admin (change this or remove it once everything is working!) -INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', ''); +INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_jabber, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', ''); # -- Groups INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5); @@ -788,9 +788,14 @@ INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm'); # Add default profile fields -INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_location', 'profilefields.type.string', 'phpbb_location', '20', '2', '100', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1); -INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2); -INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 3); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_location', 'profilefields.type.string', 'phpbb_location', '20', '2', '100', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, '', ''); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_website', 'profilefields.type.url', 'phpbb_website', '40', '12', '255', '', '', '', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 2, 1, 'VISIT_WEBSITE', '%s'); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, '', ''); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, '', ''); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_aol', 'profilefields.type.string', 'phpbb_aol', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 5, 1, '', ''); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_icq', 'profilefields.type.string', 'phpbb_icq', '20', '3', '15', '', '', '[0-9]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 6, 1, 'SEND_ICQ_MESSAGE', 'https://www.icq.com/people/%s/'); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_wlm', 'profilefields.type.string', 'phpbb_wlm', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 7, 1, '', ''); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_yahoo', 'profilefields.type.string', 'phpbb_yahoo', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 8, 1, 'SEND_YIM_MESSAGE', 'http://edit.yahoo.com/config/send_webmesg?.target=%s&.src=pg'); # User Notification Options (for first user) INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, ''); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 717b242a57..5d8ae220f4 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -644,7 +644,10 @@ CREATE TABLE phpbb_profile_fields ( field_hide INTEGER UNSIGNED NOT NULL DEFAULT '0', field_no_view INTEGER UNSIGNED NOT NULL DEFAULT '0', field_active INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_order INTEGER UNSIGNED NOT NULL DEFAULT '0' + field_order INTEGER UNSIGNED NOT NULL DEFAULT '0', + field_is_contact INTEGER UNSIGNED NOT NULL DEFAULT '0', + field_contact_desc varchar(255) NOT NULL DEFAULT '', + field_contact_url varchar(255) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type); @@ -656,6 +659,11 @@ CREATE TABLE phpbb_profile_fields_data ( pf_phpbb_location varchar(255) NOT NULL DEFAULT '', pf_phpbb_interests text(65535) NOT NULL DEFAULT '', pf_phpbb_occupation text(65535) NOT NULL DEFAULT '', + pf_phpbb_icq varchar(255) NOT NULL DEFAULT '', + pf_phpbb_aol varchar(255) NOT NULL DEFAULT '', + pf_phpbb_wlm varchar(255) NOT NULL DEFAULT '', + pf_phpbb_yahoo varchar(255) NOT NULL DEFAULT '', + pf_phpbb_website varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (user_id) ); @@ -1002,12 +1010,7 @@ CREATE TABLE phpbb_users ( user_sig mediumtext(16777215) NOT NULL DEFAULT '', user_sig_bbcode_uid varchar(8) NOT NULL DEFAULT '', user_sig_bbcode_bitfield varchar(255) NOT NULL DEFAULT '', - user_icq varchar(15) NOT NULL DEFAULT '', - user_aim varchar(255) NOT NULL DEFAULT '', - user_yim varchar(255) NOT NULL DEFAULT '', - user_msnm varchar(255) NOT NULL DEFAULT '', user_jabber varchar(255) NOT NULL DEFAULT '', - user_website varchar(200) NOT NULL DEFAULT '', user_form_salt varchar(32) NOT NULL DEFAULT '', user_new INTEGER UNSIGNED NOT NULL DEFAULT '1', user_reminded tinyint(4) NOT NULL DEFAULT '0', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 0117d85433..0e867c64a9 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -61,7 +61,7 @@ $lang = array_merge($lang, array( 'ACP_CAT_CUSTOMISE' => 'Customise', 'ACP_CAT_DATABASE' => 'Database', - 'ACP_CAT_DOT_MODS' => '.MODs', + 'ACP_CAT_DOT_MODS' => 'Extensions', 'ACP_CAT_FORUMS' => 'Forums', 'ACP_CAT_GENERAL' => 'General', 'ACP_CAT_MAINTENANCE' => 'Maintenance', diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php index 726a9bac82..dc42693ca7 100644 --- a/phpBB/language/en/acp/profile.php +++ b/phpBB/language/en/acp/profile.php @@ -39,6 +39,7 @@ $lang = array_merge($lang, array( 'ADDED_PROFILE_FIELD' => 'Successfully added custom profile field.', 'ALPHA_ONLY' => 'Alphanumeric only', 'ALPHA_SPACERS' => 'Alphanumeric and spacers', + 'ALPHA_UNDERSCORE' => 'Alphanumeric and underscores', 'ALWAYS_TODAY' => 'Always the current date', 'BOOL_ENTRIES_EXPLAIN' => 'Enter your options now', @@ -82,6 +83,8 @@ $lang = array_merge($lang, array( 'EVERYTHING_OK' => 'Everything OK', 'FIELD_BOOL' => 'Boolean (Yes/No)', + 'FIELD_CONTACT_DESC' => 'Contact description', + 'FIELD_CONTACT_URL' => 'Contact link', 'FIELD_DATE' => 'Date', 'FIELD_DESCRIPTION' => 'Field description', 'FIELD_DESCRIPTION_EXPLAIN' => 'The explanation for this field presented to the user.', @@ -90,12 +93,15 @@ $lang = array_merge($lang, array( 'FIELD_IDENT_ALREADY_EXIST' => 'The chosen field identification already exist. Please choose another name.', 'FIELD_IDENT_EXPLAIN' => 'The field identification is a name to identify the profile field within the database and the templates.', 'FIELD_INT' => 'Numbers', + 'FIELD_IS_CONTACT' => 'Display field as a contact field', + 'FIELD_IS_CONTACT_EXPLAIN' => 'Contact fields are displayed with in the contact section of the user profile and are displayed differently in the mini profile next to posts and private messages.', 'FIELD_LENGTH' => 'Length of input box', 'FIELD_NOT_FOUND' => 'Profile field not found.', 'FIELD_STRING' => 'Single text field', 'FIELD_TEXT' => 'Textarea', 'FIELD_TYPE' => 'Field type', 'FIELD_TYPE_EXPLAIN' => 'You are not able to change the field type later.', + 'FIELD_URL' => 'URL (Link)', 'FIELD_VALIDATION' => 'Field validation', 'FIRST_OPTION' => 'First option', diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index e7954ff148..e7c149600d 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -182,14 +182,9 @@ $lang = array_merge($lang, array( 'IMG_ICON_BACK_TOP' => 'Top', - 'IMG_ICON_CONTACT_AIM' => 'AIM', 'IMG_ICON_CONTACT_EMAIL' => 'Send email', - 'IMG_ICON_CONTACT_ICQ' => 'ICQ', 'IMG_ICON_CONTACT_JABBER' => 'Jabber', - 'IMG_ICON_CONTACT_MSNM' => 'WLM', 'IMG_ICON_CONTACT_PM' => 'Send message', - 'IMG_ICON_CONTACT_YAHOO' => 'YIM', - 'IMG_ICON_CONTACT_WWW' => 'Website', 'IMG_ICON_POST_DELETE' => 'Delete post', 'IMG_ICON_POST_EDIT' => 'Edit post', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 896d2ef811..5ab420cf76 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -319,7 +319,6 @@ $lang = array_merge($lang, array( 'HOME' => 'Home', 'ICQ' => 'ICQ', - 'ICQ_STATUS' => 'ICQ status', 'IF' => 'If', 'IMAGE' => 'Image', 'IMAGE_FILETYPE_INVALID' => 'Image file type %d for mimetype %s not supported.', @@ -394,6 +393,10 @@ $lang = array_merge($lang, array( 'MERGE_TOPIC' => 'Merge topic', 'MESSAGE' => 'Message', 'MESSAGES' => 'Messages', + 'MESSAGES_COUNT' => array( + 1 => '%d message', + 2 => '%d messages', + ), 'MESSAGE_BODY' => 'Message body', 'MINUTES' => 'Minutes', 'MODERATE' => 'Moderate', @@ -401,7 +404,6 @@ $lang = array_merge($lang, array( 'MODERATORS' => 'Moderators', 'MONTH' => 'Month', 'MOVE' => 'Move', - 'MSNM' => 'WLM', 'NA' => 'N/A', 'NEWEST_USER' => 'Our newest member <strong>%s</strong>', @@ -680,37 +682,27 @@ $lang = array_merge($lang, array( 'TOO_LONG' => 'The value you entered is too long.', - 'TOO_LONG_AIM' => 'The screenname you entered is too long.', 'TOO_LONG_CONFIRM_CODE' => 'The confirm code you entered is too long.', 'TOO_LONG_DATEFORMAT' => 'The date format you entered is too long.', - 'TOO_LONG_ICQ' => 'The ICQ number you entered is too long.', 'TOO_LONG_JABBER' => 'The Jabber account name you entered is too long.', - 'TOO_LONG_MSN' => 'The WLM name you entered is too long.', 'TOO_LONG_NEW_PASSWORD' => 'The password you entered is too long.', 'TOO_LONG_PASSWORD_CONFIRM' => 'The password confirmation you entered is too long.', 'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.', 'TOO_LONG_USERNAME' => 'The username you entered is too long.', 'TOO_LONG_EMAIL' => 'The email address you entered is too long.', - 'TOO_LONG_WEBSITE' => 'The website address you entered is too long.', - 'TOO_LONG_YIM' => 'The Yahoo! Messenger name you entered is too long.', 'TOO_MANY_VOTE_OPTIONS' => 'You have tried to vote for too many options.', 'TOO_SHORT' => 'The value you entered is too short.', - 'TOO_SHORT_AIM' => 'The screenname you entered is too short.', 'TOO_SHORT_CONFIRM_CODE' => 'The confirm code you entered is too short.', 'TOO_SHORT_DATEFORMAT' => 'The date format you entered is too short.', - 'TOO_SHORT_ICQ' => 'The ICQ number you entered is too short.', 'TOO_SHORT_JABBER' => 'The Jabber account name you entered is too short.', - 'TOO_SHORT_MSN' => 'The WLM name you entered is too short.', 'TOO_SHORT_NEW_PASSWORD' => 'The password you entered is too short.', 'TOO_SHORT_PASSWORD_CONFIRM' => 'The password confirmation you entered is too short.', 'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.', 'TOO_SHORT_USERNAME' => 'The username you entered is too short.', 'TOO_SHORT_EMAIL' => 'The email address you entered is too short.', - 'TOO_SHORT_WEBSITE' => 'The website address you entered is too short.', - 'TOO_SHORT_YIM' => 'The Yahoo! Messenger name you entered is too short.', 'TOO_SMALL' => 'The value you entered is too small.', 'TOO_SMALL_MAX_RECIPIENTS' => 'The value of <strong>Maximum number of allowed recipients per private message</strong> setting you entered is too small.', @@ -823,19 +815,18 @@ $lang = array_merge($lang, array( 'WEBSITE' => 'Website', 'WHOIS' => 'Whois', 'WHO_IS_ONLINE' => 'Who is online', + 'WLM' => 'WLM', 'WRONG_PASSWORD' => 'You entered an incorrect password.', 'WRONG_DATA_COLOUR' => 'The colour value you entered is invalid.', - 'WRONG_DATA_ICQ' => 'The number you entered is not a valid ICQ number.', 'WRONG_DATA_JABBER' => 'The name you entered is not a valid Jabber account name.', 'WRONG_DATA_LANG' => 'The language you specified is not valid.', - 'WRONG_DATA_WEBSITE' => 'The website address has to be a valid URL, including the protocol. For example http://www.example.com/.', 'WROTE' => 'wrote', + 'YAHOO' => 'Yahoo Messenger', 'YEAR' => 'Year', 'YEAR_MONTH_DAY' => '(YYYY-MM-DD)', 'YES' => 'Yes', - 'YIM' => 'YIM', 'YOU_LAST_VISIT' => 'Last visit was: %s', 'datetime' => array( diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index 8162f195eb..83f5e4107e 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -71,16 +71,10 @@ $lang = array_merge($lang, array( 'HIDE_MEMBER_SEARCH' => 'Hide member search', 'IM_ADD_CONTACT' => 'Add Contact', - 'IM_AIM' => 'Please note that you need AOL Instant Messenger installed to use this.', - 'IM_AIM_EXPRESS' => 'AIM Express', 'IM_DOWNLOAD_APP' => 'Download application', - 'IM_ICQ' => 'Please note that users may have selected to not receive unsolicited instant messages.', 'IM_JABBER' => 'Please note that users may have selected to not receive unsolicited instant messages.', 'IM_JABBER_SUBJECT' => 'This is an automated message please do not reply! Message from user %1$s at %2$s.', 'IM_MESSAGE' => 'Your message', - 'IM_MSNM' => 'Please note that you need Windows Live Messenger installed to use this.', - 'IM_MSNM_BROWSER' => 'Your browser does not support this.', - 'IM_MSNM_CONNECT' => 'WLM is not connected.\nYou have to connect to WLM to continue.', 'IM_NAME' => 'Your Name', 'IM_NO_DATA' => 'There is no suitable contact information for this user.', 'IM_NO_JABBER' => 'Sorry, direct messaging of Jabber users is not supported on this board. You will need a Jabber client installed on your system to contact the recipient above.', @@ -118,12 +112,10 @@ $lang = array_merge($lang, array( 'SELECT_MARKED' => 'Select marked', 'SELECT_SORT_METHOD' => 'Select sort method', - 'SEND_AIM_MESSAGE' => 'Send AIM message', 'SEND_ICQ_MESSAGE' => 'Send ICQ message', 'SEND_IM' => 'Instant messaging', 'SEND_JABBER_MESSAGE' => 'Send Jabber message', 'SEND_MESSAGE' => 'Message', - 'SEND_MSNM_MESSAGE' => 'Send WLM message', 'SEND_YIM_MESSAGE' => 'Send YIM message', 'SORT_EMAIL' => 'Email', 'SORT_LAST_ACTIVE' => 'Last active', @@ -144,6 +136,4 @@ $lang = array_merge($lang, array( 'VIEWING_PROFILE' => 'Viewing profile - %s', 'VISITED' => 'Last visited', - - 'WWW' => 'Website', )); diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 6f392d6efe..58bb1d4b3a 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -205,10 +205,13 @@ $lang = array_merge($lang, array( ), 'FIELD_TOO_SMALL' => 'The value of “%2$s” is too small, a minimum value of %1$d is required.', 'FIELD_TOO_LARGE' => 'The value of “%2$s” is too large, a maximum value of %1$d is allowed.', + 'FIELD_INVALID_CHARS_INVALID' => 'The field “%s” has invalid characters.', 'FIELD_INVALID_CHARS_NUMBERS_ONLY' => 'The field “%s” has invalid characters, only numbers are allowed.', 'FIELD_INVALID_CHARS_ALPHA_ONLY' => 'The field “%s” has invalid characters, only alphanumeric characters are allowed.', - 'FIELD_INVALID_CHARS_SPACERS_ONLY' => 'The field “%s” has invalid characters, only alphanumeric, space or -+_[] characters are allowed.', + 'FIELD_INVALID_CHARS_ALPHA_SPACERS' => 'The field “%s” has invalid characters, only alphanumeric, space or -+_[] characters are allowed.', + 'FIELD_INVALID_CHARS_ALPHA_UNDERSCORE' => 'The field “%s” has invalid characters, only alphanumeric or _ characters are allowed.', 'FIELD_INVALID_DATE' => 'The field “%s” has an invalid date.', + 'FIELD_INVALID_URL' => 'The field “%s” has an invalid url.', 'FIELD_INVALID_VALUE' => 'The field “%s” has an invalid value.', 'FOE_MESSAGE' => 'Message from foe', @@ -216,8 +219,8 @@ $lang = array_merge($lang, array( 'FOES_UPDATED' => 'Your foes list has been updated successfully.', 'FOLDER_ADDED' => 'Folder successfully added.', 'FOLDER_MESSAGE_STATUS' => array( - 1 => '%2$d from %1$d message stored', - 2 => '%2$d from %1$d messages stored', + 1 => '%2$d out of %1$s stored', + 2 => '%2$d out of %1$s stored', ), 'FOLDER_NAME_EMPTY' => 'You must enter a name for this folder.', 'FOLDER_NAME_EXIST' => 'Folder <strong>%s</strong> already exists.', @@ -225,8 +228,8 @@ $lang = array_merge($lang, array( 'FOLDER_RENAMED' => 'Folder successfully renamed.', 'FOLDER_REMOVED' => 'Folder successfully removed.', 'FOLDER_STATUS_MSG' => array( - 1 => 'Folder is %3$d%% full (%2$d from %1$d message stored)', - 2 => 'Folder is %3$d%% full (%2$d from %1$d messages stored)', + 1 => 'Folder is %3$d%% full (%2$d out of %1$s stored)', + 2 => 'Folder is %3$d%% full (%2$d out of %1$s stored)', ), 'FORWARD_PM' => 'Forward PM', 'FORCE_PASSWORD_EXPLAIN' => 'Before you may continue browsing the board you are required to change your password.', @@ -297,7 +300,8 @@ $lang = array_merge($lang, array( 'MOVE_DOWN' => 'Move down', 'MOVE_MARKED_TO_FOLDER' => 'Move marked to %s', 'MOVE_PM_ERROR' => array( - 2 => 'An error occurred while moving the messages to the new folder, only %2d from %1d messages were moved.', + 1 => 'An error occurred while moving the messages to the new folder, only %2$d out of %1$s was moved.', + 2 => 'An error occurred while moving the messages to the new folder, only %2$d out of %1$s were moved.', ), 'MOVE_TO_FOLDER' => 'Move to folder', 'MOVE_UP' => 'Move up', @@ -479,7 +483,6 @@ $lang = array_merge($lang, array( 'UCP' => 'User Control Panel', 'UCP_ACTIVATE' => 'Activate account', 'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. The administrator will review your account and if approved you will receive an email at the address you specified.', - 'UCP_AIM' => 'AOL Instant Messenger', 'UCP_ATTACHMENTS' => 'Attachments', 'UCP_AUTH_LINK' => 'External accounts', 'UCP_AUTH_LINK_ASK' => 'You currently have no account associated with this external service. Click the button below to link your board account to an account with this external service.', @@ -492,7 +495,6 @@ $lang = array_merge($lang, array( 'UCP_COPPA_BEFORE' => 'Before %s', 'UCP_COPPA_ON_AFTER' => 'On or after %s', 'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. You will receive an email at the address you provide that contains an account activation link.', - 'UCP_ICQ' => 'ICQ number', 'UCP_JABBER' => 'Jabber address', 'UCP_LOGIN_LINK' => 'Set up an external account association', @@ -503,7 +505,6 @@ $lang = array_merge($lang, array( 'UCP_MAIN_FRONT' => 'Front page', 'UCP_MAIN_SUBSCRIBED' => 'Manage subscriptions', - 'UCP_MSNM' => 'Windows Live Messenger', 'UCP_NO_ATTACHMENTS' => 'You have posted no files.', 'UCP_NOTIFICATION_LIST' => 'Manage notifications', @@ -539,7 +540,6 @@ $lang = array_merge($lang, array( 'UCP_REMIND' => 'Send password', 'UCP_RESEND' => 'Send activation email', '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 & Foes', 'UCP_ZEBRA_FOES' => 'Manage foes', 'UCP_ZEBRA_FRIENDS' => 'Manage friends', diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php index 424cb9da3e..b566f4b5c0 100644 --- a/phpBB/language/en/viewtopic.php +++ b/phpBB/language/en/viewtopic.php @@ -118,7 +118,6 @@ $lang = array_merge($lang, array( 2 => '%d posts', ), 'VIEW_UNREAD_POST' => 'First unread post', - 'VISIT_WEBSITE' => 'WWW', 'VOTE_SUBMITTED' => 'Your vote has been cast.', 'VOTE_CONVERTED' => 'Changing votes is not supported for converted polls.', diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 313b24b6f1..24a7bebeba 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -186,7 +186,7 @@ if ($quickmod) // If needed, the flag can be set to true within event listener // to indicate that the action was handled properly // and to pass by the trigger_error() call below - $break = false; + $is_valid_action = false; /** * This event allows you to add custom quickmod options @@ -194,12 +194,12 @@ if ($quickmod) * @event core.modify_quickmod_options * @var object module Instance of module system class * @var string action Quickmod option - * @var bool break Flag indicating if the action was handled properly + * @var bool is_valid_action Flag indicating if the action was handled properly * @since 3.1.0-a4 */ - extract($phpbb_dispatcher->trigger_event('core.modify_quickmod_options', compact(array('module', 'action', 'break')))); + extract($phpbb_dispatcher->trigger_event('core.modify_quickmod_options', compact(array('module', 'action', 'is_valid_action')))); - if (!$break) + if (!$is_valid_action) { trigger_error($user->lang('QUICKMOD_ACTION_NOT_ALLOWED', $action), E_USER_ERROR); } diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index e927429810..8db2fef2a3 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -305,20 +305,6 @@ switch ($mode) $presence_img = ''; switch ($action) { - case 'aim': - $lang = 'AIM'; - $sql_field = 'user_aim'; - $s_select = 'S_SEND_AIM'; - $s_action = ''; - break; - - case 'msnm': - $lang = 'MSNM'; - $sql_field = 'user_msnm'; - $s_select = 'S_SEND_MSNM'; - $s_action = ''; - break; - case 'jabber': $lang = 'JABBER'; $sql_field = 'user_jabber'; @@ -402,9 +388,6 @@ switch ($mode) 'IM_CONTACT' => $row[$sql_field], 'A_IM_CONTACT' => addslashes($row[$sql_field]), - 'U_AIM_CONTACT' => ($action == 'aim') ? 'aim:addbuddy?screenname=' . urlencode($row[$sql_field]) : '', - 'U_AIM_MESSAGE' => ($action == 'aim') ? 'aim:goim?screenname=' . urlencode($row[$sql_field]) . '&message=' . urlencode($config['sitename']) : '', - 'USERNAME' => $row['username'], 'CONTACT_NAME' => $row[$sql_field], 'SITENAME' => $config['sitename'], @@ -618,8 +601,8 @@ switch ($mode) if ($config['load_cpf_viewprofile']) { $cp = $phpbb_container->get('profilefields.manager'); - $profile_fields = $cp->generate_profile_fields_template('grab', $user_id); - $profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields[$user_id]) : array(); + $profile_fields = $cp->grab_profile_fields_data($user_id); + $profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields[$user_id]) : array(); } // If the user has m_approve permission or a_user permission, then list then display unapproved posts @@ -650,11 +633,6 @@ switch ($mode) 'AVATAR_IMG' => $poster_avatar, 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']), 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']), - 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']), - 'ICQ_IMG' => $user->img('icon_contact_icq', $user->lang['ICQ']), - 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']), - 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']), - 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']), 'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']), 'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']), @@ -998,8 +976,8 @@ switch ($mode) $pagination = $phpbb_container->get('pagination'); // Sorting - $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'f' => $user->lang['WEBSITE'], 'g' => $user->lang['ICQ'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER']); - $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber'); + $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'k' => $user->lang['JABBER']); + $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'k' => 'u.user_jabber'); if ($auth->acl_get('a_user')) { @@ -1042,7 +1020,7 @@ switch ($mode) $select_single = request_var('select_single', false); // Search URL parameters, if any of these are in the URL we do a search - $search_params = array('username', 'email', 'icq', 'aim', 'yahoo', 'msn', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip'); + $search_params = array('username', 'email', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip'); // We validate form and field here, only id/class allowed $form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form; @@ -1051,10 +1029,6 @@ switch ($mode) { $username = request_var('username', '', true); $email = strtolower(request_var('email', '')); - $icq = request_var('icq', ''); - $aim = request_var('aim', ''); - $yahoo = request_var('yahoo', ''); - $msn = request_var('msn', ''); $jabber = request_var('jabber', ''); $search_group_id = request_var('search_group_id', 0); @@ -1095,10 +1069,6 @@ switch ($mode) $sql_where .= ($username) ? ' AND u.username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : ''; $sql_where .= ($auth->acl_get('a_user') && $email) ? ' AND u.user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : ''; - $sql_where .= ($icq) ? ' AND u.user_icq ' . $db->sql_like_expression(str_replace('*', $db->any_char, $icq)) . ' ' : ''; - $sql_where .= ($aim) ? ' AND u.user_aim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $aim)) . ' ' : ''; - $sql_where .= ($yahoo) ? ' AND u.user_yim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $yahoo)) . ' ' : ''; - $sql_where .= ($msn) ? ' AND u.user_msnm ' . $db->sql_like_expression(str_replace('*', $db->any_char, $msn)) . ' ' : ''; $sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : ''; $sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : ''; @@ -1327,10 +1297,6 @@ switch ($mode) 'select_single' => array('select_single', $select_single), 'username' => array('username', '', true), 'email' => array('email', ''), - 'icq' => array('icq', ''), - 'aim' => array('aim', ''), - 'yahoo' => array('yahoo', ''), - 'msn' => array('msn', ''), 'jabber' => array('jabber', ''), 'search_group_id' => array('search_group_id', 0), 'joined_select' => array('joined_select', 'lt'), @@ -1459,10 +1425,6 @@ switch ($mode) $template->assign_vars(array( 'USERNAME' => $username, 'EMAIL' => $email, - 'ICQ' => $icq, - 'AIM' => $aim, - 'YAHOO' => $yahoo, - 'MSNM' => $msn, 'JABBER' => $jabber, 'JOINED' => implode('-', $joined), 'ACTIVE' => implode('-', $active), @@ -1566,7 +1528,7 @@ switch ($mode) if ($config['load_cpf_memberlist']) { // Grab all profile fields from users in id cache for later use - similar to the poster cache - $profile_fields_cache = $cp->generate_profile_fields_template('grab', $user_list); + $profile_fields_cache = $cp->grab_profile_fields_data($user_list); // Filter the fields we don't want to show foreach ($profile_fields_cache as $user_id => $user_profile_fields) @@ -1598,7 +1560,7 @@ switch ($mode) $cp_row = array(); if ($config['load_cpf_memberlist']) { - $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$user_id]) : array(); + $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], false) : array(); } $memberrow = array_merge(show_profile($row), array( @@ -1638,11 +1600,6 @@ switch ($mode) 'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['PROFILE']), 'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']), 'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']), - 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']), - 'ICQ_IMG' => $user->img('icon_contact_icq', $user->lang['ICQ']), - 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']), - 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']), - 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']), 'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']), 'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']), @@ -1652,11 +1609,6 @@ switch ($mode) 'U_SORT_JOINED' => $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_POSTS' => $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_EMAIL' => $sort_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_WEBSITE' => $sort_url . '&sk=f&sd=' . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_ICQ' => $sort_url . '&sk=g&sd=' . (($sort_key == 'g' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_AIM' => $sort_url . '&sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_MSN' => $sort_url . '&sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_YIM' => $sort_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'), 'U_SORT_ACTIVE' => ($auth->acl_get('u_viewonline')) ? $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '', 'U_SORT_RANK' => $sort_url . '&sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'), 'U_LIST_CHAR' => $sort_url . '&sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'), @@ -1767,7 +1719,6 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f 'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false, 'RANK_IMG' => $rank_img, 'RANK_IMG_SRC' => $rank_img_src, - 'ICQ_STATUS_IMG' => (!empty($data['user_icq'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&img=5" width="18" height="18" />' : '', 'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false, 'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false, @@ -1777,18 +1728,8 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f 'U_WARN' => ($warn_user_enabled && $auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $user_id, true, $user->session_id) : '', 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $user_id) : '', 'U_EMAIL' => $email, - 'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '', - 'U_SHORT_WWW' => (!empty($data['user_website'])) ? ((strlen($data['user_website']) > 55) ? substr($data['user_website'], 0, 39) . ' ... ' . substr($data['user_website'], -10) : $data['user_website']) : '', - 'U_ICQ' => ($data['user_icq']) ? 'http://www.icq.com/people/' . urlencode($data['user_icq']) . '/' : '', - 'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $user_id) : '', - 'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['user_yim']) . '&.src=pg' : '', - 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $user_id) : '', 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '', - 'USER_ICQ' => $data['user_icq'], - 'USER_AIM' => $data['user_aim'], - 'USER_YIM' => $data['user_yim'], - 'USER_MSN' => $data['user_msnm'], 'USER_JABBER' => $data['user_jabber'], 'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '', diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index d721ed2eb7..b61800006f 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -388,7 +388,7 @@ class driver * Build sql statement from array for insert/update/select statements * * Idea for this from Ikonboard - * Possible query values: INSERT, INSERT_SELECT, UPDATE, SELECT + * Possible query values: INSERT, INSERT_SELECT, UPDATE, SELECT, DELETE * */ function sql_build_array($query, $assoc_ary = false) @@ -423,7 +423,7 @@ class driver { trigger_error('The MULTI_INSERT query value is no longer supported. Please use sql_multi_insert() instead.', E_USER_ERROR); } - else if ($query == 'UPDATE' || $query == 'SELECT') + else if ($query == 'UPDATE' || $query == 'SELECT' || $query == 'DELETE') { $values = array(); foreach ($assoc_ary as $key => $var) diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_aol.php b/phpBB/phpbb/db/migration/data/v310/profilefield_aol.php new file mode 100644 index 0000000000..87574cb858 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_aol.php @@ -0,0 +1,51 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_aol extends \phpbb\db\migration\profilefield_base_migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_yahoo_cleanup', + ); + } + + protected $profilefield_name = 'phpbb_aol'; + + protected $profilefield_database_type = array('VCHAR', ''); + + protected $profilefield_data = array( + 'field_name' => 'phpbb_aol', + 'field_type' => 'profilefields.type.string', + 'field_ident' => 'phpbb_aol', + 'field_length' => '40', + 'field_minlen' => '5', + 'field_maxlen' => '255', + 'field_novalue' => '', + 'field_default_value' => '', + 'field_validation' => '.*', + 'field_required' => 0, + 'field_show_novalue' => 0, + 'field_show_on_reg' => 0, + 'field_show_on_pm' => 1, + 'field_show_on_vt' => 1, + 'field_show_on_ml' => 0, + 'field_show_profile' => 1, + 'field_hide' => 0, + 'field_no_view' => 0, + 'field_active' => 1, + 'field_is_contact' => 1, + 'field_contact_desc' => '', + 'field_contact_url' => '', + ); + + protected $user_column_name = 'user_aim'; +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_aol_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_aol_cleanup.php new file mode 100644 index 0000000000..a7088c6a7a --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_aol_cleanup.php @@ -0,0 +1,47 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_aol_cleanup extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_aim'); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_aol', + ); + } + + public function update_schema() + { + return array( + 'drop_columns' => array( + $this->table_prefix . 'users' => array( + 'user_aim', + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'add_columns' => array( + $this->table_prefix . 'users' => array( + 'user_aim' => array('VCHAR_UNI', ''), + ), + ), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_change_load_settings.php b/phpBB/phpbb/db/migration/data/v310/profilefield_change_load_settings.php new file mode 100644 index 0000000000..7d09d8149a --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_change_load_settings.php @@ -0,0 +1,30 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_change_load_settings extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_aol_cleanup', + ); + } + + public function update_data() + { + return array( + array('config.update', array('load_cpf_memberlist', '1')), + array('config.update', array('load_cpf_pm', '1')), + array('config.update', array('load_cpf_viewprofile', '1')), + array('config.update', array('load_cpf_viewtopic', '1')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_contact_field.php b/phpBB/phpbb/db/migration/data/v310/profilefield_contact_field.php new file mode 100644 index 0000000000..c7617813eb --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_contact_field.php @@ -0,0 +1,51 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_contact_field extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return $this->db_tools->sql_column_exists($this->table_prefix . 'profile_fields', 'field_is_contact'); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_on_memberlist', + ); + } + + public function update_schema() + { + return array( + 'add_columns' => array( + $this->table_prefix . 'profile_fields' => array( + 'field_is_contact' => array('BOOL', 0), + 'field_contact_desc' => array('VCHAR', ''), + 'field_contact_url' => array('VCHAR', ''), + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'drop_columns' => array( + $this->table_prefix . 'profile_fields' => array( + 'field_is_contact', + 'field_contact_desc', + 'field_contact_url', + ), + ), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_icq.php b/phpBB/phpbb/db/migration/data/v310/profilefield_icq.php new file mode 100644 index 0000000000..2c8c8c511f --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_icq.php @@ -0,0 +1,50 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_icq extends \phpbb\db\migration\profilefield_base_migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_contact_field', + ); + } + + protected $profilefield_name = 'phpbb_icq'; + + protected $profilefield_database_type = array('VCHAR', ''); + + protected $profilefield_data = array( + 'field_name' => 'phpbb_icq', + 'field_type' => 'profilefields.type.string', + 'field_ident' => 'phpbb_icq', + 'field_length' => '20', + 'field_minlen' => '3', + 'field_maxlen' => '15', + 'field_novalue' => '', + 'field_default_value' => '', + 'field_validation' => '[0-9]+', + 'field_required' => 0, + 'field_show_novalue' => 0, + 'field_show_on_reg' => 0, + 'field_show_on_pm' => 1, + 'field_show_on_vt' => 1, + 'field_show_profile' => 1, + 'field_hide' => 0, + 'field_no_view' => 0, + 'field_active' => 1, + 'field_is_contact' => 1, + 'field_contact_desc' => 'SEND_ICQ_MESSAGE', + 'field_contact_url' => 'https://www.icq.com/people/%s/', + ); + + protected $user_column_name = 'user_icq'; +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_icq_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_icq_cleanup.php new file mode 100644 index 0000000000..0129a7248f --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_icq_cleanup.php @@ -0,0 +1,47 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_icq_cleanup extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_icq'); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_icq', + ); + } + + public function update_schema() + { + return array( + 'drop_columns' => array( + $this->table_prefix . 'users' => array( + 'user_icq', + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'add_columns' => array( + $this->table_prefix . 'users' => array( + 'user_icq' => array('VCHAR:20', ''), + ), + ), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_interests.php b/phpBB/phpbb/db/migration/data/v310/profilefield_interests.php index d73bc78edb..2b943c5e53 100644 --- a/phpBB/phpbb/db/migration/data/v310/profilefield_interests.php +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_interests.php @@ -15,6 +15,7 @@ class profilefield_interests extends \phpbb\db\migration\profilefield_base_migra { return array( '\phpbb\db\migration\data\v310\profilefield_types', + '\phpbb\db\migration\data\v310\profilefield_show_novalue', ); } diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_show_novalue.php b/phpBB/phpbb/db/migration/data/v310/profilefield_show_novalue.php new file mode 100644 index 0000000000..d37103e2ce --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_show_novalue.php @@ -0,0 +1,45 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_show_novalue extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return $this->db_tools->sql_column_exists($this->table_prefix . 'profile_fields', 'field_show_novalue'); + } + + static public function depends_on() + { + return array('\phpbb\db\migration\data\v310\profilefield_types'); + } + + public function update_schema() + { + return array( + 'add_columns' => array( + $this->table_prefix . 'profile_fields' => array( + 'field_show_novalue' => array('BOOL', 0), + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'drop_columns' => array( + $this->table_prefix . 'profile_fields' => array( + 'field_show_novalue', + ), + ), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_website.php b/phpBB/phpbb/db/migration/data/v310/profilefield_website.php new file mode 100644 index 0000000000..818b66d2e4 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_website.php @@ -0,0 +1,52 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_website extends \phpbb\db\migration\profilefield_base_migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_on_memberlist', + '\phpbb\db\migration\data\v310\profilefield_icq_cleanup', + ); + } + + protected $profilefield_name = 'phpbb_website'; + + protected $profilefield_database_type = array('VCHAR', ''); + + protected $profilefield_data = array( + 'field_name' => 'phpbb_website', + 'field_type' => 'profilefields.type.url', + 'field_ident' => 'phpbb_website', + 'field_length' => '40', + 'field_minlen' => '12', + 'field_maxlen' => '255', + 'field_novalue' => '', + 'field_default_value' => '', + 'field_validation' => '', + 'field_required' => 0, + 'field_show_novalue' => 0, + 'field_show_on_reg' => 0, + 'field_show_on_pm' => 1, + 'field_show_on_vt' => 1, + 'field_show_on_ml' => 1, + 'field_show_profile' => 1, + 'field_hide' => 0, + 'field_no_view' => 0, + 'field_active' => 1, + 'field_is_contact' => 1, + 'field_contact_desc' => 'VISIT_WEBSITE', + 'field_contact_url' => '%s', + ); + + protected $user_column_name = 'user_website'; +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php new file mode 100644 index 0000000000..35cc92199e --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php @@ -0,0 +1,47 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_website_cleanup extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_website'); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_website', + ); + } + + public function update_schema() + { + return array( + 'drop_columns' => array( + $this->table_prefix . 'users' => array( + 'user_website', + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'add_columns' => array( + $this->table_prefix . 'users' => array( + 'user_website' => array('VCHAR_UNI:200', ''), + ), + ), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_wlm.php b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm.php new file mode 100644 index 0000000000..8a42f1fea1 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm.php @@ -0,0 +1,51 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_wlm extends \phpbb\db\migration\profilefield_base_migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_website_cleanup', + ); + } + + protected $profilefield_name = 'phpbb_wlm'; + + protected $profilefield_database_type = array('VCHAR', ''); + + protected $profilefield_data = array( + 'field_name' => 'phpbb_wlm', + 'field_type' => 'profilefields.type.string', + 'field_ident' => 'phpbb_wlm', + 'field_length' => '40', + 'field_minlen' => '5', + 'field_maxlen' => '255', + 'field_novalue' => '', + 'field_default_value' => '', + 'field_validation' => '.*', + 'field_required' => 0, + 'field_show_novalue' => 0, + 'field_show_on_reg' => 0, + 'field_show_on_pm' => 1, + 'field_show_on_vt' => 1, + 'field_show_on_ml' => 0, + 'field_show_profile' => 1, + 'field_hide' => 0, + 'field_no_view' => 0, + 'field_active' => 1, + 'field_is_contact' => 1, + 'field_contact_desc' => '', + 'field_contact_url' => '', + ); + + protected $user_column_name = 'user_msnm'; +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_wlm_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm_cleanup.php new file mode 100644 index 0000000000..98b92eb188 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm_cleanup.php @@ -0,0 +1,47 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_wlm_cleanup extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_msnm'); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_wlm', + ); + } + + public function update_schema() + { + return array( + 'drop_columns' => array( + $this->table_prefix . 'users' => array( + 'user_msnm', + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'add_columns' => array( + $this->table_prefix . 'users' => array( + 'user_msnm' => array('VCHAR_UNI', ''), + ), + ), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo.php b/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo.php new file mode 100644 index 0000000000..808aec8099 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo.php @@ -0,0 +1,51 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_yahoo extends \phpbb\db\migration\profilefield_base_migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_wlm_cleanup', + ); + } + + protected $profilefield_name = 'phpbb_yahoo'; + + protected $profilefield_database_type = array('VCHAR', ''); + + protected $profilefield_data = array( + 'field_name' => 'phpbb_yahoo', + 'field_type' => 'profilefields.type.string', + 'field_ident' => 'phpbb_yahoo', + 'field_length' => '40', + 'field_minlen' => '5', + 'field_maxlen' => '255', + 'field_novalue' => '', + 'field_default_value' => '', + 'field_validation' => '.*', + 'field_required' => 0, + 'field_show_novalue' => 0, + 'field_show_on_reg' => 0, + 'field_show_on_pm' => 1, + 'field_show_on_vt' => 1, + 'field_show_on_ml' => 0, + 'field_show_profile' => 1, + 'field_hide' => 0, + 'field_no_view' => 0, + 'field_active' => 1, + 'field_is_contact' => 1, + 'field_contact_desc' => 'SEND_YIM_MESSAGE', + 'field_contact_url' => 'http://edit.yahoo.com/config/send_webmesg?.target=%s&.src=pg', + ); + + protected $user_column_name = 'user_yim'; +} diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo_cleanup.php new file mode 100644 index 0000000000..c11d06576f --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo_cleanup.php @@ -0,0 +1,47 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class profilefield_yahoo_cleanup extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_yim'); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\profilefield_yahoo', + ); + } + + public function update_schema() + { + return array( + 'drop_columns' => array( + $this->table_prefix . 'users' => array( + 'user_yim', + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'add_columns' => array( + $this->table_prefix . 'users' => array( + 'user_yim' => array('VCHAR_UNI', ''), + ), + ), + ); + } +} diff --git a/phpBB/phpbb/notification/type/admin_activate_user.php b/phpBB/phpbb/notification/type/admin_activate_user.php index 5f146e18ff..426da4db03 100644 --- a/phpBB/phpbb/notification/type/admin_activate_user.php +++ b/phpBB/phpbb/notification/type/admin_activate_user.php @@ -81,7 +81,7 @@ class admin_activate_user extends \phpbb\notification\type\base WHERE user_type = ' . USER_FOUNDER; $result = $this->db->sql_query($sql); - while ($row = $this->db->sql_fetchrow($sql)) + while ($row = $this->db->sql_fetchrow($result)) { $users[] = (int) $row['user_id']; } diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php index ac2542a6d4..a4626bc5de 100644 --- a/phpBB/phpbb/profilefields/manager.php +++ b/phpBB/phpbb/profilefields/manager.php @@ -278,106 +278,132 @@ class manager } /** - * Assign fields to template, used for viewprofile, viewtopic and memberlist (if load setting is enabled) - * This is directly connected to the user -> mode == grab is to grab the user specific fields, mode == show is for assigning the row to the template + * Grab the user specific profile fields data + * + * @param int|array $user_ids Single user id or an array of ids + * @return array Users profile fields data */ - public function generate_profile_fields_template($mode, $user_id = 0, $profile_row = false) + public function grab_profile_fields_data($user_ids = 0) { - if ($mode == 'grab') + if (!is_array($user_ids)) { - if (!is_array($user_id)) - { - $user_id = array($user_id); - } + $user_ids = array($user_ids); + } - if (!sizeof($this->profile_cache)) - { - $this->build_cache(); - } + if (!sizeof($this->profile_cache)) + { + $this->build_cache(); + } - if (!sizeof($user_id)) - { - return array(); - } + if (!sizeof($user_ids)) + { + return array(); + } - $sql = 'SELECT * - FROM ' . $this->fields_data_table . ' - WHERE ' . $this->db->sql_in_set('user_id', array_map('intval', $user_id)); - $result = $this->db->sql_query($sql); + $sql = 'SELECT * + FROM ' . $this->fields_data_table . ' + WHERE ' . $this->db->sql_in_set('user_id', array_map('intval', $user_ids)); + $result = $this->db->sql_query($sql); - $field_data = array(); - while ($row = $this->db->sql_fetchrow($result)) - { - $field_data[$row['user_id']] = $row; - } - $this->db->sql_freeresult($result); + $field_data = array(); + while ($row = $this->db->sql_fetchrow($result)) + { + $field_data[$row['user_id']] = $row; + } + $this->db->sql_freeresult($result); - $user_fields = array(); + $user_fields = array(); - $user_ids = $user_id; + // Go through the fields in correct order + foreach (array_keys($this->profile_cache) as $used_ident) + { + foreach ($field_data as $user_id => $row) + { + $user_fields[$user_id][$used_ident]['value'] = $row['pf_' . $used_ident]; + $user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident]; + } - // Go through the fields in correct order - foreach (array_keys($this->profile_cache) as $used_ident) + foreach ($user_ids as $user_id) { - foreach ($field_data as $user_id => $row) + if (!isset($user_fields[$user_id][$used_ident]) && $this->profile_cache[$used_ident]['field_show_novalue']) { - $user_fields[$user_id][$used_ident]['value'] = $row['pf_' . $used_ident]; + $user_fields[$user_id][$used_ident]['value'] = ''; $user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident]; } - - foreach ($user_ids as $user_id) - { - if (!isset($user_fields[$user_id][$used_ident]) && $this->profile_cache[$used_ident]['field_show_novalue']) - { - $user_fields[$user_id][$used_ident]['value'] = ''; - $user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident]; - } - } } - - return $user_fields; } - else if ($mode == 'show') + + return $user_fields; + } + + /** + * Assign the user's profile fields data to the template + * + * @param array $profile_row Array with users profile field data + * @param bool $use_contact_fields Should we display contact fields as such? + * This requires special treatments (links should not be parsed in the values, and more) + * @return array + */ + public function generate_profile_fields_template_data($profile_row, $use_contact_fields = true) + { + // $profile_row == $user_fields[$row['user_id']]; + $tpl_fields = array(); + $tpl_fields['row'] = $tpl_fields['blockrow'] = array(); + + foreach ($profile_row as $ident => $ident_ary) { - // $profile_row == $user_fields[$row['user_id']]; - $tpl_fields = array(); - $tpl_fields['row'] = $tpl_fields['blockrow'] = array(); + $profile_field = $this->type_collection[$ident_ary['data']['field_type']]; + $value = $profile_field->get_profile_value($ident_ary['value'], $ident_ary['data']); - foreach ($profile_row as $ident => $ident_ary) + if ($value === null) { - $profile_field = $this->type_collection[$ident_ary['data']['field_type']]; - $value = $profile_field->get_profile_value($ident_ary['value'], $ident_ary['data']); + continue; + } - if ($value === null) + $field_desc = $contact_url = ''; + if ($use_contact_fields) + { + $value = $profile_field->get_profile_contact_value($ident_ary['value'], $ident_ary['data']); + $field_desc = $this->user->lang($ident_ary['data']['field_contact_desc']); + if (strpos($field_desc, '%s') !== false) { - continue; + $field_desc = sprintf($field_desc, $value); + } + $contact_url = ''; + if (strpos($ident_ary['data']['field_contact_url'], '%s') !== false) + { + $contact_url = sprintf($ident_ary['data']['field_contact_url'], $value); } - - $tpl_fields['row'] += array( - 'PROFILE_' . strtoupper($ident) . '_VALUE' => $value, - 'PROFILE_' . strtoupper($ident) . '_TYPE' => $ident_ary['data']['field_type'], - 'PROFILE_' . strtoupper($ident) . '_NAME' => $this->user->lang($ident_ary['data']['lang_name']), - 'PROFILE_' . strtoupper($ident) . '_EXPLAIN'=> $this->user->lang($ident_ary['data']['lang_explain']), - - 'S_PROFILE_' . strtoupper($ident) => true, - ); - - $tpl_fields['blockrow'][] = array( - 'PROFILE_FIELD_VALUE' => $value, - 'PROFILE_FIELD_TYPE' => $ident_ary['data']['field_type'], - 'PROFILE_FIELD_NAME' => $this->user->lang($ident_ary['data']['lang_name']), - 'PROFILE_FIELD_EXPLAIN' => $this->user->lang($ident_ary['data']['lang_explain']), - - 'S_PROFILE_' . strtoupper($ident) => true, - ); } - return $tpl_fields; - } - else - { - trigger_error('Wrong mode for custom profile', E_USER_ERROR); + $tpl_fields['row'] += array( + 'PROFILE_' . strtoupper($ident) . '_IDENT' => $ident, + 'PROFILE_' . strtoupper($ident) . '_VALUE' => $value, + 'PROFILE_' . strtoupper($ident) . '_CONTACT'=> $contact_url, + 'PROFILE_' . strtoupper($ident) . '_DESC' => $field_desc, + 'PROFILE_' . strtoupper($ident) . '_TYPE' => $ident_ary['data']['field_type'], + 'PROFILE_' . strtoupper($ident) . '_NAME' => $this->user->lang($ident_ary['data']['lang_name']), + 'PROFILE_' . strtoupper($ident) . '_EXPLAIN'=> $this->user->lang($ident_ary['data']['lang_explain']), + + 'S_PROFILE_' . strtoupper($ident) . '_CONTACT' => $ident_ary['data']['field_is_contact'], + 'S_PROFILE_' . strtoupper($ident) => true, + ); + + $tpl_fields['blockrow'][] = array( + 'PROFILE_FIELD_IDENT' => $ident, + 'PROFILE_FIELD_VALUE' => $value, + 'PROFILE_FIELD_CONTACT' => $contact_url, + 'PROFILE_FIELD_DESC' => $field_desc, + 'PROFILE_FIELD_TYPE' => $ident_ary['data']['field_type'], + 'PROFILE_FIELD_NAME' => $this->user->lang($ident_ary['data']['lang_name']), + 'PROFILE_FIELD_EXPLAIN' => $this->user->lang($ident_ary['data']['lang_explain']), + + 'S_PROFILE_CONTACT' => $ident_ary['data']['field_is_contact'], + 'S_PROFILE_' . strtoupper($ident) => true, + ); } + + return $tpl_fields; } /** diff --git a/phpBB/phpbb/profilefields/type/type_base.php b/phpBB/phpbb/profilefields/type/type_base.php index 9c363a7b4e..a96196674d 100644 --- a/phpBB/phpbb/profilefields/type/type_base.php +++ b/phpBB/phpbb/profilefields/type/type_base.php @@ -87,6 +87,14 @@ abstract class type_base implements type_interface /** * {@inheritDoc} */ + public function get_profile_contact_value($field_value, $field_data) + { + return $this->get_profile_value($field_value, $field_data); + } + + /** + * {@inheritDoc} + */ public function get_language_options_input($field_data) { $field_data['l_lang_name'] = $this->request->variable('l_lang_name', array(0 => ''), true); diff --git a/phpBB/phpbb/profilefields/type/type_date.php b/phpBB/phpbb/profilefields/type/type_date.php index fc012dd97a..af3d65c9b6 100644 --- a/phpBB/phpbb/profilefields/type/type_date.php +++ b/phpBB/phpbb/profilefields/type/type_date.php @@ -66,6 +66,7 @@ class type_date extends type_base 'field_ident' => 'field_default_value', 'field_type' => $this->get_service_name(), 'field_length' => $field_data['field_length'], + 'lang_options' => $field_data['lang_options'], ); $always_now = request_var('always_now', -1); diff --git a/phpBB/phpbb/profilefields/type/type_int.php b/phpBB/phpbb/profilefields/type/type_int.php index b89faca018..c98c863e13 100644 --- a/phpBB/phpbb/profilefields/type/type_int.php +++ b/phpBB/phpbb/profilefields/type/type_int.php @@ -61,7 +61,7 @@ class type_int extends type_base 0 => array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_length" size="5" value="' . $field_data['field_length'] . '" />'), 1 => array('TITLE' => $this->user->lang['MIN_FIELD_NUMBER'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_minlen" size="5" value="' . $field_data['field_minlen'] . '" />'), 2 => array('TITLE' => $this->user->lang['MAX_FIELD_NUMBER'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_maxlen" size="5" value="' . $field_data['field_maxlen'] . '" />'), - 3 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => '<input type="post" name="field_default_value" value="' . $field_data['field_default_value'] . '" />'), + 3 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => '<input type="number" name="field_default_value" value="' . $field_data['field_default_value'] . '" />'), ); return $options; @@ -141,7 +141,7 @@ class type_int extends type_base */ public function get_profile_value($field_value, $field_data) { - if ($field_value === '' && !$field_data['field_show_novalue']) + if (($field_value === '' || $field_value === null) && !$field_data['field_show_novalue']) { return null; } diff --git a/phpBB/phpbb/profilefields/type/type_interface.php b/phpBB/phpbb/profilefields/type/type_interface.php index 94f6882524..a1c3d879c8 100644 --- a/phpBB/phpbb/profilefields/type/type_interface.php +++ b/phpBB/phpbb/profilefields/type/type_interface.php @@ -90,6 +90,17 @@ interface type_interface public function get_profile_value($field_value, $field_data); /** + * Get Profile Value for display + * + * When displaying a contact field, we don't want to have links already parsed and more + * + * @param mixed $field_value Field value as stored in the database + * @param array $field_data Array with requirements of the field + * @return mixed Field value to display + */ + public function get_profile_contact_value($field_value, $field_data); + + /** * Generate the input field for display * * @param array $profile_row Array with data for this field diff --git a/phpBB/phpbb/profilefields/type/type_string.php b/phpBB/phpbb/profilefields/type/type_string.php index 9d241c49ef..9dada592eb 100644 --- a/phpBB/phpbb/profilefields/type/type_string.php +++ b/phpBB/phpbb/profilefields/type/type_string.php @@ -109,7 +109,7 @@ class type_string extends type_string_common $default_value = $profile_row['lang_default_value']; $profile_row['field_value'] = ($this->request->is_set($field_ident)) ? $this->request->variable($field_ident, $default_value, true) : ((!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false) ? $default_value : $this->user->profile_fields[$field_ident]); - $this->template->assign_block_vars('string', array_change_key_case($profile_row, CASE_UPPER)); + $this->template->assign_block_vars($this->get_name_short(), array_change_key_case($profile_row, CASE_UPPER)); } /** diff --git a/phpBB/phpbb/profilefields/type/type_string_common.php b/phpBB/phpbb/profilefields/type/type_string_common.php index f00a7e6a08..0738cbdafd 100644 --- a/phpBB/phpbb/profilefields/type/type_string_common.php +++ b/phpBB/phpbb/profilefields/type/type_string_common.php @@ -11,15 +11,21 @@ namespace phpbb\profilefields\type; abstract class type_string_common extends type_base { + protected $validation_options = array( + 'CHARS_ANY' => '.*', + 'NUMBERS_ONLY' => '[0-9]+', + 'ALPHA_ONLY' => '[\w]+', + 'ALPHA_UNDERSCORE' => '[\w_]+', + 'ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+', + ); + /** * Return possible validation options */ - function validate_options($field_data) + public function validate_options($field_data) { - $validate_ary = array('CHARS_ANY' => '.*', 'NUMBERS_ONLY' => '[0-9]+', 'ALPHA_ONLY' => '[\w]+', 'ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+'); - $validate_options = ''; - foreach ($validate_ary as $lang => $value) + foreach ($this->validation_options as $lang => $value) { $selected = ($field_data['field_validation'] == $value) ? ' selected="selected"' : ''; $validate_options .= '<option value="' . $value . '"' . $selected . '>' . $this->user->lang[$lang] . '</option>'; @@ -69,17 +75,12 @@ abstract class type_string_common extends type_base $field_validate = ($field_type != 'text') ? $field_value : bbcode_nl2br($field_value); if (!preg_match('#^' . str_replace('\\\\', '\\', $field_data['field_validation']) . '$#i', $field_validate)) { - switch ($row['field_validation']) + $validation = array_search($field_data['field_validation'], $this->validation_options); + if ($validation) { - case '[0-9]+': - return $this->user->lang('FIELD_INVALID_CHARS_NUMBERS_ONLY', $this->get_field_name($field_data['lang_name'])); - - case '[\w]+': - return $this->user->lang('FIELD_INVALID_CHARS_ALPHA_ONLY', $this->get_field_name($field_data['lang_name'])); - - case '[\w_\+\. \-\[\]]+': - return $this->user->lang('FIELD_INVALID_CHARS_SPACERS_ONLY', $this->get_field_name($field_data['lang_name'])); + return $this->user->lang('FIELD_INVALID_CHARS_' . $validation, $this->get_field_name($field_data['lang_name'])); } + return $this->user->lang('FIELD_INVALID_CHARS_INVALID', $this->get_field_name($field_data['lang_name'])); } } @@ -105,6 +106,19 @@ abstract class type_string_common extends type_base /** * {@inheritDoc} */ + public function get_profile_contact_value($field_value, $field_data) + { + if (!$field_value && !$field_data['field_show_novalue']) + { + return null; + } + + return $field_value; + } + + /** + * {@inheritDoc} + */ public function prepare_options_form(&$exclude_options, &$visibility_options) { $exclude_options[1][] = 'lang_default_value'; diff --git a/phpBB/phpbb/profilefields/type/type_url.php b/phpBB/phpbb/profilefields/type/type_url.php new file mode 100644 index 0000000000..b1523b9355 --- /dev/null +++ b/phpBB/phpbb/profilefields/type/type_url.php @@ -0,0 +1,70 @@ +<?php +/** +* +* @package phpBB +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\profilefields\type; + +class type_url extends type_string +{ + /** + * {@inheritDoc} + */ + public function get_name_short() + { + return 'url'; + } + + /** + * {@inheritDoc} + */ + public function get_options($default_lang_id, $field_data) + { + $options = array( + 0 => array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" name="field_length" size="5" value="' . $field_data['field_length'] . '" />'), + 1 => array('TITLE' => $this->user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" name="field_minlen" size="5" value="' . $field_data['field_minlen'] . '" />'), + 2 => array('TITLE' => $this->user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" name="field_maxlen" size="5" value="' . $field_data['field_maxlen'] . '" />'), + ); + + return $options; + } + + /** + * {@inheritDoc} + */ + public function get_default_option_values() + { + return array( + 'field_length' => 40, + 'field_minlen' => 0, + 'field_maxlen' => 200, + 'field_validation' => '', + 'field_novalue' => '', + 'field_default_value' => '', + ); + } + + /** + * {@inheritDoc} + */ + public function validate_profile_field(&$field_value, $field_data) + { + $field_value = trim($field_value); + + if ($field_value === '' && !$field_data['field_required']) + { + return false; + } + + if (!preg_match('#^' . get_preg_expression('url') . '$#i', $field_value)) + { + return $this->user->lang('FIELD_INVALID_URL', $this->get_field_name($field_data['lang_name'])); + } + + return false; + } +} diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index 1a89182978..fb3726c957 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -325,7 +325,6 @@ class fulltext_native extends \phpbb\search\base } $this->db->sql_freeresult($result); } - unset($exact_words); // now analyse the search query, first split it using the spaces $query = explode(' ', $keywords); @@ -451,39 +450,21 @@ class fulltext_native extends \phpbb\search\base $this->{$mode . '_ids'}[] = $words[$word]; } } - // throw an error if we shall not ignore unexistant words - else if (!$ignore_no_id) + else { if (!isset($common_ids[$word])) { $len = utf8_strlen($word); - if ($len >= $this->word_length['min'] && $len <= $this->word_length['max']) - { - trigger_error(sprintf($this->user->lang['WORD_IN_NO_POST'], $word)); - } - else + if ($len < $this->word_length['min'] || $len > $this->word_length['max']) { $this->common_words[] = $word; } } } - else - { - $len = utf8_strlen($word); - if ($len < $this->word_length['min'] || $len > $this->word_length['max']) - { - $this->common_words[] = $word; - } - } } - // we can't search for negatives only - if (!sizeof($this->must_contain_ids)) - { - return false; - } - - if (!empty($this->search_query)) + // Return true if all words are not common words + if (sizeof($exact_words) - sizeof($this->common_words) > 0) { return true; } @@ -518,6 +499,12 @@ class fulltext_native extends \phpbb\search\base return false; } + // we can't search for negatives only + if (empty($this->must_contain_ids)) + { + return false; + } + $must_contain_ids = $this->must_contain_ids; $must_not_contain_ids = $this->must_not_contain_ids; $must_exclude_one_ids = $this->must_exclude_one_ids; diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index acbfad9474..d86a394326 100644 --- a/phpBB/phpbb/search/fulltext_sphinx.php +++ b/phpBB/phpbb/search/fulltext_sphinx.php @@ -282,9 +282,9 @@ class fulltext_sphinx array('sql_attr_uint', 'post_visibility'), array('sql_attr_bool', 'topic_first_post'), array('sql_attr_bool', 'deleted'), - array('sql_attr_timestamp' , 'post_time'), - array('sql_attr_timestamp' , 'topic_last_post_time'), - array('sql_attr_str2ordinal', 'post_subject'), + array('sql_attr_timestamp', 'post_time'), + array('sql_attr_timestamp', 'topic_last_post_time'), + array('sql_attr_string', 'post_subject'), ), 'source source_phpbb_' . $this->id . '_delta : source_phpbb_' . $this->id . '_main' => array( array('sql_query_pre', ''), diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php index af186c2215..a222fbb69e 100644 --- a/phpBB/phpbb/template/context.php +++ b/phpBB/phpbb/template/context.php @@ -155,11 +155,12 @@ class context // We're adding a new iteration to this block with the given // variable assignments. $str[$blocks[$blockcount]][] = $vararray; + $s_num_rows = sizeof($str[$blocks[$blockcount]]); // Set S_NUM_ROWS foreach ($str[$blocks[$blockcount]] as &$mod_block) { - $mod_block['S_NUM_ROWS'] = sizeof($str[$blocks[$blockcount]]); + $mod_block['S_NUM_ROWS'] = $s_num_rows; } } else @@ -186,11 +187,12 @@ class context // Add a new iteration to this block with the variable assignments we were given. $this->tpldata[$blockname][] = $vararray; + $s_num_rows = sizeof($this->tpldata[$blockname]); // Set S_NUM_ROWS foreach ($this->tpldata[$blockname] as &$mod_block) { - $mod_block['S_NUM_ROWS'] = sizeof($this->tpldata[$blockname]); + $mod_block['S_NUM_ROWS'] = $s_num_rows; } } diff --git a/phpBB/search.php b/phpBB/search.php index 2d516502ed..d03cef5e14 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -527,12 +527,6 @@ if ($keywords || $author || $author_id || $search_id || $submit) $total_match_count = $search->author_search($show_results, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_posts_fid_sql, $topic_id, $author_id_ary, $sql_author_match, $id_ary, $start, $per_page); } - // For some searches we need to print out the "no results" page directly to allow re-sorting/refining the search options. - if (!sizeof($id_ary) && !$search_id) - { - trigger_error('NO_SEARCH_RESULTS'); - } - $sql_where = ''; if (sizeof($id_ary)) diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 495df2871d..408c9b9b8c 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -306,64 +306,6 @@ function apply_onkeypress_event() { jQuery(document).ready(apply_onkeypress_event); /** -* Run MSN action -*/ -function msn_action(action, address) -{ - // Does the browser support the MSNM object? - var app = document.getElementById('objMessengerApp'); - - if (!app || !app.MyStatus) { - var lang = $('form[data-lang-im-msnm-browser]'); - if (lang.length) { - alert(lang.attr('data-lang-im-msnm-browser')); - } - return false; - } - - // Is MSNM connected? - if (app.MyStatus == 1) { - var lang = $('form[data-lang-im-msnm-connect]'); - if (lang.length) { - alert(lang.attr('data-lang-im-msnm-connect')); - } - return false; - } - - // Do stuff - try { - switch (action) { - case 'add': - app.AddContact(0, address); - break; - - case 'im': - app.InstantMessage(address); - break; - } - } - catch (e) { - return; - } -} - -/** -* Add to your contact list -*/ -function add_contact(address) -{ - msn_action('add', address); -} - -/** -* Write IM to contact -*/ -function im_contact(address) -{ - msn_action('im', address); -} - -/** * Functions for user search popup */ function insert_user(formId, value) diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html index f9019b4fe3..46695b4841 100644 --- a/phpBB/styles/prosilver/template/forumlist_body.html +++ b/phpBB/styles/prosilver/template/forumlist_body.html @@ -7,6 +7,7 @@ </div> <!-- ENDIF --> + <!-- EVENT forumlist_body_category_header_before --> <!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW or forumrow.S_NO_CAT --> <div class="forabg"> <div class="inner"> @@ -22,6 +23,7 @@ </ul> <ul class="topiclist forums"> <!-- ENDIF --> + <!-- EVENT forumlist_body_category_header_after --> <!-- IF not forumrow.S_IS_CAT --> <li class="row"> @@ -37,10 +39,12 @@ <br /><strong>{forumrow.L_MODERATOR_STR}{L_COLON}</strong> {forumrow.MODERATORS} <!-- ENDIF --> <!-- IF .forumrow.subforum and forumrow.S_LIST_SUBFORUMS --> + <!-- EVENT forumlist_body_subforums_before --> <br /><strong>{forumrow.L_SUBFORUM_STR}</strong> <!-- BEGIN subforum --> - <a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->,<!-- ENDIF --> + <a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --> <!-- END subforum --> + <!-- EVENT forumlist_body_subforums_after --> <!-- ENDIF --> <!-- IF not S_IS_BOT --> diff --git a/phpBB/styles/prosilver/template/mcp_header.html b/phpBB/styles/prosilver/template/mcp_header.html index 51f496605e..2b2105e770 100644 --- a/phpBB/styles/prosilver/template/mcp_header.html +++ b/phpBB/styles/prosilver/template/mcp_header.html @@ -47,19 +47,3 @@ <p><!-- BEGIN return_links -->{return_links.MESSAGE_LINK}<br /><br /><!-- END return_links --></p> </div> <!-- ENDIF --> - - <!-- IF CONFIRM_MESSAGE --> - <form id="confirm" method="post" action="{S_CONFIRM_ACTION}"{S_FORM_ENCTYPE}> - - <div class="content"> - <h2>{L_PLEASE_CONFIRM}</h2> - <p>{CONFIRM_MESSAGE}</p> - - <fieldset class="submit-buttons"> - {S_HIDDEN_FIELDS}<input class="button1" type="submit" name="submit" value="{L_YES}" /> - <input class="button2" type="cancel" value="{L_NO}" /> - </fieldset> - </div> - - </form> - <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index c155d431fa..511c7b22c0 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -60,10 +60,7 @@ <tr> <th class="name" data-dfn="{L_RANK}{L_COMMA_SEPARATOR}<!-- IF S_SHOW_GROUP and .memberrow -->{L_GROUP_LEADER}<!-- ELSE -->{L_USERNAME}<!-- ENDIF -->"><span class="rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP and .memberrow -->{L_GROUP_LEADER}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th> <th class="posts"><a href="{U_SORT_POSTS}#memberlist">{L_POSTS}</a></th> - <th class="info"> - <a href="{U_SORT_WEBSITE}#memberlist">{L_WEBSITE}</a> - <!-- BEGIN custom_fields -->{L_COMMA_SEPARATOR} {custom_fields.PROFILE_FIELD_NAME}<!-- END custom_fields --> - </th> + <th class="info"><!-- BEGIN custom_fields --><!-- IF not custom_fields.S_FIRST_ROW -->{L_COMMA_SEPARATOR} <!-- ENDIF -->{custom_fields.PROFILE_FIELD_NAME}<!-- END custom_fields --></th> <th class="joined"><a href="{U_SORT_JOINED}#memberlist">{L_JOINED}</a></th> <!-- IF U_SORT_ACTIVE --><th class="active"><a href="{U_SORT_ACTIVE}#memberlist">{L_LAST_ACTIVE}</a></th><!-- ENDIF --> </tr> @@ -94,10 +91,7 @@ <!-- IF not S_LEADERS_SET --> <th class="name" data-dfn="{L_RANK}{L_COMMA_SEPARATOR}{L_USERNAME}"><span class="rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP -->{L_GROUP_MEMBERS}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th> <th class="posts"><a href="{U_SORT_POSTS}#memberlist">{L_POSTS}</a></th> - <th class="info"> - <a href="{U_SORT_WEBSITE}#memberlist">{L_WEBSITE}</a> - <!-- BEGIN custom_fields -->{L_COMMA_SEPARATOR} {custom_fields.PROFILE_FIELD_NAME}<!-- END custom_fields --> - </th> + <th class="info"><!-- BEGIN custom_fields --><!-- IF not custom_fields.S_FIRST_ROW -->{L_COMMA_SEPARATOR} <!-- ENDIF -->{custom_fields.PROFILE_FIELD_NAME}<!-- END custom_fields --></th> <th class="joined"><a href="{U_SORT_JOINED}#memberlist">{L_JOINED}</a></th> <!-- IF U_SORT_ACTIVE --><th class="active"><a href="{U_SORT_ACTIVE}#memberlist">{L_LAST_ACTIVE}</a></th><!-- ENDIF --> <!-- ELSEIF S_SHOW_GROUP --> @@ -117,14 +111,7 @@ <tr class="<!-- IF memberrow.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->"> <td><!-- IF memberrow.RANK_IMG --><span class="rank-img">{memberrow.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{memberrow.RANK_TITLE}</span><!-- ENDIF --><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input type="checkbox" name="user" value="{memberrow.USERNAME}" /> <!-- ENDIF --><!-- EVENT memberlist_body_username_prepend -->{memberrow.USERNAME_FULL}<!-- EVENT memberlist_body_username_append --><!-- IF S_IN_SEARCH_POPUP --><br />[ <a href="#" onclick="insert_single_user('#results', '{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a> ]<!-- ENDIF --></td> <td class="posts"><!-- IF memberrow.POSTS and S_DISPLAY_SEARCH --><a href="{memberrow.U_SEARCH_USER}" title="{L_SEARCH_USER_POSTS}">{memberrow.POSTS}</a><!-- ELSE -->{memberrow.POSTS}<!-- ENDIF --></td> - <td class="info"> - <!-- IF memberrow.U_WWW or .memberrow.custom_fields --> - <!-- IF memberrow.U_WWW --><div><a href="{memberrow.U_WWW}" title="{L_VISIT_WEBSITE}{L_COLON} {memberrow.U_WWW}">{memberrow.U_SHORT_WWW}</a></div><!-- ENDIF --> - <!-- BEGIN custom_fields --><div>{memberrow.custom_fields.PROFILE_FIELD_VALUE}</div><!-- END custom_fields --> - <!-- ELSE --> - - <!-- ENDIF --> - </td> + <td class="info"><!-- BEGIN custom_fields --><div>{memberrow.custom_fields.PROFILE_FIELD_VALUE}</div><!-- BEGINELSE --> <!-- END custom_fields --></td> <td>{memberrow.JOINED}</td> <!-- IF S_VIEWONLINE --><td>{memberrow.VISITED} </td><!-- ENDIF --> </tr> diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html index 8e7842e631..4fb383a0ba 100644 --- a/phpBB/styles/prosilver/template/memberlist_im.html +++ b/phpBB/styles/prosilver/template/memberlist_im.html @@ -1,9 +1,8 @@ <!-- INCLUDE simple_header.html --> -<!-- MSNM info from http://www.cdolive.net/ - doesn't seem to work with MSN Messenger --> <h2 class="solo">{L_SEND_IM}</h2> -<form method="post" action="{S_IM_ACTION}" data-lang-im-msnm-connect="{L_IM_MSNM_CONNECT|e('html_attr')}" data-lang-im-msnm-browser="{L_IM_MSNM_BROWSER|e('html_attr')}"> +<form method="post" action="{S_IM_ACTION}"> <div class="panel bg2"> <div class="inner"> @@ -13,45 +12,9 @@ <fieldset> <dl class="fields2"> <dt><label>{L_IM_RECIPIENT}{L_COLON}</label></dt> - <dd><strong>{USERNAME}</strong><!-- IF S_SEND_ICQ or S_SEND_AIM or S_SEND_MSNM or S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --><!-- IF PRESENCE_IMG --> {PRESENCE_IMG}<!-- ENDIF --></dd> + <dd><strong>{USERNAME}</strong><!-- IF S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --><!-- IF PRESENCE_IMG --> {PRESENCE_IMG}<!-- ENDIF --></dd> </dl> - <!-- IF S_SEND_ICQ --> - <dl class="fields2"> - <dt><label for="from">{L_IM_NAME}{L_COLON}</label></dt> - <dd><input class="inputbox autowidth" type="text" name="from" id="from" size="20" /></dd> - </dl> - <dl class="fields2"> - <dt><label for="body">{L_IM_MESSAGE}{L_COLON}</label></dt> - <dd><textarea class="inputbox autowidth" name="body" id="body" rows="5" cols="45"></textarea></dd> - </dl> - <dl class="fields2"> - <dt> </dt> - <dd><input class="button1" name="submit" type="submit" value="{L_IM_SEND}" /></dd> - </dl> - <input type="hidden" name="fromemail" value="{EMAIL}" /> - <input type="hidden" name="subject" value="{SITENAME}" /> - <input type="hidden" name="to" value="{IM_CONTACT}" /> - <!-- ENDIF --> - - <!-- IF S_SEND_AIM --> - <dl class="fields2"> - <dt> </dt> - <dd><a href="{U_AIM_CONTACT}">{L_IM_ADD_CONTACT}</a></dd> - <dd><a href="{U_AIM_MESSAGE}">{L_IM_SEND_MESSAGE}</a></dd> - <dd><a href="http://www.aim.com">{L_IM_DOWNLOAD_APP}</a> | <a href="http://www.aim.com/products/express">{L_IM_AIM_EXPRESS}</a></dd> - </dl> - <!-- ENDIF --> - - <!-- IF S_SEND_MSNM --> - <dl class="fields2"> - <dt> </dt> - <dd><object classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28" codetype="application/x-oleobject" id="objMessengerApp" width="0" height="0"></object></dd> - <dd><a href="#" onclick="add_contact('{A_IM_CONTACT}'); return false;">{L_IM_ADD_CONTACT}</a></dd> - <dd><a href="#" onclick="im_contact('{A_IM_CONTACT}'); return false;">{L_IM_SEND_MESSAGE}</a></dd> - </dl> - <!-- ENDIF --> - <!-- IF S_SEND_JABBER --> <dl class="fields2"> <dt><label for="message">{L_IM_MESSAGE}{L_COLON}</label></dt> @@ -61,19 +24,14 @@ <dt> </dt> <dd><input class="button1" name="submit" type="submit" value="{L_IM_SEND}" /></dd> </dl> - <!-- ENDIF --> - - <!-- IF S_NO_SEND_JABBER --> <dl class="fields2"> <dt> </dt> - <dd>{L_IM_NO_JABBER}</dd> + <dd>{L_IM_SENT_JABBER}</dd> </dl> - <!-- ENDIF --> - - <!-- IF S_SENT_JABBER --> + <!-- ELSE IF S_NO_SEND_JABBER --> <dl class="fields2"> <dt> </dt> - <dd>{L_IM_SENT_JABBER}</dd> + <dd>{L_IM_NO_JABBER}</dd> </dl> <!-- ENDIF --> {S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index 0b04d0087c..ee89b103b5 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -18,25 +18,17 @@ </dl> <!-- ENDIF --> <dl> - <dt><label for="icq">{L_ICQ}{L_COLON}</label></dt> - <dd><input type="text" name="icq" id="icq" value="{ICQ}" class="inputbox" /></dd> - </dl> - <dl> - <dt><label for="aim">{L_AIM}{L_COLON}</label></dt> - <dd><input type="text" name="aim" id="aim" value="{AIM}" class="inputbox" /></dd> - </dl> - <dl> - <dt><label for="yahoo">{L_YIM}{L_COLON}</label></dt> - <dd><input type="text" name="yahoo" id="yahoo" value="{YAHOO}" class="inputbox" /></dd> - </dl> - <dl> - <dt><label for="msn">{L_MSNM}{L_COLON}</label></dt> - <dd><input type="text" name="msn" id="msn" value="{MSNM}" class="inputbox" /></dd> - </dl> - <dl> <dt><label for="jabber">{L_JABBER}:</label></dt> <dd><input type="text" name="jabber" id="jabber" value="{JABBER}" class="inputbox" /></dd> </dl> + <dl> + <dt><label for="search_group_id">{L_GROUP}{L_COLON}</label></dt> + <dd><select name="search_group_id" id="search_group_id">{S_GROUP_SELECT}</select></dd> + </dl> + <dl> + <dt><label for="sk" class="label3">{L_SORT_BY}{L_COLON}</label></dt> + <dd><select name="sk" id="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select></dd> + </dl> </fieldset> <fieldset class="fields1 column2"> @@ -60,14 +52,6 @@ <dd><input class="inputbox medium" type="text" name="ip" id="ip" value="{IP}" /></dd> </dl> <!-- ENDIF --> - <dl> - <dt><label for="search_group_id">{L_GROUP}{L_COLON}</label></dt> - <dd><select name="search_group_id" id="search_group_id">{S_GROUP_SELECT}</select></dd> - </dl> - <dl> - <dt><label for="sk" class="label3">{L_SORT_BY}{L_COLON}</label></dt> - <dd><select name="sk" id="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select></dd> - </dl> </fieldset> <div class="clear"></div> diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index 1c4b6be2d1..6dc8293551 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -29,7 +29,11 @@ <!-- IF S_USER_INACTIVE --><dt>{L_USER_IS_INACTIVE}{L_COLON}</dt> <dd>{USER_INACTIVE_REASON}</dd><!-- ENDIF --> <!-- IF AGE !== '' --><dt>{L_AGE}{L_COLON}</dt> <dd>{AGE}</dd><!-- ENDIF --> <!-- IF S_GROUP_OPTIONS --><dt>{L_USERGROUPS}{L_COLON}</dt> <dd><select name="g">{S_GROUP_OPTIONS}</select> <input type="submit" name="submit" value="{L_GO}" class="button2" /></dd><!-- ENDIF --> - <!-- BEGIN custom_fields --><dt>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</dt> <dd>{custom_fields.PROFILE_FIELD_VALUE}</dd><!-- END custom_fields --> + <!-- BEGIN custom_fields --> + <!-- IF not custom_fields.S_PROFILE_CONTACT --> + <dt>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</dt> <dd>{custom_fields.PROFILE_FIELD_VALUE}</dd> + <!-- ENDIF --> + <!-- END custom_fields --> <!-- IF S_USER_LOGGED_IN and S_ZEBRA --> <!-- IF U_REMOVE_FRIEND --> <dt> </dt> <dd class="zebra"><a href="{U_REMOVE_FRIEND}" data-ajax="zebra"><strong>{L_REMOVE_FRIEND}</strong></a></dd> @@ -57,13 +61,18 @@ <dl class="details"> <!-- IF U_EMAIL --><dt>{L_EMAIL_ADDRESS}{L_COLON}</dt> <dd><a href="{U_EMAIL}">{L_SEND_EMAIL_USER} {USERNAME}</a></dd><!-- ENDIF --> - <!-- IF U_WWW --><dt>{L_WEBSITE}{L_COLON}</dt> <dd><a href="{U_WWW}" title="{L_VISIT_WEBSITE}{L_COLON} {U_WWW}">{U_WWW}</a></dd><!-- ENDIF --> <!-- IF U_PM --><dt>{L_PM}{L_COLON}</dt> <dd><a href="{U_PM}">{L_SEND_PRIVATE_MESSAGE}</a></dd><!-- ENDIF --> - <!-- IF U_MSN or USER_MSN --><dt>{L_MSNM}{L_COLON}</dt> <dd><!-- IF U_MSN --><a href="{U_MSN}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_MSNM_MESSAGE}</a><!-- ELSE -->{USER_MSN}<!-- ENDIF --></dd><!-- ENDIF --> - <!-- IF U_YIM or USER_YIM --><dt>{L_YIM}{L_COLON}</dt> <dd><!-- IF U_YIM --><a href="{U_YIM}" onclick="popup(this.href, 780, 550); return false;">{L_SEND_YIM_MESSAGE}</a><!-- ELSE -->{USER_YIM}<!-- ENDIF --></dd><!-- ENDIF --> - <!-- IF U_AIM or USER_AIM --><dt>{L_AIM}{L_COLON}</dt> <dd><!-- IF U_AIM --><a href="{U_AIM}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_AIM_MESSAGE}</a><!-- ELSE -->{USER_AIM}<!-- ENDIF --></dd><!-- ENDIF --> - <!-- IF U_ICQ or USER_ICQ --><dt>{L_ICQ}{L_COLON}</dt> <dd><!-- IF U_ICQ --><a href="{U_ICQ}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_ICQ_MESSAGE}</a><!-- ELSE -->{USER_ICQ}<!-- ENDIF --></dd><!-- ENDIF --> <!-- IF U_JABBER and S_JABBER_ENABLED --><dt>{L_JABBER}{L_COLON}</dt> <dd><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}{L_COLON}</dt> <dd>{USER_JABBER}</dd><!-- ENDIF --> + <!-- BEGIN custom_fields --> + <!-- IF custom_fields.S_PROFILE_CONTACT --> + <dt>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</dt> + <!-- IF custom_fields.PROFILE_FIELD_CONTACT --> + <dd><a href="{custom_fields.PROFILE_FIELD_CONTACT}">{custom_fields.PROFILE_FIELD_DESC}</a></dd> + <!-- ELSE --> + <dd>{custom_fields.PROFILE_FIELD_VALUE}</dd> + <!-- ENDIF --> + <!-- ENDIF --> + <!-- END custom_fields --> <!-- IF S_PROFILE_FIELD1 --> <!-- NOTE: Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. --> <dt>{PROFILE_FIELD1_NAME}{L_COLON}</dt> <dd>{PROFILE_FIELD1_VALUE}</dd> diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html index 137970bbdf..1164b2ffbe 100644 --- a/phpBB/styles/prosilver/template/posting_buttons.html +++ b/phpBB/styles/prosilver/template/posting_buttons.html @@ -61,26 +61,26 @@ <!-- EVENT posting_editor_buttons_before --> <div id="format-buttons"> - <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" /> - <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" /> - <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" /> + <input type="button" class="button2 bbcode-b" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" /> + <input type="button" class="button2 bbcode-i" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" /> + <input type="button" class="button2 bbcode-u" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" /> <!-- IF S_BBCODE_QUOTE --> - <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" /> + <input type="button" class="button2 bbcode-quote" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" /> <!-- ENDIF --> - <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" /> - <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" /> - <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" /> - <input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" /> + <input type="button" class="button2 bbcode-code" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" /> + <input type="button" class="button2 bbcode-list" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" /> + <input type="button" class="button2 bbcode-list-" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" /> + <input type="button" class="button2 bbcode-asterisk" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" /> <!-- IF S_BBCODE_IMG --> - <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" /> + <input type="button" class="button2 bbcode-img" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" /> <!-- ENDIF --> <!-- IF S_LINKS_ALLOWED --> - <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" /> + <input type="button" class="button2 bbcode-url" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" /> <!-- ENDIF --> <!-- IF S_BBCODE_FLASH --> - <input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" /> + <input type="button" class="button2 bbcode-flash" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" /> <!-- ENDIF --> - <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}"> + <select name="addbbcode20" class="bbcode-size" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}"> <option value="50">{L_FONT_TINY}</option> <option value="85">{L_FONT_SMALL}</option> <option value="100" selected="selected">{L_FONT_NORMAL}</option> @@ -91,9 +91,9 @@ <!-- ENDIF --> <!-- ENDIF --> </select> - <input type="button" class="button2" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="change_palette();" title="{L_BBCODE_S_HELP}" /> + <input type="button" class="button2 bbcode-color" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="change_palette();" title="{L_BBCODE_S_HELP}" /> <!-- BEGIN custom_tags --> - <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" /> + <input type="button" class="button2 bbcode-{custom_tags.BBCODE_TAG_CLEAN}" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" /> <!-- END custom_tags --> </div> <!-- EVENT posting_editor_buttons_after --> diff --git a/phpBB/styles/prosilver/template/profilefields/url.html b/phpBB/styles/prosilver/template/profilefields/url.html new file mode 100644 index 0000000000..8dd3a90de1 --- /dev/null +++ b/phpBB/styles/prosilver/template/profilefields/url.html @@ -0,0 +1,3 @@ +<!-- BEGIN url --> +<input type="url" class="inputbox autowidth" name="{url.FIELD_IDENT}" id="{url.FIELD_IDENT}" size="{url.FIELD_LENGTH}" maxlength="{url.FIELD_MAXLEN}" value="{url.FIELD_VALUE}" /> +<!-- END url --> diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index 3623489ccf..d57c73217e 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -27,22 +27,30 @@ <!-- EVENT ucp_pm_viewmessage_custom_fields_before --> <!-- BEGIN custom_fields --> - <dd><strong>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {custom_fields.PROFILE_FIELD_VALUE}</dd> + <!-- IF not custom_fields.S_PROFILE_CONTACT --> + <dd><strong>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {custom_fields.PROFILE_FIELD_VALUE}</dd> + <!-- ENDIF --> <!-- END custom_fields --> <!-- EVENT ucp_pm_viewmessage_custom_fields_after --> - <!-- IF U_PM or U_EMAIL or U_WWW or U_MSN or U_ICQ or U_YIM or U_AIM or U_JABBER --> + <!-- IF U_PM or U_EMAIL or U_JABBER --> <dd> <ul class="profile-icons"> + <!-- EVENT ucp_pm_viewmessage_contact_fields_before --> <!-- IF U_PM --><li class="pm-icon"><a href="{U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF --> <!-- IF U_EMAIL --><li class="email-icon"><a href="{U_EMAIL}" title="{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}"><span>{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}</span></a></li><!-- ENDIF --> - <!-- IF U_WWW --><li class="web-icon"><a href="{U_WWW}" title="{L_VISIT_WEBSITE}{L_COLON} {U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF --> - <!-- IF U_MSN --><li class="msnm-icon"><a href="{U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF --> - <!-- IF U_ICQ --><li class="icq-icon"><a href="{U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF --> - <!-- IF U_YIM --><li class="yahoo-icon"><a href="{U_YIM}" onclick="popup(this.href, 780, 550); return false;" title="{L_YIM}"><span>{L_YIM}</span></a></li><!-- ENDIF --> - <!-- IF U_AIM --><li class="aim-icon"><a href="{U_AIM}" onclick="popup(this.href, 550, 320); return false;" title="{L_AIM}"><span>{L_AIM}</span></a></li><!-- ENDIF --> <!-- IF U_JABBER --><li class="jabber-icon"><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF --> + <!-- BEGIN custom_fields --> + <!-- IF custom_fields.S_PROFILE_CONTACT --> + <li class="{custom_fields.PROFILE_FIELD_IDENT}-icon"> + <a href="<!-- IF custom_fields.PROFILE_FIELD_CONTACT -->{custom_fields.PROFILE_FIELD_CONTACT}<!-- ELSE -->{U_MESSAGE_AUTHOR}<!-- ENDIF -->"> + <span>{custom_fields.PROFILE_FIELD_NAME}</span> + </a> + </li> + <!-- ENDIF --> + <!-- END custom_fields --> + <!-- EVENT ucp_pm_viewmessage_contact_fields_after --> </ul> </dd> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html index 03b8aa0a14..b8ba163d3b 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html +++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html @@ -10,30 +10,6 @@ <fieldset> <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF --> - <dl> - <dt><label for="icq">{L_UCP_ICQ}{L_COLON}</label></dt> - <dd><input type="text" name="icq" id="icq" maxlength="15" value="{ICQ}" class="inputbox" /></dd> - </dl> - <dl> - <dt><label for="aim">{L_UCP_AIM}{L_COLON}</label></dt> - <dd><input type="text" name="aim" id="aim" maxlength="255" value="{AIM}" class="inputbox" /></dd> - </dl> - <dl> - <dt><label for="msn">{L_UCP_MSNM}{L_COLON}</label></dt> - <dd><input type="email" name="msn" id="msn" maxlength="255" value="{MSN}" class="inputbox" /></dd> - </dl> - <dl> - <dt><label for="yim">{L_UCP_YIM}{L_COLON}</label></dt> - <dd><input type="text" name="yim" id="yim" maxlength="255" value="{YIM}" class="inputbox" /></dd> - </dl> - <dl> - <dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt> - <dd><input type="email" name="jabber" id="jabber" maxlength="255" value="{JABBER}" class="inputbox" /></dd> - </dl> - <dl> - <dt><label for="website">{L_WEBSITE}{L_COLON}</label></dt> - <dd><input type="url" name="website" id="website" maxlength="255" value="{WEBSITE}" class="inputbox" /></dd> - </dl> <!-- IF S_BIRTHDAYS_ENABLED --> <dl> <dt><label for="bday_day">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt> @@ -44,6 +20,10 @@ </dd> </dl> <!-- ENDIF --> + <dl> + <dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt> + <dd><input type="email" name="jabber" id="jabber" maxlength="255" value="{JABBER}" class="inputbox" /></dd> + </dl> <!-- BEGIN profile_fields --> <dl> <dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}{L_COLON}<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label> diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index d5c45e1dfe..2a3962d21e 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -137,22 +137,28 @@ <!-- EVENT viewtopic_body_postrow_custom_fields_before --> <!-- BEGIN custom_fields --> - <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd> + <!-- IF not postrow.custom_fields.S_PROFILE_CONTACT --> + <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd> + <!-- ENDIF --> <!-- END custom_fields --> <!-- EVENT viewtopic_body_postrow_custom_fields_after --> <!-- IF not S_IS_BOT --> - <!-- IF postrow.U_PM or postrow.U_EMAIL or postrow.U_WWW or postrow.U_MSN or postrow.U_ICQ or postrow.U_YIM or postrow.U_AIM or postrow.U_JABBER --> + <!-- IF postrow.U_PM or postrow.U_EMAIL or postrow.U_JABBER --> <dd> <ul class="profile-icons"> <!-- IF postrow.U_PM --><li class="pm-icon"><a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF --> <!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}"><span>{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}</span></a></li><!-- ENDIF --> - <!-- IF postrow.U_WWW --><li class="web-icon"><a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}{L_COLON} {postrow.U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF --> - <!-- IF postrow.U_MSN --><li class="msnm-icon"><a href="{postrow.U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF --> - <!-- IF postrow.U_ICQ --><li class="icq-icon"><a href="{postrow.U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF --> - <!-- IF postrow.U_YIM --><li class="yahoo-icon"><a href="{postrow.U_YIM}" onclick="popup(this.href, 780, 550); return false;" title="{L_YIM}"><span>{L_YIM}</span></a></li><!-- ENDIF --> - <!-- IF postrow.U_AIM --><li class="aim-icon"><a href="{postrow.U_AIM}" onclick="popup(this.href, 550, 320); return false;" title="{L_AIM}"><span>{L_AIM}</span></a></li><!-- ENDIF --> <!-- IF postrow.U_JABBER --><li class="jabber-icon"><a href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF --> + <!-- BEGIN custom_fields --> + <!-- IF postrow.custom_fields.S_PROFILE_CONTACT --> + <li class="{postrow.custom_fields.PROFILE_FIELD_IDENT}-icon"> + <a href="<!-- IF postrow.custom_fields.PROFILE_FIELD_CONTACT -->{postrow.custom_fields.PROFILE_FIELD_CONTACT}<!-- ELSE -->{postrow.U_POST_AUTHOR}<!-- ENDIF -->"> + <span>{postrow.custom_fields.PROFILE_FIELD_NAME}</span> + </a> + </li> + <!-- ENDIF --> + <!-- END custom_fields --> </ul> </dd> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index 57d9a33c12..4e71dc4de4 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -849,7 +849,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { padding-right: 11px; padding-left: 0; } -.rtl .imageset.icon_contact_aim, .rtl .imageset.icon_contact_email, .rtl .imageset.icon_contact_icq, .rtl .imageset.icon_contact_jabber, .rtl .imageset.icon_contact_msnm, .rtl .imageset.icon_contact_www, .rtl .imageset.icon_contact_yahoo, .rtl .imageset.icon_post_delete, .rtl .imageset.icon_post_info, .rtl .imageset.icon_post_report, .rtl .imageset.icon_user_warn { +.rtl .imageset.icon_contact_aim, .rtl .imageset.phpbb_aol-icon, .rtl .imageset.icon_contact_email, .rtl .imageset.icon_contact_icq, .rtl .imageset.phpbb_icq-icon, .rtl .imageset.icon_contact_jabber, .rtl .imageset.icon_contact_msnm, .rtl .imageset.phpbb_wlm-icon, .rtl .imageset.icon_contact_www, .rtl .imageset.phpbb_website-icon, .rtl .imageset.icon_contact_yahoo, .rtl .imageset.phpbb_yahoo-icon, .rtl .imageset.icon_post_delete, .rtl .imageset.icon_post_info, .rtl .imageset.icon_post_report, .rtl .imageset.icon_user_warn { padding-right: 20px; padding-left: 0; } diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index 89fdcd85a8..68d827b974 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -238,10 +238,15 @@ ul.profile-icons.responsive a.responsive-menu-link:before { /* Profile & navigation icons */ .email-icon, .email-icon a { background: none top left no-repeat; } .aim-icon, .aim-icon a { background: none top left no-repeat; } +.phpbb_aol-icon, .phpbb_aol-icon a { background: none top left no-repeat; } .yahoo-icon, .yahoo-icon a { background: none top left no-repeat; } +.phpbb_yahoo-icon, .phpbb_yahoo-icon a { background: none top left no-repeat; } .web-icon, .web-icon a { background: none top left no-repeat; } +.phpbb_website-icon, .phpbb_website-icon a { background: none top left no-repeat; } .msnm-icon, .msnm-icon a { background: none top left no-repeat; } +.phpbb_wlm-icon, .phpbb_wlm-icon a { background: none top left no-repeat; } .icq-icon, .icq-icon a { background: none top left no-repeat; } +.phpbb_icq-icon, .phpbb_icq-icon a { background: none top left no-repeat; } .jabber-icon, .jabber-icon a { background: none top left no-repeat; } .pm-icon, .pm-icon a { background: none top left no-repeat; } .quote-icon, .quote-icon a { background: none top left no-repeat; } @@ -255,11 +260,16 @@ ul.profile-icons.responsive a.responsive-menu-link:before { /* Set profile icon dimensions */ ul.profile-icons li.email-icon { width: 20px; height: 20px; } +ul.profile-icons li.phpbb_aol-icon { width: 20px; height: 20px; } ul.profile-icons li.aim-icon { width: 20px; height: 20px; } ul.profile-icons li.yahoo-icon { width: 20px; height: 20px; } +ul.profile-icons li.phpbb_yahoo-icon { width: 20px; height: 20px; } ul.profile-icons li.web-icon { width: 20px; height: 20px; } +ul.profile-icons li.phpbb_website-icon { width: 20px; height: 20px; } ul.profile-icons li.msnm-icon { width: 20px; height: 20px; } +ul.profile-icons li.phpbb_wlm-icon { width: 20px; height: 20px; } ul.profile-icons li.icq-icon { width: 20px; height: 20px; } +ul.profile-icons li.phpbb_icq-icon { width: 20px; height: 20px; } ul.profile-icons li.jabber-icon { width: 20px; height: 20px; } ul.profile-icons li.pm-icon { width: 28px; height: 20px; } ul.profile-icons li.quote-icon { width: 54px; height: 20px; } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 1d4c657a14..4ccc232e86 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -739,11 +739,16 @@ a.sendemail { /* Profile & navigation icons */ .email-icon, .email-icon a { background-image: url("./images/icon_contact_email.gif"); } +.phpbb_aol-icon, .phpbb_aol-icon a { background-image: url("./images/icon_contact_aim.gif"); } .aim-icon, .aim-icon a { background-image: url("./images/icon_contact_aim.gif"); } .yahoo-icon, .yahoo-icon a { background-image: url("./images/icon_contact_yahoo.gif"); } +.phpbb_yahoo-icon, .phpbb_yahoo-icon a { background-image: url("./images/icon_contact_yahoo.gif"); } .web-icon, .web-icon a { background-image: url("./images/icon_contact_www.gif"); } +.phpbb_website-icon, .phpbb_website-icon a { background-image: url("./images/icon_contact_www.gif"); } .msnm-icon, .msnm-icon a { background-image: url("./images/icon_contact_msnm.gif"); } +.phpbb_wlm-icon, .phpbb_wlm-icon a { background-image: url("./images/icon_contact_msnm.gif"); } .icq-icon, .icq-icon a { background-image: url("./images/icon_contact_icq.gif"); } +.phpbb_icq-icon, .phpbb_icq-icon a { background-image: url("./images/icon_contact_icq.gif"); } .jabber-icon, .jabber-icon a { background-image: url("./images/icon_contact_jabber.gif"); } .pm-icon, .pm-icon a { background-image: url("./en/icon_contact_pm.gif"); } .quote-icon, .quote-icon a { background-image: url("./en/icon_post_quote.gif"); } diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 84f6859936..d19b967771 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -812,16 +812,15 @@ li.pagination ul { ---------------------------------------- */ .phpbb_alert { border: 1px solid transparent; - position: fixed; display: none; + left: 0; + padding: 0 25px 20px 25px; + position: fixed; + right: 0; top: 150px; - left: 0; - right: 0; - max-width: 640px; - margin: 0 auto; z-index: 50; - padding: 25px; - padding: 0 25px 20px 25px; + width: 620px; + margin: 0 auto; } @media only screen and (max-height: 500px), only screen and (max-device-width: 500px) diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css index bf235b3fb5..61df82c0ce 100644 --- a/phpBB/styles/prosilver/theme/cp.css +++ b/phpBB/styles/prosilver/theme/cp.css @@ -357,6 +357,8 @@ ul.cplist { /* Friends list */ .cp-mini { margin: 10px 15px 10px 5px; + max-height: 200px; + overflow-y: auto; padding: 5px 10px; border-radius: 7px; } diff --git a/phpBB/styles/prosilver/theme/imageset.css b/phpBB/styles/prosilver/theme/imageset.css index 7aa19df06e..e6d306c7fd 100644 --- a/phpBB/styles/prosilver/theme/imageset.css +++ b/phpBB/styles/prosilver/theme/imageset.css @@ -260,7 +260,7 @@ span.imageset { padding-left: 11px; padding-top: 11px; } -.imageset.icon_contact_aim { +.imageset.phpbb_aol-icon, .imageset.icon_contact_aim { background-image: url("./images/icon_contact_aim.gif"); padding-left: 20px; padding-top: 20px; @@ -270,7 +270,7 @@ span.imageset { padding-left: 20px; padding-top: 20px; } -.imageset.icon_contact_icq { +.imageset.icon_contact_icq, .imageset.phpbb_icq-icon { background-image: url("./images/icon_contact_icq.gif"); padding-left: 20px; padding-top: 20px; @@ -280,17 +280,17 @@ span.imageset { padding-left: 20px; padding-top: 20px; } -.imageset.icon_contact_msnm { +.imageset.phpbb_wlm-icon, .imageset.icon_contact_msnm { background-image: url("./images/icon_contact_msnm.gif"); padding-left: 20px; padding-top: 20px; } -.imageset.icon_contact_www { +.imageset.icon_contact_www, .imageset.phpbb_website-icon { background-image: url("./images/icon_contact_www.gif"); padding-left: 20px; padding-top: 20px; } -.imageset.icon_contact_yahoo { +.imageset.icon_contact_yahoo, .imageset.phpbb_yahoo-icon { background-image: url("./images/icon_contact_yahoo.gif"); padding-left: 20px; padding-top: 20px; diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index a6bc52db52..7e4caf5301 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -495,8 +495,8 @@ fieldset.display-actions { } .phpbb_alert { - max-width: none; - margin: 0 25px; + width: auto; + margin: 0 5px; } .attach-comment dfn { diff --git a/phpBB/styles/subsilver2/template/custom_profile_fields.html b/phpBB/styles/subsilver2/template/custom_profile_fields.html deleted file mode 100644 index 3dabedda06..0000000000 --- a/phpBB/styles/subsilver2/template/custom_profile_fields.html +++ /dev/null @@ -1,31 +0,0 @@ -<!-- BEGIN dropdown --> - <select name="{dropdown.FIELD_IDENT}"> - <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options --> - </select> -<!-- END dropdown --> - -<!-- BEGIN text --> - <textarea name="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea> -<!-- END text --> - -<!-- BEGIN string --> - <input type="text" class="post" name="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" /> -<!-- END string --> - -<!-- BEGIN bool --> - <!-- IF bool.FIELD_LENGTH eq 1 --> - <!-- BEGIN options --><input type="radio" class="radio" name="{bool.FIELD_IDENT}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /><span class="genmed">{bool.options.VALUE}</span> <!-- END options --> - <!-- ELSE --> - <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" value="1"<!-- IF bool.FIELD_VALUE eq 1 --> checked="checked"<!-- ENDIF --> /> - <!-- ENDIF --> -<!-- END bool --> - -<!-- BEGIN int --> - <input type="number" min="{int.FIELD_MINLEN}" max="{int.FIELD_MAXLEN}" class="post" name="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" /> -<!-- END int --> - -<!-- BEGIN date --> - <span class="genmed">{L_DAY}{L_COLON}</span> <select name="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select> - <span class="genmed">{L_MONTH}{L_COLON}</span> <select name="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select> - <span class="genmed">{L_YEAR}{L_COLON}</span> <select name="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select> -<!-- END date --> diff --git a/phpBB/styles/subsilver2/template/forumlist_body.html b/phpBB/styles/subsilver2/template/forumlist_body.html index a222607ae8..75646cd894 100644 --- a/phpBB/styles/subsilver2/template/forumlist_body.html +++ b/phpBB/styles/subsilver2/template/forumlist_body.html @@ -9,11 +9,13 @@ <th> {L_LAST_POST} </th> </tr> <!-- BEGIN forumrow --> + <!-- EVENT forumlist_body_category_header_before --> <!-- IF forumrow.S_IS_CAT --> <tr> <td class="cat" colspan="2"><h4><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></h4></td> <td class="catdiv" colspan="3"> </td> </tr> + <!-- EVENT forumlist_body_category_header_after --> <!-- ELSEIF forumrow.S_IS_LINK --> <tr> <td class="row1" width="50" align="center">{forumrow.FORUM_FOLDER_IMG}</td> @@ -49,11 +51,13 @@ <p class="forumdesc"><strong>{forumrow.L_MODERATOR_STR}{L_COLON}</strong> {forumrow.MODERATORS}</p> <!-- ENDIF --> <!-- IF .forumrow.subforum and forumrow.S_LIST_SUBFORUMS --> + <!-- EVENT forumlist_body_subforums_before --> <p class="forumdesc"><strong>{forumrow.L_SUBFORUM_STR}</strong> <!-- BEGIN subforum --> - <a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->,<!-- ENDIF --> + <a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --> <!-- END subforum --> </p> + <!-- EVENT forumlist_body_subforums_after --> <!-- ENDIF --> </td> <td class="row2" align="center"><p class="topicdetails">{forumrow.TOPICS}</p></td> diff --git a/phpBB/styles/subsilver2/template/mcp_header.html b/phpBB/styles/subsilver2/template/mcp_header.html index 9b9f7849f4..7144750ed4 100644 --- a/phpBB/styles/subsilver2/template/mcp_header.html +++ b/phpBB/styles/subsilver2/template/mcp_header.html @@ -58,20 +58,3 @@ <br /> <!-- ENDIF --> - - <!-- IF CONFIRM_MESSAGE --> - <form name="confirm" method="post" action="{S_CONFIRM_ACTION}"> - - <table class="tablebg" width="100%" cellspacing="1"> - <tr> - <th>{L_PLEASE_CONFIRM}</th> - </tr> - <tr> - <td class="row1" align="center"><span class="gen"><br />{CONFIRM_MESSAGE}<br /><br />{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="confirm" value="{L_YES}" /> <input class="btnlite" type="submit" name="cancel" value="{L_NO}" /><br /><br /></span></td> - </tr> - </table> - - </form> - - <br /> - <!-- ENDIF --> diff --git a/phpBB/styles/subsilver2/template/memberlist_body.html b/phpBB/styles/subsilver2/template/memberlist_body.html index 7c4d301de7..ecfb4b69c5 100644 --- a/phpBB/styles/subsilver2/template/memberlist_body.html +++ b/phpBB/styles/subsilver2/template/memberlist_body.html @@ -45,7 +45,6 @@ <th nowrap="nowrap" width="15%"><a href="{U_SORT_RANK}">{L_RANK}</a></th> <th nowrap="nowrap" width="11%">{L_SEND_MESSAGE}</th> <th nowrap="nowrap" width="11%"><a href="{U_SORT_EMAIL}">{L_EMAIL}</a></th> - <th nowrap="nowrap" width="11%"><a href="{U_SORT_WEBSITE}">{L_WEBSITE}</a></th> <!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><th width="2%" nowrap="nowrap">{L_MARK}</th><!-- ENDIF --> </tr> <!-- BEGIN memberrow --> @@ -72,7 +71,6 @@ <td class="gen" align="center"><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --></td> <td class="gen" align="center"> <!-- IF memberrow.U_PM --><a href="{memberrow.U_PM}" class="imageset">{PM_IMG}</a><!-- ENDIF --> </td> <td class="gen" align="center"> <!-- IF memberrow.U_EMAIL --><a href="{memberrow.U_EMAIL}" class="imageset">{EMAIL_IMG}</a><!-- ENDIF --> </td> - <td class="gen" align="center"> <!-- IF memberrow.U_WWW --><a href="{memberrow.U_WWW}" class="imageset">{WWW_IMG}</a><!-- ENDIF --> </td> <!-- IF memberrow.S_PROFILE_FIELD1 --> <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. --> <td class="gen" align="center"> {memberrow.PROFILE_FIELD1_VALUE}</td> diff --git a/phpBB/styles/subsilver2/template/memberlist_im.html b/phpBB/styles/subsilver2/template/memberlist_im.html index da1ad661c3..a19229605a 100644 --- a/phpBB/styles/subsilver2/template/memberlist_im.html +++ b/phpBB/styles/subsilver2/template/memberlist_im.html @@ -2,8 +2,6 @@ <br clear="all" /> -<!-- MSNM info from http://www.cdolive.net/ - doesn't seem to work with MSN Messenger --> - <form method="post" action="{S_IM_ACTION}"> <table class="tablebg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> @@ -14,97 +12,9 @@ </tr> <tr> <td class="row1"><b class="genmed">{L_IM_RECIPIENT}{L_COLON} </b></td> - <td class="row2"><span class="gen"><b>{USERNAME}</b><!-- IF S_SEND_ICQ or S_SEND_AIM or S_SEND_MSNM or S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --></span> <!-- IF PRESENCE_IMG -->{PRESENCE_IMG}<!-- ENDIF --></td> + <td class="row2"><span class="gen"><b>{USERNAME}</b><!-- IF S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --></span> <!-- IF PRESENCE_IMG -->{PRESENCE_IMG}<!-- ENDIF --></td> </tr> - <!-- IF S_SEND_AIM --> - <tr> - <td class="row1" colspan="2" align="center"><br /><a class="gen" href="{U_AIM_CONTACT}">{L_IM_ADD_CONTACT}</a><br /><a class="gen" href="{U_AIM_MESSAGE}">{L_IM_SEND_MESSAGE}</a><br /><br /><a class="gensmall" href="http://www.aim.com">{L_IM_DOWNLOAD_APP}</a> | <a class="gensmall" href="http://www.aim.com/products/express">{L_IM_AIM_EXPRESS}</a> </td> - </tr> - <tr> - <td class="cat" colspan="2" align="center"> </td> - </tr> - <!-- ENDIF --> - - <!-- IF S_SEND_MSNM --> - <tr> - <td class="row1" colspan="2" align="center"> - <object classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28" codetype="application/x-oleobject" id="objMessengerApp" width="0" height="0"></object> - <script type="text/javascript"> - // <![CDATA[ - var app = document.getElementById('objMessengerApp'); - - /** - * Check whether the browser supports this and whether MSNM is connected - */ - function msn_supported() - { - // Does the browser support the MSNM object? - if (app.MyStatus) - { - // Is MSNM connected? - if (app.MyStatus == 1) - { - alert('{LA_IM_MSNM_CONNECT}'); - return false; - } - } - else - { - alert('{LA_IM_MSNM_BROWSER}'); - return false; - } - return true; - } - - /** - * Add to your contact list - */ - function add_contact(address) - { - if (msn_supported()) - { - // Could return an error while MSNM is connecting, don't want that - try - { - app.AddContact(0, address); - } - catch (e) - { - return; - } - } - } - - /** - * Write IM to contact - */ - function im_contact(address) - { - if (msn_supported()) - { - // Could return an error while MSNM is connecting, don't want that - try - { - app.InstantMessage(address); - } - catch (e) - { - return; - } - } - } - // ]]> - </script> - - <a class="gen" href="#" onclick="add_contact('{A_IM_CONTACT}'); return false;">{L_IM_ADD_CONTACT}</a><br /><a class="gen" href="#" onclick="im_contact('{A_IM_CONTACT}'); return false;">{L_IM_SEND_MESSAGE}</a> - </td> - </tr> - <tr> - <td class="cat" colspan="2" align="center"> </td> - </tr> - <!-- ENDIF --> - <!-- IF S_SEND_JABBER --> <tr> <td class="row1"><b class="genmed">{L_IM_MESSAGE}{L_COLON} </b></td> @@ -113,21 +23,16 @@ <tr> <td class="cat" colspan="2" align="center"><input class="btnmain" name="submit" type="submit" value="{L_IM_SEND}" /></td> </tr> - <!-- ENDIF --> - - <!-- IF S_NO_SEND_JABBER --> - <tr> - <td class="row1" colspan="2"><span class="genmed">{L_IM_NO_JABBER}</span></td> - </tr> - <!-- ENDIF --> - - <!-- IF S_SENT_JABBER --> <tr> <td class="row1" colspan="2" align="center"><span class="gen">{L_IM_SENT_JABBER}</span></td> </tr> <tr> <td class="cat" colspan="2" align="center"></td> </tr> + <!-- ELSEIF S_NO_SEND_JABBER --> + <tr> + <td class="row1" colspan="2"><span class="genmed">{L_IM_NO_JABBER}</span></td> + </tr> <!-- ENDIF --> </table> diff --git a/phpBB/styles/subsilver2/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html index 484bbd85e8..aa6b61fe22 100644 --- a/phpBB/styles/subsilver2/template/memberlist_search.html +++ b/phpBB/styles/subsilver2/template/memberlist_search.html @@ -76,59 +76,42 @@ <tr> <td class="row1"><b class="genmed">{L_USERNAME}{L_COLON}</b></td> <td class="row2"><input class="post" type="text" name="username" value="{USERNAME}" /></td> - <td class="row1"><b class="genmed">{L_ICQ}{L_COLON}</b></td> - <td class="row2"><input class="post" type="text" name="icq" value="{ICQ}" /></td> -</tr> -<tr> -<!-- IF S_EMAIL_SEARCH_ALLOWED --> - <td class="row1"><b class="genmed">{L_EMAIL}{L_COLON}</b></td> - <td class="row2"><input class="post" type="email" name="email" value="{EMAIL}" /></td> -<!-- ELSE --> - <td colspan="2" class="row1"> </td> -<!-- ENDIF --> - <td class="row1"><b class="genmed">{L_AIM}{L_COLON}</b></td> - <td class="row2"><input class="post" type="text" name="aim" value="{AIM}" /></td> + <!-- IF S_EMAIL_SEARCH_ALLOWED --> + <td class="row1"><b class="genmed">{L_EMAIL}{L_COLON}</b></td> + <td class="row2"><input class="post" type="email" name="email" value="{EMAIL}" /></td> + <!-- ELSE --> + <td colspan="2" class="row1"> </td> + <!-- ENDIF --> </tr> <tr> <td class="row1"><b class="genmed">{L_JOINED}{L_COLON}</b></td> <td class="row2"><select name="joined_select">{S_JOINED_TIME_OPTIONS}</select> <input class="post" type="text" name="joined" value="{JOINED}" /></td> - <td class="row1"><b class="genmed">{L_YIM}{L_COLON}</b></td> - <td class="row2"><input class="post" type="text" name="yahoo" value="{YAHOO}" /></td> + <td class="row1"><b class="genmed">{L_POSTS}{L_COLON}</b></td> + <td class="row2"><select name="count_select">{S_COUNT_OPTIONS}</select> <input class="post" type="number" min="0" name="count" value="{COUNT}" /></td> </tr> -<tr> <!-- IF S_VIEWONLINE --> +<tr> <td class="row1"><b class="genmed">{L_LAST_ACTIVE}{L_COLON}</b></td> <td class="row2"><select name="active_select">{S_ACTIVE_TIME_OPTIONS}</select> <input class="post" type="text" name="active" value="{ACTIVE}" /></td> -<!-- ELSE --> - <td colspan="2" class="row1"> </td> -<!-- ENDIF --> - <td class="row1"><b class="genmed">{L_MSNM}{L_COLON}</b></td> - <td class="row2"><input class="post" type="text" name="msn" value="{MSNM}" /></td> + <!-- IF S_IP_SEARCH_ALLOWED --> + <td class="row1"><b class="genmed">{L_POST_IP}{L_COLON}</b></td> + <td class="row2"><input class="post" type="text" name="ip" value="{IP}" /></td> + <!-- ELSE --> + <td colspan="2" class="row1"> </td> + <!-- ENDIF --> </tr> +<!-- ENDIF --> <tr> - <td class="row1"><b class="genmed">{L_POSTS}{L_COLON}</b></td> - <td class="row2"><select name="count_select">{S_COUNT_OPTIONS}</select> <input class="post" type="number" min="0" name="count" value="{COUNT}" /></td> + <td class="row1"><b class="genmed">{L_GROUP}{L_COLON}</b></td> + <td class="row2" nowrap="nowrap"><select name="search_group_id">{S_GROUP_SELECT}</select></td> <td class="row1"><b class="genmed">{L_JABBER}{L_COLON}</b></td> <td class="row2"><input class="post" type="text" name="jabber" value="{JABBER}" /></td> </tr> <tr> <td class="row1"><b class="genmed">{L_SORT_BY}{L_COLON}</b></td> <td class="row2" nowrap="nowrap"><select name="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select> </td> -<!-- IF S_IP_SEARCH_ALLOWED --> - <td class="row1"><b class="genmed">{L_POST_IP}{L_COLON}</b></td> - <td class="row2"><input class="post" type="text" name="ip" value="{IP}" /></td> -</tr> -<tr> - <td class="row1"><b class="genmed">{L_GROUP}{L_COLON}</b></td> - <td class="row2" nowrap="nowrap"><select name="search_group_id">{S_GROUP_SELECT}</select></td> - <td class="row1"> </td> - <td class="row2"> </td> -</tr> -<!-- ELSE --> - <td class="row1"><b class="genmed">{L_GROUP}{L_COLON}</b></td> - <td class="row2" nowrap="nowrap"><select name="search_group_id">{S_GROUP_SELECT}</select></td> + <td colspan="2" class="row1"> </td> </tr> -<!-- ENDIF --> <tr> <td class="cat" colspan="4" align="center"><input class="btnmain" type="submit" name="submit" value="{L_SEARCH}" /> <input class="btnlite" type="reset" value="{L_RESET}" /></td> </tr> diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 40d61dddd9..28f4da4fef 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -119,25 +119,21 @@ </tr> <!-- ENDIF --> <tr> - <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_MSNM}{L_COLON} </td> - <td><!-- IF U_MSN --><a href="{U_MSN}" onclick="popup(this.href, 550, 320); return false" class="imageset">{MSN_IMG}</a><!-- ELSEIF USER_MSN -->{USER_MSN}<!-- ENDIF --></td> - </tr> - <tr> - <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_YIM}{L_COLON} </td> - <td><!-- IF U_YIM --><a href="{U_YIM}" onclick="popup(this.href, 780, 550); return false" class="imageset">{YIM_IMG}</a><!-- ELSEIF USER_YIM -->{USER_YIM}<!-- ENDIF --></td> - </tr> - <tr> - <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_AIM}{L_COLON} </td> - <td><!-- IF U_AIM --><a href="{U_AIM}" onclick="popup(this.href, 550, 320); return false" class="imageset">{AIM_IMG}</a><!-- ELSEIF USER_AIM -->{USER_AIM}<!-- ENDIF --></td> - </tr> - <tr> - <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_ICQ}{L_COLON} </td> - <td><!-- IF U_ICQ --><a href="{U_ICQ}" onclick="popup(this.href, 550, 320); return false" class="imageset">{ICQ_IMG}</a><!-- ELSEIF USER_ICQ -->{USER_ICQ}<!-- ENDIF --></td> - </tr> - <tr> <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_JABBER}{L_COLON} </td> <td><!-- IF U_JABBER --><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false" class="imageset">{JABBER_IMG}</a><!-- ELSEIF USER_JABBER -->{USER_JABBER_IMG}<!-- ENDIF --></td> </tr> + <!-- BEGIN custom_fields --> + <!-- IF custom_fields.S_PROFILE_CONTACT --> + <tr> + <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{custom_fields.PROFILE_FIELD_NAME}{L_COLON} </td> + <!-- IF custom_fields.PROFILE_FIELD_CONTACT --> + <td><a href="{custom_fields.PROFILE_FIELD_CONTACT}"><span class="imageset {custom_fields.PROFILE_FIELD_IDENT}-icon">{custom_fields.PROFILE_FIELD_DESC}</span></a></td> + <!-- ELSE --> + <td><b class="genmed">{custom_fields.PROFILE_FIELD_VALUE}</b></td> + <!-- ENDIF --> + </tr> + <!-- ENDIF --> + <!-- END custom_fields --> </table> </td> <td class="row1"> @@ -152,10 +148,6 @@ <td><b class="genmed">{AGE}</b></td> </tr> <!-- ENDIF --> - <tr> - <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_WEBSITE}{L_COLON} </td> - <td><!-- IF U_WWW --><b><a class="genmed" href="{U_WWW}">{U_WWW}</a></b><!-- ENDIF --></td> - </tr> <!-- IF S_PROFILE_FIELD1 --> <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. --> <tr> @@ -164,10 +156,12 @@ </tr> <!-- ENDIF --> <!-- BEGIN custom_fields --> + <!-- IF not custom_fields.S_PROFILE_CONTACT --> <tr> <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{custom_fields.PROFILE_FIELD_NAME}{L_COLON} </td> <td><b class="genmed">{custom_fields.PROFILE_FIELD_VALUE}</b></td> </tr> + <!-- ENDIF --> <!-- END custom_fields --> </table> </td> diff --git a/phpBB/styles/subsilver2/template/posting_buttons.html b/phpBB/styles/subsilver2/template/posting_buttons.html index 2c60913fc0..d1c0f79a16 100644 --- a/phpBB/styles/subsilver2/template/posting_buttons.html +++ b/phpBB/styles/subsilver2/template/posting_buttons.html @@ -38,26 +38,26 @@ <!-- IF S_BBCODE_ALLOWED --> <!-- EVENT posting_editor_buttons_before --> <div id="core-bbcode-buttons"> - <input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" /> - <input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" /> - <input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode bbcode-b" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode bbcode-i" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode bbcode-u" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" /> <!-- IF S_BBCODE_QUOTE --> - <input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode bbcode-quote" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" /> <!-- ENDIF --> - <input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" /> - <input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" /> - <input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" /> - <input type="button" class="btnbbcode" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode bbcode-code" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode bbcode-list" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode bbcode-list-" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode bbcode-asterisk" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" /> <!-- IF S_BBCODE_IMG --> - <input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode bbcode-img" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" /> <!-- ENDIF --> <!-- IF S_LINKS_ALLOWED --> - <input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode bbcode-url" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" /> <!-- ENDIF --> <!-- IF S_BBCODE_FLASH --> - <input type="button" class="btnbbcode" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode bbcode-flash" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" /> <!-- ENDIF --> - <span class="genmed nowrap">{L_FONT_SIZE}{L_COLON} <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')"> + <span class="genmed nowrap">{L_FONT_SIZE}{L_COLON} <select class="gensmall bbcode-size" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')"> <option value="50">{L_FONT_TINY}</option> <option value="85">{L_FONT_SMALL}</option> <option value="100" selected="selected">{L_FONT_NORMAL}</option> @@ -78,7 +78,7 @@ <td colspan="2"> <div id="custom-bbcode-buttons"> <!-- BEGIN custom_tags --> - <input type="button" class="btnbbcode" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> /> + <input type="button" class="btnbbcode bbcode-{custom_tags.BBCODE_TAG_CLEAN}" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> /> <!-- END custom_tags --> </div> </td> diff --git a/phpBB/styles/subsilver2/template/profilefields/bool.html b/phpBB/styles/subsilver2/template/profilefields/bool.html new file mode 100644 index 0000000000..f57bd4e4da --- /dev/null +++ b/phpBB/styles/subsilver2/template/profilefields/bool.html @@ -0,0 +1,7 @@ +<!-- BEGIN bool --> + <!-- IF bool.FIELD_LENGTH eq 1 --> + <!-- BEGIN options --><input type="radio" class="radio" name="{bool.FIELD_IDENT}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /><span class="genmed">{bool.options.VALUE}</span> <!-- END options --> + <!-- ELSE --> + <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" value="1"<!-- IF bool.FIELD_VALUE eq 1 --> checked="checked"<!-- ENDIF --> /> + <!-- ENDIF --> +<!-- END bool --> diff --git a/phpBB/styles/subsilver2/template/profilefields/date.html b/phpBB/styles/subsilver2/template/profilefields/date.html new file mode 100644 index 0000000000..e2da2463a5 --- /dev/null +++ b/phpBB/styles/subsilver2/template/profilefields/date.html @@ -0,0 +1,5 @@ +<!-- BEGIN date --> +<span class="genmed">{L_DAY}{L_COLON}</span> <select name="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select> +<span class="genmed">{L_MONTH}{L_COLON}</span> <select name="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select> +<span class="genmed">{L_YEAR}{L_COLON}</span> <select name="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select> +<!-- END date --> diff --git a/phpBB/styles/subsilver2/template/profilefields/dropdown.html b/phpBB/styles/subsilver2/template/profilefields/dropdown.html new file mode 100644 index 0000000000..16242da895 --- /dev/null +++ b/phpBB/styles/subsilver2/template/profilefields/dropdown.html @@ -0,0 +1,5 @@ +<!-- BEGIN dropdown --> +<select name="{dropdown.FIELD_IDENT}"> + <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options --> +</select> +<!-- END dropdown --> diff --git a/phpBB/styles/subsilver2/template/profilefields/int.html b/phpBB/styles/subsilver2/template/profilefields/int.html new file mode 100644 index 0000000000..067921e320 --- /dev/null +++ b/phpBB/styles/subsilver2/template/profilefields/int.html @@ -0,0 +1,3 @@ +<!-- BEGIN int --> + <input type="number" min="{int.FIELD_MINLEN}" max="{int.FIELD_MAXLEN}" class="post" name="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" /> +<!-- END int --> diff --git a/phpBB/styles/subsilver2/template/profilefields/string.html b/phpBB/styles/subsilver2/template/profilefields/string.html new file mode 100644 index 0000000000..5a98562e2a --- /dev/null +++ b/phpBB/styles/subsilver2/template/profilefields/string.html @@ -0,0 +1,3 @@ +<!-- BEGIN string --> + <input type="text" class="post" name="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" /> +<!-- END string --> diff --git a/phpBB/styles/subsilver2/template/profilefields/text.html b/phpBB/styles/subsilver2/template/profilefields/text.html new file mode 100644 index 0000000000..df2474ad3e --- /dev/null +++ b/phpBB/styles/subsilver2/template/profilefields/text.html @@ -0,0 +1,3 @@ +<!-- BEGIN text --> +<textarea name="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea> +<!-- END text --> diff --git a/phpBB/styles/subsilver2/template/profilefields/url.html b/phpBB/styles/subsilver2/template/profilefields/url.html new file mode 100644 index 0000000000..42805aa98d --- /dev/null +++ b/phpBB/styles/subsilver2/template/profilefields/url.html @@ -0,0 +1,3 @@ +<!-- BEGIN url --> + <input type="url" class="post" name="{url.FIELD_IDENT}" id="{url.FIELD_IDENT}" size="{url.FIELD_LENGTH}" maxlength="{url.FIELD_MAXLEN}" value="{url.FIELD_VALUE}" /> +<!-- END url --> diff --git a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html index a565cac5ce..bf0aa8f899 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html @@ -13,29 +13,9 @@ <td class="row1" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td> </tr> <tr> - <td class="row1" width="35%"><b class="genmed">{L_UCP_ICQ}{L_COLON} </b></td> - <td class="row2"><input class="post" type="text" name="icq" size="30" maxlength="15" value="{ICQ}" /></td> -</tr> -<tr> - <td class="row1" width="35%"><b class="genmed">{L_UCP_AIM}{L_COLON} </b></td> - <td class="row2"><input class="post" type="text" name="aim" size="30" maxlength="255" value="{AIM}" /></td> -</tr> -<tr> - <td class="row1" width="35%"><b class="genmed">{L_UCP_MSNM}{L_COLON} </b></td> - <td class="row2"><input class="post" type="email" name="msn" size="30" maxlength="255" value="{MSN}" /></td> -</tr> -<tr> - <td class="row1" width="35%"><b class="genmed">{L_UCP_YIM}{L_COLON} </b></td> - <td class="row2"><input class="post" type="email" name="yim" size="30" maxlength="255" value="{YIM}" /></td> -</tr> -<tr> <td class="row1" width="35%"><b class="genmed">{L_UCP_JABBER}{L_COLON} </b></td> <td class="row2"><input class="post" type="text" name="jabber" size="30" maxlength="255" value="{JABBER}" /></td> </tr> -<tr> - <td class="row1" width="35%"><b class="genmed">{L_WEBSITE}{L_COLON} </b></td> - <td class="row2"><input class="post" type="url" name="website" size="30" maxlength="255" value="{WEBSITE}" /></td> -</tr> <!-- IF S_BIRTHDAYS_ENABLED --> <tr> <td class="row1" width="35%"><b class="genmed">{L_BIRTHDAY}{L_COLON} </b><br /><span class="gensmall">{L_BIRTHDAY_EXPLAIN}</span></td> diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index 9ba71d78bc..251983761c 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -210,7 +210,9 @@ <!-- EVENT viewtopic_body_postrow_custom_fields_before --> <!-- BEGIN custom_fields --> + <!-- IF not postrow.custom_fields.S_PROFILE_CONTACT --> <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON}</b> {postrow.custom_fields.PROFILE_FIELD_VALUE} + <!-- ENDIF --> <!-- END custom_fields --> <!-- EVENT viewtopic_body_postrow_custom_fields_after --> </span> diff --git a/phpBB/styles/subsilver2/theme/en/stylesheet.css b/phpBB/styles/subsilver2/theme/en/stylesheet.css index 563492d4fc..57f9fce26d 100644 --- a/phpBB/styles/subsilver2/theme/en/stylesheet.css +++ b/phpBB/styles/subsilver2/theme/en/stylesheet.css @@ -1,5 +1,5 @@ /* EN Language Pack */ -.imageset.icon_contact_aim { +.imageset.phpbb_aol-icon, .imageset.icon_contact_aim { background-image: url("./icon_contact_aim.gif"); padding-left: 72px; padding-top: 20px; @@ -9,7 +9,7 @@ padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_icq { +.imageset.phpbb_icq-icon, .imageset.icon_contact_icq { background-image: url("./icon_contact_icq.gif"); padding-left: 72px; padding-top: 20px; @@ -19,7 +19,7 @@ padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_msnm { +.imageset.phpbb_wlm-icon, .imageset.icon_contact_msnm { background-image: url("./icon_contact_msnm.gif"); padding-left: 72px; padding-top: 20px; @@ -29,12 +29,12 @@ padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_yahoo { +.imageset.phpbb_yahoo-icon, .imageset.icon_contact_yahoo { background-image: url("./icon_contact_yahoo.gif"); padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_www { +.imageset.phpbb_website-icon, .imageset.icon_contact_www { background-image: url("./icon_contact_www.gif"); padding-left: 72px; padding-top: 20px; diff --git a/phpBB/styles/subsilver2/theme/stylesheet.css b/phpBB/styles/subsilver2/theme/stylesheet.css index da99051329..11fc91af0c 100644 --- a/phpBB/styles/subsilver2/theme/stylesheet.css +++ b/phpBB/styles/subsilver2/theme/stylesheet.css @@ -1013,7 +1013,7 @@ a.imageset { /* English images for fallback */ -.imageset.icon_contact_aim { +.imageset.phpbb_aol-icon, .imageset.icon_contact_aim { background-image: url("./en/icon_contact_aim.gif"); padding-left: 72px; padding-top: 20px; @@ -1023,7 +1023,7 @@ a.imageset { padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_icq { +.imageset.phpbb_icq-icon, .imageset.icon_contact_icq { background-image: url("./en/icon_contact_icq.gif"); padding-left: 72px; padding-top: 20px; @@ -1033,7 +1033,7 @@ a.imageset { padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_msnm { +.imageset.phpbb_wlm-icon, .imageset.icon_contact_msnm { background-image: url("./en/icon_contact_msnm.gif"); padding-left: 72px; padding-top: 20px; @@ -1043,12 +1043,12 @@ a.imageset { padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_yahoo { +.imageset.phpbb_yahoo-icon, .imageset.icon_contact_yahoo { background-image: url("./en/icon_contact_yahoo.gif"); padding-left: 72px; padding-top: 20px; } -.imageset.icon_contact_www { +.imageset.phpbb_website-icon, .imageset.icon_contact_www { background-image: url("./en/icon_contact_www.gif"); padding-left: 72px; padding-top: 20px; diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index e02052a14d..ab72b34487 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -620,11 +620,6 @@ $template->assign_vars(array( 'SEARCH_IMG' => $user->img('icon_user_search', 'SEARCH_USER_POSTS'), 'PM_IMG' => $user->img('icon_contact_pm', 'SEND_PRIVATE_MESSAGE'), 'EMAIL_IMG' => $user->img('icon_contact_email', 'SEND_EMAIL'), - 'WWW_IMG' => $user->img('icon_contact_www', 'VISIT_WEBSITE'), - 'ICQ_IMG' => $user->img('icon_contact_icq', 'ICQ'), - 'AIM_IMG' => $user->img('icon_contact_aim', 'AIM'), - 'MSN_IMG' => $user->img('icon_contact_msnm', 'MSNM'), - 'YIM_IMG' => $user->img('icon_contact_yahoo', 'YIM'), 'JABBER_IMG' => $user->img('icon_contact_jabber', 'JABBER') , 'REPORT_IMG' => $user->img('icon_post_report', 'REPORT_POST'), 'REPORTED_IMG' => $user->img('icon_topic_reported', 'POST_REPORTED'), @@ -1117,12 +1112,6 @@ while ($row = $db->sql_fetchrow($result)) 'profile' => '', 'pm' => '', 'email' => '', - 'www' => '', - 'icq_status_img' => '', - 'icq' => '', - 'aim' => '', - 'msn' => '', - 'yim' => '', 'jabber' => '', 'search' => '', 'age' => '', @@ -1186,10 +1175,6 @@ while ($row = $db->sql_fetchrow($result)) 'online' => false, 'profile' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id"), - 'www' => $row['user_website'], - 'aim' => ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=aim&u=$poster_id") : '', - 'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=msnm&u=$poster_id") : '', - 'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&.src=pg' : '', 'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=jabber&u=$poster_id") : '', 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$poster_id&sr=posts") : '', @@ -1224,17 +1209,6 @@ while ($row = $db->sql_fetchrow($result)) $user_cache[$poster_id]['email'] = ''; } - if (!empty($row['user_icq'])) - { - $user_cache[$poster_id]['icq'] = 'http://www.icq.com/people/' . urlencode($row['user_icq']) . '/'; - $user_cache[$poster_id]['icq_status_img'] = '<img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" alt="" />'; - } - else - { - $user_cache[$poster_id]['icq_status_img'] = ''; - $user_cache[$poster_id]['icq'] = ''; - } - if ($config['allow_birthdays'] && !empty($row['user_birthday'])) { list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $row['user_birthday'])); @@ -1265,7 +1239,7 @@ if ($config['load_cpf_viewtopic']) $cp = $phpbb_container->get('profilefields.manager'); // Grab all profile fields from users in id cache for later use - similar to the poster cache - $profile_fields_tmp = $cp->generate_profile_fields_template('grab', $id_cache); + $profile_fields_tmp = $cp->grab_profile_fields_data($id_cache); // filter out fields not to be displayed on viewtopic. Yes, it's a hack, but this shouldn't break any MODs. $profile_fields_cache = array(); @@ -1575,7 +1549,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) // if ($config['load_cpf_viewtopic']) { - $cp_row = (isset($profile_fields_cache[$poster_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$poster_id]) : array(); + $cp_row = (isset($profile_fields_cache[$poster_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$poster_id]) : array(); } $post_unread = (isset($topic_tracking_info[$topic_id]) && $row['post_time'] > $topic_tracking_info[$topic_id]) ? true : false; @@ -1632,7 +1606,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'POST_ICON_IMG' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['img'] : '', 'POST_ICON_IMG_WIDTH' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['width'] : '', 'POST_ICON_IMG_HEIGHT' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['height'] : '', - 'ICQ_STATUS_IMG' => $user_cache[$poster_id]['icq_status_img'], 'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')), 'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false), @@ -1645,11 +1618,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_SEARCH' => $user_cache[$poster_id]['search'], 'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '', 'U_EMAIL' => $user_cache[$poster_id]['email'], - 'U_WWW' => $user_cache[$poster_id]['www'], - 'U_ICQ' => $user_cache[$poster_id]['icq'], - 'U_AIM' => $user_cache[$poster_id]['aim'], - 'U_MSN' => $user_cache[$poster_id]['msn'], - 'U_YIM' => $user_cache[$poster_id]['yim'], 'U_JABBER' => $user_cache[$poster_id]['jabber'], 'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p={$row['post_id']}&f=$forum_id&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url . '&p=' . $row['post_id'] . '#p' . $row['post_id']))), diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php index ac5377f2f6..23d6910843 100644 --- a/tests/auth/provider_apache_test.php +++ b/tests/auth/provider_apache_test.php @@ -193,12 +193,7 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case 'user_sig' => '', 'user_sig_bbcode_uid' => '', 'user_sig_bbcode_bitfield' => '', - 'user_icq' => '', - 'user_aim' => '', - 'user_yim' => '', - 'user_msnm' => '', 'user_jabber' => '', - 'user_website' => '', 'user_actkey' => '', 'user_newpasswd' => '', 'user_form_salt' => '', diff --git a/tests/functional/search/mysql_test.php b/tests/functional/search/mysql_test.php index 7af8051417..52a7b14f40 100644 --- a/tests/functional/search/mysql_test.php +++ b/tests/functional/search/mysql_test.php @@ -16,8 +16,4 @@ class phpbb_functional_search_mysql_test extends phpbb_functional_search_base { protected $search_backend = '\phpbb\search\fulltext_mysql'; - protected function assert_search_not_found($keywords) - { - $this->markTestIncomplete('MySQL search when fails doesn\'t show the search query'); - } } diff --git a/tests/functional/search/native_test.php b/tests/functional/search/native_test.php index ce568df616..512c6f2830 100644 --- a/tests/functional/search/native_test.php +++ b/tests/functional/search/native_test.php @@ -15,9 +15,4 @@ require_once dirname(__FILE__) . '/base.php'; class phpbb_functional_search_native_test extends phpbb_functional_search_base { protected $search_backend = '\phpbb\search\fulltext_native'; - - protected function assert_search_not_found($keywords) - { - $this->markTestIncomplete('Native search when fails doesn\'t show the search query'); - } } diff --git a/tests/functional/search/postgres_test.php b/tests/functional/search/postgres_test.php index 487b8aeebb..974b417659 100644 --- a/tests/functional/search/postgres_test.php +++ b/tests/functional/search/postgres_test.php @@ -16,8 +16,4 @@ class phpbb_functional_search_postgres_test extends phpbb_functional_search_base { protected $search_backend = '\phpbb\search\fulltext_postgres'; - protected function assert_search_not_found($keywords) - { - $this->markTestIncomplete('Postgres search when fails doesn\'t show the search query'); - } } diff --git a/tests/profile/get_profile_value_test.php b/tests/profile/get_profile_value_test.php new file mode 100644 index 0000000000..e867455a03 --- /dev/null +++ b/tests/profile/get_profile_value_test.php @@ -0,0 +1,42 @@ +<?php +/** +* +* @package testing +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +class phpbb_profile_get_profile_value_test extends phpbb_test_case +{ + static public function get_profile_value_int_data() + { + return array( + array('\phpbb\profilefields\type\type_int', '10', true, 10), + array('\phpbb\profilefields\type\type_int', '0', true, 0), + array('\phpbb\profilefields\type\type_int', '', true, 0), + array('\phpbb\profilefields\type\type_int', null, true, 0), + array('\phpbb\profilefields\type\type_int', '10', false, 10), + array('\phpbb\profilefields\type\type_int', '0', false, 0), + array('\phpbb\profilefields\type\type_int', '', false, null), + array('\phpbb\profilefields\type\type_int', null, false, null), + ); + } + + /** + * @dataProvider get_profile_value_int_data + */ + public function test_get_profile_value_int($type, $value, $show_novalue, $expected) + { + $cp = new $type( + $this->getMock('\phpbb\request\request'), + $this->getMock('\phpbb\template\template'), + $this->getMock('\phpbb\user') + ); + + $this->assertSame($expected, $cp->get_profile_value($value, array( + 'field_type' => $type, + 'field_show_novalue' => $show_novalue, + ))); + } +} diff --git a/tests/search/native_test.php b/tests/search/native_test.php index 18c6df2445..4911160cc0 100644 --- a/tests/search/native_test.php +++ b/tests/search/native_test.php @@ -106,17 +106,17 @@ class phpbb_search_native_test extends phpbb_search_test_case array( '-foo', 'all', - false, - null, - null, + true, + array(), + array(1), array(), ), array( '-foo -bar', 'all', - false, - null, - null, + true, + array(), + array(1, 2), array(), ), // all common diff --git a/tests/security/hash_test.php b/tests/security/hash_test.php index bc1bebd87a..32aa234316 100644 --- a/tests/security/hash_test.php +++ b/tests/security/hash_test.php @@ -7,7 +7,7 @@ * */ -require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions_compatibility.php'; class phpbb_security_hash_test extends phpbb_test_case { |