From d8510356d6a0f838017ae94bec1a5ed8254432da Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 18 Nov 2012 20:47:29 +0100 Subject: [PATCH] [feature/avatars] Add subsilver2 support This implementation might not be perfect though. PHPBB3-10018 --- phpBB/styles/subsilver2/template/avatars.js | 15 ++++ .../template/ucp_avatar_options_gravatar.html | 13 ++++ .../template/ucp_avatar_options_local.html | 29 ++++++++ .../template/ucp_avatar_options_remote.html | 10 +++ .../template/ucp_avatar_options_upload.html | 12 ++++ .../template/ucp_profile_avatar.html | 70 +++++-------------- 6 files changed, 98 insertions(+), 51 deletions(-) create mode 100644 phpBB/styles/subsilver2/template/avatars.js create mode 100644 phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html create mode 100644 phpBB/styles/subsilver2/template/ucp_avatar_options_local.html create mode 100644 phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html create mode 100644 phpBB/styles/subsilver2/template/ucp_avatar_options_upload.html diff --git a/phpBB/styles/subsilver2/template/avatars.js b/phpBB/styles/subsilver2/template/avatars.js new file mode 100644 index 0000000000..a9b2cc5722 --- /dev/null +++ b/phpBB/styles/subsilver2/template/avatars.js @@ -0,0 +1,15 @@ +(function($) { // Avoid conflicts with other libraries + +"use strict"; + +function avatar_simplify() { + $('.[class^="av_option_"]').hide(); + + var selected = $('#avatar_driver').val(); + $('.av_option_' + selected).show(); +} + +avatar_simplify(); +$('#avatar_driver').bind('change', avatar_simplify); + +})(jQuery); // Avoid conflicts with other libraries diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html new file mode 100644 index 0000000000..9bf8a3fc39 --- /dev/null +++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html @@ -0,0 +1,13 @@ + + + + + + + + + +
{L_GRAVATAR_AVATAR_EMAIL}{L_COLON}
{L_GRAVATAR_AVATAR_EMAIL_EXPLAIN}
{L_GRAVATAR_AVATAR_SIZE}{L_COLON}
{L_GRAVATAR_AVATAR_SIZE_EXPLAIN}
+ {L_PIXEL} ×  + {L_PIXEL} +
diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html new file mode 100644 index 0000000000..37ac864b27 --- /dev/null +++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html @@ -0,0 +1,29 @@ + + + + + + + +
{L_AVATAR_CATEGORY}{L_COLON}   +
+ + + + + + + + + + + + + +
{av_local_col.av_local_col.AVATAR_NAME}
+
diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html new file mode 100644 index 0000000000..8fe7201953 --- /dev/null +++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html @@ -0,0 +1,10 @@ + + + + + + + + + +
{L_LINK_REMOTE_AVATAR}{L_COLON}
{L_LINK_REMOTE_AVATAR_EXPLAIN}
{L_LINK_REMOTE_SIZE}{L_COLON}
{L_LINK_REMOTE_SIZE_EXPLAIN}
{L_PIXEL} × {L_PIXEL}
diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_upload.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_upload.html new file mode 100644 index 0000000000..e76abc0433 --- /dev/null +++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_upload.html @@ -0,0 +1,12 @@ + + + + + + + + + + + +
{L_UPLOAD_AVATAR_FILE}{L_COLON}
{L_UPLOAD_AVATAR_URL}{L_COLON}
{L_UPLOAD_AVATAR_URL_EXPLAIN}
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_avatar.html b/phpBB/styles/subsilver2/template/ucp_profile_avatar.html index 160f8a2399..f8129e60e6 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_avatar.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_avatar.html @@ -21,61 +21,27 @@ {L_AVATAR_FEATURES_DISABLED} - - - {L_UPLOAD_AVATAR_FILE}{L_COLON} - + + {L_AVATAR_SELECT} - - - - {L_UPLOAD_AVATAR_URL}{L_COLON}
{L_UPLOAD_AVATAR_URL_EXPLAIN} - + + {L_AVATAR_TYPE}{L_COLON} + + - - - - {L_LINK_REMOTE_AVATAR}{L_COLON}
{L_LINK_REMOTE_AVATAR_EXPLAIN} - + + + {avatar_drivers.L_EXPLAIN} - - {L_LINK_REMOTE_SIZE}{L_COLON}
{L_LINK_REMOTE_SIZE_EXPLAIN} - {L_PIXEL} × {L_PIXEL} + + {avatar_drivers.OUTPUT} - - - - {L_AVATAR_GALLERY}{L_COLON} - {L_DISPLAY_GALLERY} - - - - - - {L_AVATAR_GALLERY} - - - {L_AVATAR_CATEGORY}{L_COLON}   - - - - - - - - - - - - - - - - -
{avatar_row.avatar_column.AVATAR_NAME}
- - - + @@ -84,4 +50,6 @@ + +