(06-20-2012 08:05 AM)brad-t Wrote: I am wondering if it's possible to do Avatar upload and Signature edit in this page as well
You can try this attachment (attached) in your test board. The avatar gallery is not included here.
This uses
usercp_editsig, usercp_editsig_suspended, usercp_editsig_current and
usercp_avatar templates. So you need to edit those templates.
This is for example only:
usercp_avatar:
Basically, you only need the input fields from this template.
There is an options to update and remove avatar (line #22 - #23), so the avatar process is not executed if the user choose the 'No action' option (by default, it's selected).
usercp_editsig:
The same as the avatar above, basically, you only need to input fields from this template.
There is an additional checkbox for processing (validating and updating) the signature (line #5). If the user doesn't check the checkbox, the signature won't be saved (updated), but they can still view the change (a bit similar to preview).
usercp_editsig_current:
For the current/preview signature
usercp_editsig_suspended:
Will be displayed if the user doesn't have permission to edit their signature:
There are some additional variables you need to add to your usercp template:
{$editsig}: for displaying the edit signature form or the no permission message.
{$signature}: for displaying the current/preview signature.
{$avatarupload}: for displaying the avatar form.
And you need to add enctype="multipart/form-data" to the form tags.
An example: