diff options
author | Marc Alexander <admin@m-a-styles.de> | 2012-11-18 20:47:29 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2012-11-18 20:47:29 +0100 |
commit | d8510356d6a0f838017ae94bec1a5ed8254432da (patch) | |
tree | 846797555b801d4f32edd37aa6604944fb05fa12 /phpBB | |
parent | 1c3b3621db7eda526388c0343946fa30c0223653 (diff) | |
download | forums-d8510356d6a0f838017ae94bec1a5ed8254432da.tar forums-d8510356d6a0f838017ae94bec1a5ed8254432da.tar.gz forums-d8510356d6a0f838017ae94bec1a5ed8254432da.tar.bz2 forums-d8510356d6a0f838017ae94bec1a5ed8254432da.tar.xz forums-d8510356d6a0f838017ae94bec1a5ed8254432da.zip |
[feature/avatars] Add subsilver2 support
This implementation might not be perfect though.
PHPBB3-10018
Diffstat (limited to 'phpBB')
6 files changed, 101 insertions, 54 deletions
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 @@ +<table class="tablebg" width="100%" cellspacing="1"> + <tr> + <td class="row1" width="35%"><b class="genmed">{L_GRAVATAR_AVATAR_EMAIL}{L_COLON}</b><br /><span class="gensmall">{L_GRAVATAR_AVATAR_EMAIL_EXPLAIN}</span></td> + <td class="row2"><input type="text" name="av_gravatar_email" id="av_gravatar_email" value="{AV_GRAVATAR_EMAIL}" class="inputbox" /></td> + </tr> + <tr> + <td class="row1" width="35%"><b class="genmed">{L_GRAVATAR_AVATAR_SIZE}{L_COLON}</b><br /><span class="gensmall">{L_GRAVATAR_AVATAR_SIZE_EXPLAIN}</span></td> + <td class="row2"> + <input type="text" name="av_gravatar_width" id="av_gravatar_width" size="3" value="{AV_GRAVATAR_WIDTH}" class="inputbox autowidth" /> {L_PIXEL} × + <input type="text" name="av_gravatar_height" id="av_gravatar_height" size="3" value="{AV_GRAVATAR_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL} + </td> + </tr> +</table> 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 @@ +<table class="tablebg" width="100%" cellspacing="1"> + <tr> + <td class="cat" colspan="2" align="center" valign="middle"><span class="genmed">{L_AVATAR_CATEGORY}{L_COLON} </span><select name="av_local_cat" id="category"> + <option value="">{L_NO_AVATAR_CATEGORY}</option> + <!-- BEGIN av_local_cats --> + <option value="{av_local_cats.NAME}"<!-- IF av_local_cats.SELECTED --> selected="selected"<!-- ENDIF -->>{av_local_cats.NAME}</option> + <!-- END av_local_cats --> + </select> <input class="btnlite" tabindex="0" type="submit" value="{L_GO}" name="av_local_go" /> + </td> + </tr> + <tr> + <td class="row1" colspan="2" align="center"> + <table cellspacing="1" cellpadding="4" border="0"> + <!-- BEGIN av_local_row --> + <tr> + <!-- BEGIN av_local_col --> + <td class="row1" align="center"><img src="{av_local_col.av_local_col.AVATAR_IMAGE}" alt="{av_local_col.av_local_col.AVATAR_NAME}" title="{av_local_col.av_local_col.AVATAR_NAME}" /></td> + <!-- END av_local_col --> + </tr> + <tr> + <!-- BEGIN av_local_option --> + <td class="row2" align="center"><input type="radio" class="radio" name="av_local_file" value="{av_local_col.av_local_option.S_OPTIONS_AVATAR}" /></td> + <!-- END av_local_option --> + </tr> + <!-- END av_local_col --> + </table> + </td> + </tr> +</table> 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 @@ +<table class="tablebg" width="100%" cellspacing="1"> + <tr> + <td class="row1" width="35%"><b class="genmed">{L_LINK_REMOTE_AVATAR}{L_COLON} </b><br /><span class="gensmall">{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td> + <td class="row2"><input class="post" type="text" name="av_remote_url" size="40" value="{AV_REMOTE_URL}" /></td> + </tr> + <tr> + <td class="row1" width="35%"><b class="genmed">{L_LINK_REMOTE_SIZE}{L_COLON} </b><br /><span class="gensmall">{L_LINK_REMOTE_SIZE_EXPLAIN}</span></td> + <td class="row2"><input class="post" type="text" name="av_remote_width" size="3" value="{AV_REMOTE_WIDTH}" /> <span class="gen">{L_PIXEL} × </span> <input class="post" type="text" name="av_remote_height" size="3" value="{AV_REMOTE_HEIGHT}" /> <span class="gen">{L_PIXEL}</span></td> + </tr> +</table> 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 @@ +<table class="tablebg" width="100%" cellspacing="1"> + <tr> + <td class="row1" width="35%"><b class="genmed">{L_UPLOAD_AVATAR_FILE}{L_COLON} </b></td> + <td class="row2"><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" /><input class="post" type="file" name="av_upload_file" /></td> + </tr> +<!-- IF S_UPLOAD_AVATAR_URL --> + <tr> + <td class="row1" width="35%"><b class="genmed">{L_UPLOAD_AVATAR_URL}{L_COLON} </b><br /><span class="gensmall">{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td> + <td class="row2"><input class="post" type="text" name="av_upload_url" size="40" value="" /></td> + </tr> +<!-- ENDIF --> +</table> 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 @@ <td class="row3" colspan="2" align="center">{L_AVATAR_FEATURES_DISABLED}</td> </tr> <!-- ENDIF --> -<!-- IF S_UPLOAD_AVATAR_FILE --> - <tr> - <td class="row1" width="35%"><b class="genmed">{L_UPLOAD_AVATAR_FILE}{L_COLON} </b></td> - <td class="row2"><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" /><input class="post" type="file" name="uploadfile" /></td> - </tr> -<!-- ENDIF --> -<!-- IF S_UPLOAD_AVATAR_URL --> - <tr> - <td class="row1" width="35%"><b class="genmed">{L_UPLOAD_AVATAR_URL}{L_COLON} </b><br /><span class="gensmall">{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td> - <td class="row2"><input class="post" type="text" name="uploadurl" size="40" value="{AVATAR_URL}" /></td> - </tr> -<!-- ENDIF --> -<!-- IF S_LINK_AVATAR --> - <tr> - <td class="row1" width="35%"><b class="genmed">{L_LINK_REMOTE_AVATAR}{L_COLON} </b><br /><span class="gensmall">{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td> - <td class="row2"><input class="post" type="text" name="remotelink" size="40" value="{AVATAR_REMOTE}" /></td> - </tr> - <tr> - <td class="row1" width="35%"><b class="genmed">{L_LINK_REMOTE_SIZE}{L_COLON} </b><br /><span class="gensmall">{L_LINK_REMOTE_SIZE_EXPLAIN}</span></td> - <td class="row2"><input class="post" type="text" name="width" size="3" value="{AVATAR_WIDTH}" /> <span class="gen">{L_PIXEL} × </span> <input class="post" type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span class="gen">{L_PIXEL}</span></td> - </tr> -<!-- ENDIF --> -<!-- IF S_DISPLAY_GALLERY --> - <tr> - <td class="row1" width="35%"><b class="genmed">{L_AVATAR_GALLERY}{L_COLON} </b></td> - <td class="row2"><strong><a href="{U_GALLERY}">{L_DISPLAY_GALLERY}</a></strong></td> - </tr> -<!-- ENDIF --> - -<!-- IF S_IN_AVATAR_GALLERY --> - <tr> - <th colspan="2">{L_AVATAR_GALLERY}</th> - </tr> - <tr> - <td class="cat" colspan="2" align="center" valign="middle"><span class="genmed">{L_AVATAR_CATEGORY}{L_COLON} </span><select name="category">{S_CAT_OPTIONS}</select> <input class="btnlite" tabindex="0" type="submit" value="{L_GO}" name="display_gallery" /></td> - </tr> - <tr> - <td class="row1" colspan="2" align="center"> - <table cellspacing="1" cellpadding="4" border="0"> - <!-- BEGIN avatar_row --> - <tr> - <!-- BEGIN avatar_column --> - <td class="row1" align="center"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td> - <!-- END avatar_column --> - </tr> - <tr> - <!-- BEGIN avatar_option_column --> - <td class="row2" align="center"><input type="radio" class="radio" name="avatar_select" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td> - <!-- END avatar_option_column --> - </tr> - <!-- END avatar_row --> - </table> - </td> + <tr> + <th colspan="2">{L_AVATAR_SELECT}</th> </tr> -<!-- ENDIF --> + <tr> + <td class="row1" width="35%"><b class="genmed">{L_AVATAR_TYPE}{L_COLON}</b></td> + <td class="row2"> + <select name="avatar_driver" id="avatar_driver"> + <option value="">{L_NO_AVATAR_CATEGORY}</option> + <!-- BEGIN avatar_drivers --> + <option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_drivers.L_TITLE}</option> + <!-- END avatar_drivers --> + </select></td> + </tr> +<!-- BEGIN avatar_drivers --> + <tr class="av_option_{avatar_drivers.DRIVER}"> + <td class="row1" width="35%" colspan="2"><noscript><b class="genmed">{avatar_drivers.L_TITLE} </b><br /></noscript>{avatar_drivers.L_EXPLAIN}</span></td> + </tr> + <tr class="av_option_{avatar_drivers.DRIVER}"> + <td colspan="2" style="padding: 0">{avatar_drivers.OUTPUT}</td> + </tr> +<!-- END avatar_drivers --> <!-- IF S_DISPLAY_GALLERY or S_IN_AVATAR_GALLERY or S_LINK_AVATAR or S_UPLOAD_AVATAR_URL or S_UPLOAD_AVATAR_FILE or AVATAR --> <tr> @@ -84,4 +50,6 @@ <!-- ENDIF --> </table> +<!-- INCLUDEJS template/avatars.js --> + <!-- INCLUDE ucp_footer.html --> |