Welcome, Guest. Please Login or Register.
May 05, 2024, 06:17:39 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [BETA] Avatar resize fix « previous next »
Pages: 1 2 [3] 4 Reply Ignore Print
Author Topic: [BETA] Avatar resize fix  (Read 24463 times)
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:[BETA] Avatar resize fix
« Reply #30 on: July 11, 2002, 01:44:16 PM »
Reply with quote

 ::)

There is another way to do it without using size all the time, just store the size on the database when they change the profile. Then get the size from the members table instead of calling that command repeadidly which will slow it down.
Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
itswheelie
Jr. Member
**
Posts: 88


I love YaBB SE!

Re:[BETA] Avatar resize fix
« Reply #31 on: July 12, 2002, 01:15:17 AM »
Reply with quote

hey, maybe Chris, REL and Dude can get together and between them make THE best mod.

seems to me that each of the existing mods has something going for them, add Chris' comments and between the three come up with the best result :)

Just my 2 cents worth.
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:[BETA] Avatar resize fix
« Reply #32 on: July 12, 2002, 01:30:07 AM »
Reply with quote

As I think Joseph pointed out, if you check the size when saving profile then someone could upload a new image with the same name and its size would never be checked.
Logged

Ben_S
Disciple of Joe
Support Team
YaBB God
*****
Posts: 1586


I Love YaBB SE!

WWW
Re:[BETA] Avatar resize fix
« Reply #33 on: July 12, 2002, 03:35:45 PM »
Reply with quote

true but most wouldnt, and if they do it just to be a pint you can always ban then ;)
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:[BETA] Avatar resize fix
« Reply #34 on: July 12, 2002, 04:46:32 PM »
Reply with quote

The next solution from the beta thread is in the profile you record the image size and then use that size when displaying it.  So if they change the image it will still be the correct size.
Logged

Hypocrite
YaBB God
*****
Posts: 692


For To End Yet Again

dimmuh@gmx.net WWW
Re:[BETA] Avatar resize fix
« Reply #35 on: July 12, 2002, 04:47:53 PM »
Reply with quote

Quote from: David on July 12, 2002, 04:46:32 PMThe next solution from the beta thread is in the profile you record the image size and then use that size when displaying it.  So if they change the image it will still be the correct size.

That would be the best option in my opinion :)
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:[BETA] Avatar resize fix
« Reply #36 on: July 12, 2002, 04:56:44 PM »
Reply with quote

Quote from: Hypocrite on July 12, 2002, 04:47:53 PM
Quote from: David on July 12, 2002, 04:46:32 PMThe next solution from the beta thread is in the profile you record the image size and then use that size when displaying it.  So if they change the image it will still be the correct size.

That would be the best option in my opinion :)
Just read a few posts earlier in this thread and it seems Chris actually suggessted this.  ;)
Logged

Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:[BETA] Avatar resize fix
« Reply #37 on: July 12, 2002, 05:02:23 PM »
Reply with quote

Hehe... :P ;)
Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
Hypocrite
YaBB God
*****
Posts: 692


For To End Yet Again

dimmuh@gmx.net WWW
Re:[BETA] Avatar resize fix
« Reply #38 on: July 12, 2002, 05:09:15 PM »
Reply with quote

LOL...
Logged
Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Re:[BETA] Avatar resize fix
« Reply #39 on: July 12, 2002, 05:57:02 PM »
Reply with quote

This will remain a mod and a mod only. Sorry I will not package this in 1.4.1.

