[x] Navigation

[x] Languages

[x] Design
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.

Avatar Grösse???

This forum is locked: you cannot post, reply to, or edit topics.    This topic is locked: you cannot edit posts or make replies.    Printer Friendly Page     Forum Index ›  Hilfe

View previous topic :: View next topic  
Author Message
ZEKE
Investigator
Investigator

Offline Offline
Joined: Jan 05, 2005
Posts: 35

PostPosted: 15.02.2005 12:46
Post subject: Avatar Grösse???

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?


ZEKE's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Apache / 4.3.11 / 4.0.17 / 9.0.6.1
Back to top
View user's profile
ZEKE
Investigator
Investigator

Offline Offline
Joined: Jan 05, 2005
Posts: 35

PostPosted: 15.02.2005 13:55
Post subject: Re: Avatar Grösse???

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--*/


ZEKE's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Apache / 4.3.11 / 4.0.17 / 9.0.6.1
Back to top
View user's profile
Ertan
Webmaster
Webmaster

Offline Offline
Joined: Mar 19, 2004
Posts: 1264
Location: Germany
PostPosted: 17.02.2005 15:11
Post subject: Re: Avatar Grösse???

good job Wink

habe es auf cpgnuke.com vorgeschlagen

_________________
.: USE THE FORCE :.
Helft mit ! Keine Unbeantworteten Beiträge mehr

Ertan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Send e-mail Visit poster's website Photo Gallery
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.    This topic is locked: you cannot edit posts or make replies.    Printer Friendly Page    Forum Index ›  Hilfe
Page 1 of 1
All times are GMT + 1 Hour



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum




Interactive software released under GNU GPL, Code Credits, Privacy Policy