Posts: 9,866
Threads: 594
Joined: Jan 2006
2017-11-18, 06:33 PM
(This post was last modified: 2017-11-18, 06:36 PM by User 2877.)
I tried too. Can't seem to fix it either after 2 hours.
I think the mistake was to use the do_avatar action with input of gallery. I think you should have done actions of "gallery" and "do_gallery" instead and hook into usercp_start. You'd be able to fix this a lot easier.
I don't want to spend another 2 hours rewriting this over one error line.
Also another bug. If you disable remote avatars the error is wrong.
After this line:
$lang->error_invalidavatarurl = $lang->error_noavatar;
Add this line:
$lang->error_remote_avatar_not_allowed = $lang->error_noavatar;
Oh also the error says:
"You did not choose an avatar. Please go back and do so now. If you don't want an avatar, select the "No avatar" option."
But there is no "No Avatar" option so that should be removed.
Posts: 9,866
Threads: 594
Joined: Jan 2006
2017-11-19, 05:18 AM
(2017-11-18, 11:27 PM)Starpaul20 Wrote: I actually was able to figure out a simple fix for this. The problem is caused by the placement of the <form> tag in the usercp_avatar template. To fix, open the usercp_avatar template and find:
<form enctype="multipart/form-data" action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
and move it down to just before {$avatarupload}.
Much love. I was toying mainly with the plugin page. I'll check my dev site and see if your changes make the difference. Also did you add my bug fix to the download?
Posts: 9,866
Threads: 594
Joined: Jan 2006
2017-11-19, 05:53 PM
Perfect.