Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Avatar size?

Asked Modified Viewed 5,198 times
E
eXtr4ktor
E
  • Newbie, joined since
  • Contributed 6 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
asked
Newbie

This might be a dumb question and i've searched around but where can i set the max avatar size in php-fusion?
0 replies

16 posts

D
Daywalker
D
"Might and Greed will never outweigh Honor and Loyalty"

Come join us for IRC Support: Here
  • Member, joined since
  • Contributed 152 posts on the community forums.
  • Started 31 threads in the forums
answered
Member

Look near the bottom of update_profile_includes.php in the Includes folder.

You'll be looking for:
if ($error == "") {
   if ($userdata['user_avatar'] == "" && !empty($_FILES['user_avatar'])) {
      $newavatar = $_FILES['user_avatar'];
      if (is_uploaded_file($newavatar['tmp_name']) && $newavatar['size'] <= [color=blue]30720[/color]) {
         $avatarext = strrchr($newavatar['name'],".");
         if (eregi(".gif", $avatarext) || eregi(".jpg", $avatarext) || eregi(".png", $avatarext)) {
            $avatarname = substr($newavatar['name'], 0, strrpos($newavatar['name'], "."));
            $avatarname = $avatarname."[".$userdata['user_id']."]".$avatarext;
            $set_avatar = "user_avatar='$avatarname', ";
            move_uploaded_file($newavatar['tmp_name'], IMAGES."avatars/".$avatarname);
            chmod(IMAGES."avatars/".$avatarname,0644);
            $size = getimagesize(IMAGES."avatars/".$avatarname);
            if ($size['0'] > [color=red]200[/color] || $size['1'] > [color=red]200[/color]) {
               unlink(IMAGES."avatars/".$avatarname);
            }
         }
      }
   }


Red = Height and Width thing

Blue = Filesize
Edited by Daywalker on 14-10-2005 04:42,
0 replies
— 1 month later —
S
Steff
S
Steff 10
  • Junior Member, joined since
  • Contributed 19 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

I've tried this and after changing the size from 100X100 to 130X130, I still can't upload anything bigger than 100X100...

On the other hand, the max that still shows that I can upload is 100X100 and when I try to upload a picture that is 126X126 in size, it shows with a red X in the user profile and it shows as a 66X30 sized picture...

And yes the file is smaller than the 30kb requested...

Any idea?
Edited by Steff on 05-12-2005 01:00,
0 replies
S
Steff
S
Steff 10
  • Junior Member, joined since
  • Contributed 19 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

Anybody can help me out please?
0 replies
J
jangus74
J
  • Junior Member, joined since
  • Contributed 12 posts on the community forums.
  • Started 2 threads in the forums
answered
Junior Member

Is it a gif or jpg? I have found that some file formats show the red x for some reason. After switching the file format, the avatar loads fine. Couldn't tell u why though....
0 replies
S
Steff
S
Steff 10
  • Junior Member, joined since
  • Contributed 19 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

Quote

jangus74 wrote:
Is it a gif or jpg? I have found that some file formats show the red x for some reason. After switching the file format, the avatar loads fine. Couldn't tell u why though....

That could be a good explanation. I'll try to convert the files to .png's and let you know if it changes anything.

Thanks for the tip!
0 replies
S
Steff
S
Steff 10
  • Junior Member, joined since
  • Contributed 19 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

OK I found what the problem was. I was trying to assign an avatar to my users but it gave me the red X. So I tried with another account that I can use myself to see if it would work and it did.

So I guess that the Super Admin cannot set the avatar himself for the users...oh well ;)
0 replies
K
Ken
K
Ken 10
No Support by PM. Please use the forum.
  • Senior Member, joined since
  • Contributed 713 posts on the community forums.
  • Started 43 threads in the forums
answered
Senior Member

Quote

Steff wrote:
So I guess that the Super Admin cannot set the avatar himself for the users...oh well ;)


