[3933][SMF 2.0 RC2] Specify avatar by URL

Started by P@P, October 27, 2009, 07:10:45 PM

Previous topic - Next topic

P@P

Hello there!

I just found out one problem, on my community I have disabled all options to insert one avatar except the Specify avatar by URL option that I have enable.

The attached images is how my members see the Profile page. I just tried with another account so this SS is mine, the web-browser is FF and I am using Mac OS X.

As you can see, there is no text box, no way to insert the url.
www.portugal-a-programar.org - Admin shared user
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

P@P

More info:

One member of my community just reported this error when he tried to change his avatar:

Quotedocument.getElementById("avatar_server_stored") is null
http://(...)/index.php?action=profile;area=forumprofile;u=XXXX
Line 297
www.portugal-a-programar.org - Admin shared user
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Norv

#2
Quote from: P@P on October 27, 2009, 07:10:45 PM

I just found out one problem, on my community I have disabled all options to insert one avatar except the Specify avatar by URL option that I have enable.

The attached images is how my members see the Profile page. I just tried with another account so this SS is mine, the web-browser is FF and I am using Mac OS X.

As you can see, there is no text box, no way to insert the url.

I can confirm this, just tested it on RC2 and the latest svn.
Thank you for reporting it.

Quote from: P@P on October 29, 2009, 07:49:30 AM
More info:

One member of my community just reported this error when he tried to change his avatar:

Quotedocument.getElementById("avatar_server_stored") is null
http://(...)/index.php?action=profile;area=forumprofile;u=XXXX
Line 297
Could you please tell how did he try to change it - from what to what? What was enabled?
ETA: What browser did he use?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

P@P

"What was enabled?"

What I wrote in the first post, only avatars by URL. I just asked him how he did it because I think he can't see any text box...
www.portugal-a-programar.org - Admin shared user
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Norv

Quote from: P@P on October 30, 2009, 08:24:30 AM
"What was enabled?"

What I wrote in the first post, only avatars by URL. I just asked him how he did it because I think he can't see any text box...

I tried that before asking, and it seems the textbox is visible when it already has a value. I didn't get any error, I was able to change it. So I cannot replicate this part of the issue. Knowing the browser he's using might also be of help.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

P@P

I am just waiting for his reply..., I have no clue either how he's got that error...
www.portugal-a-programar.org - Admin shared user
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

P@P

I didn't have any reply yet..., but what about the initial report? I didn't found it solved with the "new" RC2 on my community.
www.portugal-a-programar.org - Admin shared user
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

P@P

my members are complaining and I am not getting any solution..., folks..., can you help me with this please?
www.portugal-a-programar.org - Admin shared user
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Arantor

As a workaround, enabling one or other of the options (like uploadable avatar) reenables the box.
Holder of controversial views, all of which my own.


feline

This problem is know since 1.2 (I think) but is't fixed in RC2 public.

This code (in Profile.template.php) produce a javascript error if any avatar function disabled:

function swap_avatar(type)
{
switch(type.id)
{
case "avatar_choice_server_stored":
document.getElementById("avatar_server_stored").style.display = "";
document.getElementById("avatar_external").style.display = "none";
document.getElementById("avatar_upload").style.display = "none";
break;
case "avatar_choice_external":
document.getElementById("avatar_server_stored").style.display = "none";
document.getElementById("avatar_external").style.display = "";
document.getElementById("avatar_upload").style.display = "none";
break;
case "avatar_choice_upload":
document.getElementById("avatar_server_stored").style.display = "none";
document.getElementById("avatar_external").style.display = "none";
document.getElementById("avatar_upload").style.display = "";
break;
}
}


This must replace with follow:

function swap_avatar(type)
{
switch(type.id)
{
case "avatar_choice_server_stored":
document.getElementById("avatar_server_stored").style.display = "";
'. (!empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '') .'
'. (!empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '') .'
break;
case "avatar_choice_external":
document.getElementById("avatar_server_stored").style.display = "none";
', (!empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "";' : '') .'
'. (!empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '') .'
break;
case "avatar_choice_upload":
document.getElementById("avatar_server_stored").style.display = "none";
'. (!empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '') .'
'. (!empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "";' : '') .'
break;
}
}


That worked without errors.

Fel

Norv

Thank you very much feline, for sharing the fix!
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

ibujanov

Hi,

this does not solve the issue.

Another behavior : if the user already have the avatar, the input box is shown. If not (all new members), this input box is not displayed.

Norv

Did you apply the fix above? Can you please tell, were you using a custom theme?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

ibujanov

Quote from: Norv on December 23, 2009, 07:35:10 AM
Did you apply the fix above? Can you please tell, were you using a custom theme?

Hi,

patch applied, standard theme. If empty avatar, for instance for new users, no input box. Once the admin sets the avatar, everything is normal.

Advertisement: