Avatar Grösse???
-> Hilfe

#1: Avatar Grösse??? Autor: ZEKE BeitragVerfasst am: 15.02.2005 13:46
    ----
Habe das Problem das einige Benutzer ein Avatar haben das z.B. 600 x 400 Pixel gross ist! Das sieht scheisse aus und verzieht alles. Und das obwohl die Avatar grösse auf 80 x 80 limitiert ist?! Wenn man ein Avatar von einem Link holt scheint es wohl keine Grenzen zu geben? Was kann man da machen? Kann man die Bildgrösse nicht irgendwie limitieren oder automatisch anpassen?

#2: Re: Avatar Grösse??? Autor: ZEKE BeitragVerfasst am: 15.02.2005 14:55
    ----
Habe die Lösung gefunden. Es gibt dazu einen Hack.

Im File "modules/Your_Account/index.php" den String "$user_avatar = $avatarremoteurl;" suchen (ca. Linie 834).

Und diesen Code
Array:
$user_avatar = $avatarremoteurl;

Mit diesem ersetzen
Array:
/*--Added by Vitor Freitas in 02-12-2004--*/
/*--Check if the avatar have the correct dimensions--*/
list($avatar_width, $avatar_height) = @getimagesize($avatarremoteurl);

$avatar_result = $db->sql_query("SELECT config_name, config_value FROM ".$prefix."_bbconfig WHERE config_name IN ('avatar_max_width', 'avatar_max_height')");
while($avatar_row = $db->sql_fetchrow($avatar_result)) {
   $board_config[$avatar_row['config_name']] = $avatar_row['config_value'];
}

if ( $avatar_width <= $board_config['avatar_max_width'] && $avatar_height <= $board_config['avatar_max_height'] ) {
   $user_avatar = $avatarremoteurl;
}else{
   include('header.php');
   /*--Output a error message--*/
   OpenTable();
/*--TODO: Move this to the LANG file--*/
   echo '<center>The max allowed dimension for your avatar is: width = '.$board_config['avatar_max_width'].' pixels and height = '.$board_config['avatar_max_height'].' pixels<br><br>'._GOBACK.'<br><br></center>';
   CloseTable();
   include('footer.php');
   exit;
}
/*--End Added by Vitor Freitas in 02-12-2004--*/

#3: Re: Avatar Grösse??? Autor: ErtanWohnort: Germany BeitragVerfasst am: 17.02.2005 16:11
    ----
good job zwinker

habe es auf cpgnuke.com vorgeschlagen



-> Hilfe

Alle Zeitangaben sind in GMT + 1 Stunden

Seite 1 von 1