From 0279d6a99e333b53b493fdfe6dfa07c5afd9e299 Mon Sep 17 00:00:00 2001 From: hecht Date: Tue, 2 Dec 2014 17:33:23 +0000 Subject: [PATCH] make it possible to hide all avatars (to save bandwidth) --- ag/dragonballs.php | 4 ++-- ag/include/char.inc.php | 3 ++- ag/include/config.inc.php | 3 +++ ag/profil.php | 23 ++++++++++++++++++++--- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/ag/dragonballs.php b/ag/dragonballs.php index 3e35060..66cd14b 100644 --- a/ag/dragonballs.php +++ b/ag/dragonballs.php @@ -93,8 +93,8 @@ function wuenscheSpecialChar($user, $specialcharname, $newname = ''){ $chars = getCharsOfUser($user['id']); foreach($chars as $char) { if($char['rasse_a']['id'] == $rasse['id']) { - displayErrorMessage(NULL,'Der '.$specialcharname.'-Slot ist schon durch '.$char['name'].' belegt!!',displayHistoryBackLink()); - return false; + displayErrorMessage(NULL,'Der '.$specialcharname.'-Slot ist schon durch '.$char['name'].' belegt!!',displayHistoryBackLink()); + return false; } } diff --git a/ag/include/char.inc.php b/ag/include/char.inc.php index 5a87398..c5d103d 100644 --- a/ag/include/char.inc.php +++ b/ag/include/char.inc.php @@ -184,8 +184,9 @@ function getCharBuffs($items) { * returns Url of Avatar-Picture * */ function getPicture($char){ + $data = getUserMetaData($GLOBALS['user_array']['id']); // Sichergehen, dass Char geladen wurde - if($char['bild'] == null || $char['bild'] == ''){ + if($char['bild'] == null || $char['bild'] == '' || $data['hide_avatars'] == 1){ return 'design/bilder/avatare/noavart.gif'; } return $char['bild']; diff --git a/ag/include/config.inc.php b/ag/include/config.inc.php index ce58b54..bf0c4c7 100644 --- a/ag/include/config.inc.php +++ b/ag/include/config.inc.php @@ -65,8 +65,11 @@ if ($user_ida['id'] != null) { $as = 'profil'; } + $pic_g31 = 75; ///////////Bild Groesse +$GLOBALS['user_array'] = $user_ida; + #if ($clan_nachricht['id']) { # # print "