make it possible to hide all avatars (to save bandwidth)

main
hecht 10 years ago
parent ebece2137a
commit 0279d6a99e

@ -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'];

@ -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 " <script language='JavaScript'>

@ -24,6 +24,7 @@ $chat = validateString($_GET['chat']);
$ads = validateString($_GET['ads']);
$acc_delete = validateString($_GET['acc_delete']);
$alt_pw = validateString($_GET['alt_pw']);
$hide_avatars = validateInteger($_GET['hide_avatars']);
// Unkritisch
$charm = $_GET['charm'];
@ -44,7 +45,7 @@ function isNickChanged($user){
}
function changeProfil($user, $usergroups, $new_pw, $new_nick, $new_nick2, $alt_pw, $homepage, $icq, $chat, $ads, $acc_delete){
function changeProfil($user, $usergroups, $new_pw, $new_nick, $new_nick2, $alt_pw, $homepage, $icq, $chat, $ads, $acc_delete, $hide_avatars){
if(!is_numeric($chat)){
displayErrorMessage(NULL,'Chat-Feld inkorrekt ausgefuellt!','');
return;
@ -118,6 +119,7 @@ function changeProfil($user, $usergroups, $new_pw, $new_nick, $new_nick2, $alt_p
}
}
setUserMetaDataEntry($user['id'], 'hide_avatars', $hide_avatars);
mysql_query('UPDATE user SET homepage=\''.$homepage.'\', icq=\''.$icq.'\' WHERE id=\''.$user['id'].'\'');
displayErrorMessage('Profil erfolgreich ge&auml;ndert','Sollte das Passwort ge&auml;ndert worden sein, ist ein erneuter Login erforderlich.','');
@ -212,6 +214,21 @@ function display($user, $usergroups){
aus: <input type="radio" name="chat" value="0" <?php echo $che2; ?> />
</td>
</tr>
<tr>
<th align="center">Avatare anzeigen:</th>
<td><?php
$data = getUserMetaData($user['id']);
if($data['hide_avatars'] == 1) {
$che1 = 'checked="checked"';
$che2 = '';
} else{
$che1 = '';
$che2 = 'checked="checked"';
}
?> an: <input type="radio" name="chat" value="0" <?php echo $che1; ?> />
aus: <input type="radio" name="chat" value="1" <?php echo $che2; ?> />
</td>
</tr>
<tr>
<th align="center">Account L&ouml;schschutz</th>
<td><?php
@ -245,7 +262,7 @@ function display($user, $usergroups){
}
if($charm == '1'){
$user_ida = changeProfil($user_ida, $usergroups, $new_pw, $new_nick, $new_nick2, $alt_pw, $homepage, $icq, $chat, $ads, $acc_delete);
$user_ida = changeProfil($user_ida, $usergroups, $new_pw, $new_nick, $new_nick2, $alt_pw, $homepage, $icq, $chat, $ads, $acc_delete, $hide_avatars);
$usergroups = getUserGroups($user_ida['nickname']);
}
display($user_ida, $usergroups);

Loading…
Cancel
Save