Page 1 of 1

Forum Made Simple & FEU - How to upload avatar photo

Posted: Mon Mar 12, 2012 3:04 pm
by WeeJimmyHat
I've got Forum Made Simple running on a client's site. Forum users are managed using Frontend User Management.

I have set up an 'avatar' image property in Frontend User Management, and can add an avatar image for forum users in the admin area myself.

I'd like users to be able to upload an avatar/profile photo themselves (replacing a default image), with a standard 'browse' file upload field on the change details page. Currently users can only change their email address and password.

Does anyone know what code I'd need to add to the change details form to allow users to do this? I've searched the forums and module support extensively but can't find a solution.

Thanks.

Re: Forum Made Simple & FEU - How to upload avatar photo

Posted: Mon Mar 12, 2012 6:02 pm
by mcDavid
You should set the avatar property to "optional" for the group that's allowed on the forum.

Re: Forum Made Simple & FEU - How to upload avatar photo

Posted: Tue Mar 13, 2012 4:21 pm
by WeeJimmyHat
Thanks for your help mcDavid, but avatar is already set to optional, and already displays fine if one is added in the admin area by the site administrator...

I'm looking for the code that I can add to the change details form that will display a browse field/button for allow users to upload their avatar to their profile.

Re: Forum Made Simple & FEU - How to upload avatar photo

Posted: Tue Mar 13, 2012 9:52 pm
by mcDavid
it should display automatically in the default form

Code: Select all

{$startform}
 {if $controlcount > 0}
  <table class='file_list_table'>
     {foreach from=$controls item=control}
  <tr class="file_list_row_{cycle values="odd,even"}">
     <td><p>{$control->hidden}{$control->prompt}{$control->marker}</p></td>
     <td>
       {if isset($control->image)}{$control->image}<br/>{/if}
       {if ($control->addtext) != ''}<div style='float:right; width:300px'>{$control->addtext}</div>{/if}{$control->control}
       {if $control->required != true}
         {if isset($control->control2)}{$control->prompt2}&nbsp;{$control->control2}<br/>{/if}
       {/if}
     </td>
  </tr>

 {/foreach}
  </table>

 {/if}
 {$hidden}{$hidden2}{$submit}{$cancel}
{$endform}
This is my form and it works fine.

Re: Forum Made Simple & FEU - How to upload avatar photo

Posted: Thu Mar 29, 2012 9:08 pm
by WeeJimmyHat
Thanks very much McDavid! That works for me. I think I must have messed things up when I 'customised' the form.