Geburtsdatum im Profil nur für Admin sichtbar |
:..Melinda..:
Mitglied
Dabei seit: 16.11.08
Beiträge: 7
Fähigkeiten: WBB Lite 1 Fortgeschritten Forenversion: Lite 1.0
|
|
Dann hier auch einmal die Frage:
Ich würde in meinem Forum gerne die Anzeige des Geburtsdatums im Profil der User für alle User bis auf den Admin verstecken, habe aber leider keine Ahnung, wie ich das machen soll. Sicher muss in der profile.php etwas ergänzt oder geändert werden, habe aber leider keine Ahnung, was.
code: |
1:
|
if($user_info['birthday'] && $user_info['birthday']!="0000-00-00") { $birthday_array = explode("-",$user_info['birthday']); if($birthday_array[0]=="0000") $birthday = $birthday_array[2].".".$birthday_array[1]."."; else $birthday = $birthday_array[2].".".$birthday_array[1].".".$birthday_array[0]; } else eval ("\$birthday = \"".$tpl->get("profile_nodeclaration")."\";"); |
|
Das ist der Teil in der profile.php, der mit dem Geburtsdatum zu tun hat. Meine Frage daher: Was muss ich hier ändern, damit nur Admins das Geburtsdatum sehen können?
Danke schonmal im Voraus.
LG
|
|
12.06.11 15:44 |
E-Mail
Finden
Als Freund hinzufügen
|
|
mkkcs
Mitglied
Dabei seit: 06.10.04
Beiträge: 2.051
Fähigkeiten: WBB2 Profi; WBB2 Fortgeschritten; WBB Lite 1 Profi Herkunft: aus Mamas Bauch Forenversion: 2.3; 2.2
|
|
|
13.06.11 00:30 |
E-Mail
WWW
Finden
Als Freund hinzufügen
|
|
:..Melinda..:
Mitglied
Dabei seit: 16.11.08
Beiträge: 7
Fähigkeiten: WBB Lite 1 Fortgeschritten Forenversion: Lite 1.0
Themenstarter
|
|
Hat sich bereits erledigt
Habe einfach folgendes:
code: |
1:
|
if($user_info['birthday'] && $user_info['birthday']!="0000-00-00") { $birthday_array = explode("-",$user_info['birthday']); if($birthday_array[0]=="0000") $birthday = $birthday_array[2].".".$birthday_array[1]."."; else $birthday = $birthday_array[2].".".$birthday_array[1].".".$birthday_array[0]; } else eval ("\$birthday = \"".$tpl->get("profile_nodeclaration")."\";"); |
|
Gegen das hier ausgetauscht:
code: |
1:
|
if($user_info['birthday'] && $user_info['birthday']!="0000-00-00" && $wbbuserdata['issupermod']==1) { $birthday_array = explode("-",$user_info['birthday']); if($birthday_array[0]=="0000") $birthday = $birthday_array[2].".".$birthday_array[1]."."; else $birthday = $birthday_array[2].".".$birthday_array[1].".".$birthday_array[0]; } else eval ("\$birthday = \"".$tpl->get("profile_nodeclaration")."\";"); |
|
Somit erscheint bei Admins und Mods das Geburtsdatum, wenn sie ein Profil eines Users besuchen und bei allen anderen nur der Inhalt der profile-nodeclaration.tpl
LG
|
|
13.06.11 13:09 |
E-Mail
Finden
Als Freund hinzufügen
|
|
|