TheGamerPlanet

General Forums => Hardware, Software and Networking => Topic started by: zebra on February 15, 2018, 07:20:48 PM

Title: Avatar upload issue
Post by: zebra on February 15, 2018, 07:20:48 PM
Any of you fine fellas happen to know why my avatar uploads to the website flipped? The file itself is oriented correctly, but is automatically rotated when uploaded as an avatar.

Edit: Just tried hosting the picture on imgur - no luck in using the "avatar by direct link" option through this method.
Title: Re: Avatar upload issue
Post by: HSantal on February 15, 2018, 10:23:38 PM
I'll have to take a look. I have to do mine too.
Title: Re: Avatar upload issue
Post by: HSantal on February 15, 2018, 10:36:21 PM
OK. I went to Profile , Forum Profile and selected Upload an avatar. Picked the image from my computer and the clicked Change Profile.
No issues and I just downloaded the picture from the internet.
Title: Re: Avatar upload issue
Post by: zebra on February 16, 2018, 02:08:54 AM
OK. I went to Profile , Forum Profile and selected Upload an avatar. Picked the image from my computer and the clicked Change Profile.
No issues and I just downloaded the picture from the internet.

Well, after 3 tries of creating/cropping/moving/saving a new file to upload straight to the site - I finally got one to work (fit)
Unfortunately, doesn't quite "fit" perfectly with the theme, and placement of the sites navigation header.

(https://i.imgur.com/msYKYut.png)
Title: Re: Avatar upload issue
Post by: HSantal on February 16, 2018, 10:21:36 AM
I saw that when I uploaded mine too. There may be a fix or it is what it is.  :)
Title: Re: Avatar upload issue
Post by: OptimusPrime on February 16, 2018, 12:31:34 PM
I saw that when I uploaded mine too. There may be a fix or it is what it is.  :)

it does that with every avatar up there.  That's how the CSS wants it, even with a square one.
Title: Re: Avatar upload issue
Post by: zebra on February 16, 2018, 03:17:40 PM
it does that with every avatar up there.  That's how the CSS wants it, even with a square one.

Ooph, that's rough.
I looked into a couple things to see if I could find a code fix - but there's so much in my notes, I can't find the reference to pictures/avatars - even when copying the source code tags where my avatar is displayed. I'll try to do some more research sometime today after work.
Title: Re: Avatar upload issue
Post by: OptimusPrime on February 16, 2018, 07:02:52 PM
oops - started to edit your post with my reply. The perils of admin rights and not having a clue :)





What exactly is wrong with that avatar up on top behind the menu? It's your own, nobody will see it there but you. You know your avatar and what's in that glass. Looks fine to me here in a thread, where it is being displayed to others.

I could easily ditch the entire avatar from the header of the forum index, although having multiple accounts here, I actually like it, as it shows me who I am.

the code that pulls in the avatar is in the forum theme index template - I edited the top to move the Gamerplanet image to the left, but I don't think that would affect the next DIV below. DIV shadow is that silver top line thing below the Gamerplanet image

Code: [Select]
<div id="shadow">
<div id="header">
<div id="upper_section">
<div class="user">';


// Fish edit end
// If the user is logged in, display stuff like their name, new messages, etc.

if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';

if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
echo '
<li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';

echo '
<li>', $context['current_time'], '</li>
</ul>';
}
echo '
</div>

I am guessing the DIV outside of that is what really defines the layout of that menu above the avatar.  it's called "upper_section"
Title: Re: Avatar upload issue
Post by: zebra on February 16, 2018, 10:01:16 PM
oops - started to edit your post with my reply. The perils of admin rights and not having a clue :)

Lol, I do this on my community/streaming Discord server, all the time. I know how you feel, heh heh.

What exactly is wrong with that avatar up on top behind the menu? It's your own, nobody will see it there but you. You know your avatar and what's in that glass. Looks fine to me here in a thread, where it is being displayed to others.

You have a great point - didn't think about how it isn't shown to others.
I'm just picky, and it looked slightly 'out of place' considering it was being displayed behind the nav header/menu. Granted, it doesn't intrude or anything since it's at the bottom of my pic - Just assumed it might be a padding, or space limitation issue for the avatars; rather, lack thereof.

I could easily ditch the entire avatar from the header of the forum index, although having multiple accounts here, I actually like it, as it shows me who I am.

No need! I only brought it up because I had (knowingly) tried to use a larger than avg picture (generally speaking); to be used for my avatar .. and realized the picture I had used didn't fit all too well after applied. Brought it up here thinking I might have been the only one to experience it so far. :) cheers
Title: Re: Avatar upload issue
Post by: OptimusPrime on February 17, 2018, 02:32:28 PM
Did the software ask you to resize the image at all? I haven't tried uploading a custom avatar. All I remember setting up is a max upload per image size in kilobytes, not size. All the avatars I put into the forum to choose from should be 150x150 or smaller.  Yours displays at nnn x 150 right now, so it either gets scaled in the CSS or it was resized once assigned as avatar. Not sure if this board comes with the necessary code to do that.

Meanwhile, we are about to move to a new hosting setup with different features, and there's a good chance we'll be down for a few hours to a few days when that happens. Should all be done before March 4
Title: Re: Avatar upload issue
Post by: zebra on February 17, 2018, 05:33:27 PM
Did the software ask you to resize the image at all? I haven't tried uploading a custom avatar. All I remember setting up is a max upload per image size in kilobytes, not size. All the avatars I put into the forum to choose from should be 150x150 or smaller.  Yours displays at nnn x 150 right now, so it either gets scaled in the CSS or it was resized once assigned as avatar. Not sure if this board comes with the necessary code to do that.

It didn't ask to resize - but trying to upload the original photo file, cropped once before upload; gave me something along the lines of "The File Size is too large" (< not verbatim, but similar) so you're definitely correct on kb file size limit.
I cropped once more, and for some reason would upload flipped to the right..
Gave it another crop on a resizing website, saved the file.. still same issue. Only after I'd went back and cropped the original once more to as small as I could get it with Windows (without cropping my face or the brew out) and seemed to have worked. When I get home I can check the exact dimensions for you. But It's definitely not 150x150 - so there seems to be *some* resizing going on with the CSS, just maybe not executed correctly/fully?

Meanwhile, we are about to move to a new hosting setup with different features, and there's a good chance we'll be down for a few hours to a few days when that happens. Should all be done before March 4

Awesome! Hope the features to come will improve our ability to build this place back up. I would definitely not mind seeing some old, or even new faces. Maybe in time, I'm sure. Although, I know all of you old folk are quite busy, usually. :P
Title: Re: Avatar upload issue
Post by: HSantal on February 18, 2018, 10:52:46 PM
Awesome! Hope the features to come will improve our ability to build this place back up. I would definitely not mind seeing some old, or even new faces. Maybe in time, I'm sure. Although, I know all of you old folk are quite busy, usually. :P
I see what you did there.  ;D
Title: Re: Avatar upload issue
Post by: zebra on February 18, 2018, 10:56:11 PM
I see what you did there.  ;D

I try.  8)