Welcome, Guest. Please Login or Register.
May 04, 2024, 11:15:22 PM
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 24461 times)
Craig
Jr. Member
**
Posts: 66


I'm a llama!

Re:[beta] Avatar resize fix
« Reply #45 on: April 03, 2003, 06:09:10 PM »
Reply with quote

anyone got a link to this mod PLEZZZZZZZZZ :)
Logged
Tenkoy
Jr. Member
**
Posts: 76


WWW
Re:[beta] Avatar resize fix
« Reply #46 on: April 04, 2003, 05:31:03 AM »
Reply with quote

Quote from: Tenkoy on March 19, 2003, 12:43:29 PM
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.

I was using my change to this and I noticed a problem. It will not load up a profile or a thread if the poster or user has an animated gif as their avatar. That seems to be the only problem with this code.



Note: This is tested on the 1.5.1 RC45 release, I don't know what changes have been made to the final product, this whole change my not even work anymore.
« Last Edit: April 07, 2003, 06:37:25 AM by Tenkoy » Logged
nate
Noobie
*
Posts: 44


Space for rent!

Re:[beta] Avatar resize fix
« Reply #47 on: April 12, 2003, 02:14:34 AM »
Reply with quote

Can I use this for 1.5.1? If not, what other options exist?

Thanks
ER
Logged
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:[beta] Avatar resize fix
« Reply #48 on: April 12, 2003, 05:50:41 AM »
Reply with quote

I sincerely doubt this works in 1.5.x Test it and see.
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Mavericb7
Noobie
*
Posts: 31


I'm a llama!

Re:[beta] Avatar resize fix
« Reply #49 on: June 13, 2003, 07:26:32 AM »
Reply with quote

great mod! But I think someone needs to make another version that works with 1.5.1, I just tried it and the code the .mod file searches for doesn't exist where its looking.
« Last Edit: June 13, 2003, 07:36:39 AM by Mavericb7 » Logged
old dan
Full Member
***
Posts: 191


Make music, not war.

WWW
Re:[beta] Avatar resize fix
« Reply #50 on: June 14, 2003, 08:50:22 AM »
Reply with quote

No, it won't work with 1.5.x, the code has changed a lot. However if you want a quick and dirty fix try this.
In your preference settings, set the avatar size to the width you want and the avatar height to 0. There is also some code in Load.php you will need to change to prevent an error message. I don't have a vanillia Load.php at hand but the code you need to comment out is around:

   /* if the user pic limits are specified, implemen them, other wise, no restrictions are present */


I know this works in Netscape and IE but can't guarentee it will with any other browser. The reason it works is when faces with an empty (or 0) height attribute the browser will supply it. In effect it will scale it to whatever width you entered.

Forgot to add, I'm working on a html mod for I,Brian right now but when I'm done I will see what it takes to do this mod for 1.5.3.
« Last Edit: June 14, 2003, 08:51:26 AM by old dan » Logged

People who drink lite beer don't like the taste of beer; they just like to pee a lot
EliteRides
Jr. Member
**
Posts: 83


EliteRides.com

WWW
Re:[beta] Avatar resize fix
« Reply #51 on: November 11, 2003, 03:08:42 AM »
Reply with quote

Any luck on the 1.5.x fix old dan?
Logged

gelsweb
Noobie
*
Posts: 1


ICQ - 34361058 WWW
Re:[beta] Avatar resize fix
« Reply #52 on: January 05, 2004, 09:11:31 PM »
Reply with quote

Is this already ready?
Logged

old dan
Full Member
***
Posts: 191


Make music, not war.

WWW
Re:[beta] Avatar resize fix
« Reply #53 on: January 06, 2004, 11:22:17 PM »
Reply with quote

Quote from: EliteRides on November 11, 2003, 03:08:42 AM
Any luck on the 1.5.x fix old dan?
oops, I forgot all about  it. :-[ Did you try my quickie fix in my previous post?
Logged

People who drink lite beer don't like the taste of beer; they just like to pee a lot
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.014 seconds with 18 queries.