There are several reasons to this.
1.) I just want to get the package released.
2.)There are performance issues with resizing avatars. That has been talked about already on the beta boards. (*Sorry* you don't have access to those boards.)

If this mod progress to a really good mod with ideas that was stated. Maybe it will make it into YaBB SE 2

Who knows?  ;D
Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:[BETA] Avatar resize fix
« Reply #40 on: January 18, 2003, 11:12:31 PM »
Reply with quote

I have a problem with this one. It seemed to work oké, but it gave an error on anyone viewing their profile. On the top of the profile-page it says:

Parse error: parse error, unexpected '>' in /opt/guide/HTML/forum/Sources/Profile.php on line 885

Fatal error: Call to undefined function: viewprofile() in /opt/guide/HTML/forum/index.php on line 382

Logged
Tenkoy
Jr. Member
**
Posts: 76


WWW
Re:[BETA] Avatar resize fix
« Reply #41 on: February 11, 2003, 09:10:46 AM »
Reply with quote

Okay, I found this mod made by REL, the avatar resize fix. I found it at Wizwig's ftp.

ftp://ftp.clubmasa.com/

I tested this mod and found that this mod works with 1.5.1 RC38. But, it seems to have a problem with resizing jpegs. It can resize gifs just fine.

It has one quirk, it won't allow you to put in the url to jpegs that are too large, first you have to upload a small jpeg to your webspace, and then set your avatar to that, and then you have to go back to your webspace and replace that image with the larger one you wish to use. The only way to use larger jpegs so far seems to be to pull a switch-a-roo on it.
Logged
TF
Full Member
***
Posts: 214


I'm a llama!

Re:[BETA] Avatar resize fix
« Reply #42 on: February 11, 2003, 09:00:23 PM »
Reply with quote

Its something wrong with this mod.

I got this under the pics which is over the size in Forum Preferences:

" width="60" height="60" border="0" alt="">


Whats wrong??

Can someone take a look at this code, Load.php. This is the replace-code:


<replace>
      $userprofile[$user]['avatar'] = ($userprofile[$user]['avatar']=='') ? 'blank.gif' : "{$userprofile[$user]['avatar']}";
      $tmp = stristr($userprofile[$user]['avatar'],'http://') ? "{$userprofile[$user]['avatar']}" : "$facesurl/{$userprofile[$user]['avatar']}";
      $size = @getimagesize ($tmp);
      if ($size[0]>$userpic_width or $size[1]>$userpic_height) {
         if ($size[1]>$userpic_height) {
            $userprofile[$user]['avatar'] = stristr("{$userprofile[$user]['avatar']}",'http://') ? "<br><img src=\"{$userprofile[$user]['avatar']}\" width=$size[0] $userpic_tmpheight border=\"0\" alt=\"\"><br><br>" : "<br><img src=\"$facesurl/{$userprofile[$user]['avatar']}\" border=\"0\" alt=\"\"><br><br>";
         } elseif ($size[0]>$userpic_width) {
            $userprofile[$user]['avatar'] = stristr("{$userprofile[$user]['avatar']}",'http://') ? "<br><img src=\"{$userprofile[$user]['avatar']}\"$userpic_tmpwidth height=$size[1] border=\"0\" alt=\"\"><br><br>" : "<br><img src=\"$facesurl/{$userprofile[$user]['avatar']}\" border=\"0\" alt=\"\"><br><br>";
         }
         if ($size[0]>$userpic_width and $size[1]>$userpic_height) {
            $userprofile[$user]['avatar'] = stristr("{$userprofile[$user]['avatar']}",'http://') ? "<br><img src=\"{$userprofile[$user]['avatar']}\"$userpic_tmpwidth$userpic_tmpheight border=\"0\" alt=\"\"><br><br>" : "<br><img src=\"$facesurl/{$userprofile[$user]['avatar']}\" border=\"0\" alt=\"\"><br><br>";
         }
      } else {
         $userprofile[$user]['avatar'] = stristr("{$userprofile[$user]['avatar']}",'http://') ? "<br><img src=\"{$userprofile[$user]['avatar']}\" $size[3] border=\"0\" alt=\"\"><br><br>" : "<br><img src=\"$facesurl/{$userprofile[$user]['avatar']}\" border=\"0\" alt=\"\"><br><br>";
      }
</replace>


« Last Edit: February 11, 2003, 09:11:58 PM by TF » Logged
TF
Full Member
***
Posts: 214


I'm a llama!

Re:[BETA] Avatar resize fix
« Reply #43 on: February 13, 2003, 03:33:14 PM »
Reply with quote

Please help...  :'(  :'(  :'(
Logged
Tenkoy
Jr. Member
**
Posts: 76


WWW
Re:[beta] Avatar resize fix
« Reply #44 on: March 19, 2003, 12:43:29 PM »
Reply with quote

Okay, the avatar resize mod at wizwig's forum works great, you just have to make one little change to have it work perfectly.

In Profile.php, find this part.

      // now let's validate the avatar
      $sizes = @getimagesize($member['userpic']);
      if ($sizes && (($sizes[0] > $userpic_width && $userpic_width != 0) || ($sizes[1] > $userpic_height && $userpic_height != 0)))
         fatal_error("$txt[yse227]  $userpic_width x $userpic_height)");


And comment it out as such:

      // now let's validate the avatar
      //$sizes = @getimagesize($member['userpic']);
      //if ($sizes && (($sizes[0] > $userpic_width && $userpic_width != 0) || ($sizes[1] > $userpic_height && $userpic_height != 0)))
         //fatal_error("$txt[yse227]  $userpic_width x $userpic_height)");


.....or you could simply remove it, whichever one you want to do.

This will stop it from spitting out the too large message for jpeg images and simply resize it like a good little boy. The avatar will be resized to whatever you want, plus it will not be affected if it's not larger than the limit.


Confirmed to work with 1.5.1 RC45 with that simple change I pointed out above.
« Last Edit: March 19, 2003, 01:09:26 PM by Tenkoy » Logged
Pages: 1 2 [3] 4 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [BETA] Avatar resize fix « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.020 seconds with 19 queries.