Super Admin can set the avatar for all members.
0 replies
S
Steff
S
Steff 10
  • Junior Member, joined since
  • Contributed 19 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

Quote

Kengun wrote:

Quote

Steff wrote:
So I guess that the Super Admin cannot set the avatar himself for the users...oh well ;)


Super Admin can set the avatar for all members.

From what I saw, when I tried to do that, the avatars show up as a red X instead of the avatar showing...and I know for sure that the avatars I'm trying to set are working as I tried them on my own profile settings...
0 replies
— 2 months later —
M
mpking
M
mpking 10
  • Newbie, joined since
  • Contributed 1 post on the community forums.
answered
Newbie

How about the other Avatar size? Can you change the max of 30k to something like 60k?
0 replies
J
Jammydodger
J
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
answered
Newbie

Little off topic, what about putting restrictions on the size of the signature?
0 replies
— 3 months later —
C
croc
C
croc 10
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
answered
Newbie

Nice. Setting the dimensions and size of avatar in update_profile_includes.php works fine :) (tested by me)

But the locale showing dimension & size doesnt change (not for me anyway). I manually edited it to what I set it to. You can find it in /locale/english/user_fields.php (line 45 ;))
0 replies
— 5 months later —
S
Shaihulud
S
....sometimes dead is better....
  • Junior Member, joined since
  • Contributed 35 posts on the community forums.
  • Started 8 threads in the forums
answered
Junior Member

Check the parse parameters in member.php and admin/member.php, once you change it globally you'll be fine, worked for me
0 replies
R
robo_rat
R
Robo Rat
"When the going gets tough, the tough hide under the table"
www.valley-venturers.wellington.net.nz
  • Member, joined since
  • Contributed 58 posts on the community forums.
  • Started 7 threads in the forums
answered
Member

don't you mean edit_profile.php and admin/members.php?
0 replies
— 28 days later —
A
adicrst
A
  • Member, joined since
  • Contributed 111 posts on the community forums.
  • Started 32 threads in the forums
answered
Member

Quote

Daywalker wrote:
Look near the bottom of update_profile_includes.php in the Includes folder.

You'll be looking for:
if ($error == "") {
   if ($userdata['user_avatar'] == "" && !empty($_FILES['user_avatar'])) {
      $newavatar = $_FILES['user_avatar'];
      if (is_uploaded_file($newavatar['tmp_name']) && $newavatar['size'] <= [color=blue]30720[/color]) {
         $avatarext = strrchr($newavatar['name'],".");
         if (eregi(".gif", $avatarext) || eregi(".jpg", $avatarext) || eregi(".png", $avatarext)) {
            $avatarname = substr($newavatar['name'], 0, strrpos($newavatar['name'], "."));
            $avatarname = $avatarname."[".$userdata['user_id']."]".$avatarext;
            $set_avatar = "user_avatar='$avatarname', ";
            move_uploaded_file($newavatar['tmp_name'], IMAGES."avatars/".$avatarname);
            chmod(IMAGES."avatars/".$avatarname,0644);
            $size = getimagesize(IMAGES."avatars/".$avatarname);
            if ($size['0'] > [color=red]200[/color] || $size['1'] > [color=red]200[/color]) {
               unlink(IMAGES."avatars/".$avatarname);
            }
         }
      }
   }


Red = Height and Width thing

Blue = Filesize



let's see if it works
Edited by adicrst on 24-12-2006 03:33,
0 replies
S
shearer
S
  • Member, joined since
  • Contributed 199 posts on the community forums.
  • Started 45 threads in the forums
answered
Member

there is a admin avartar infusion on the danish mod site.
0 replies
A
adicrst
A
  • Member, joined since
  • Contributed 111 posts on the community forums.
  • Started 32 threads in the forums
answered
Member

well..since i didn't knew that, I made a MOD [url="http://www.php-fusion.co.uk/forum/viewthread.php?forum_id=38&thread_id=14727"]LINKY[/url] B)
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 16 posts
  • Votes 0 votes
  • Topic users 12 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet