Da ich in letzter zeit öfter gelesen habe das einige gerne Game Icons zum auswählen im Profil haben möchten habe ich mich mal dran gesetzt.
Ob es so die beste Lösung ist hmm nun ja es funktioniert auf jeden Fall.
Funktionieren wird es allerdings nur mit den ProfilMod
externer Link
Oder mit unserer umgeänderten Version.
externer Link
In der
/include/contents/user/user_details.php
Folgendes hinzufügen
Unter:
'STAAT' => $staat,
Einfügen:
'GAME1' => $game1, 'GAME2' => $game2, 'GAME3' => $game3,
/include/contents/user/user_info.php
Folgendes hinzufügen
Unter:
if(!empty($row['staat'])){ $staat = "<img src=\"include/images/flags/".$row['staat']."\" border=\"0\" />"; } else { $staat = ""; }
Einfügen:
if(!empty($row['game1'])){ $game1 = "<img src=\"include/images/game_icon/".$row['game1']."\" border=\"0\" />"; } else { $game1 = ""; } if(!empty($row['game2'])){ $game2 = "<img src=\"include/images/game_icon/".$row['game2']."\" border=\"0\" />"; } else { $game2 = ""; } if(!empty($row['game3'])){ $game3 = "<img src=\"include/images/game_icon/".$row['game3']."\" border=\"0\" />"; } else { $game3 = ""; }
/include/contents/user/profil_edit.php
Folgendes hinzufügen
Unter:
$abf = 'SELECT
Einfügen:
game1,game2,game3,
Und
Unter:
$row['staat'] = '<option></option>'.arliste ( $row['staat'] , get_nationality_array() , $tpl , 'staat' );
Einfügen:
$row['game1'] = '<option></option>'.arliste ( $row['game1'] , get_nationality_array1() , $tpl , 'game1' ); $row['game2'] = '<option></option>'.arliste ( $row['game2'] , get_nationality_array2() , $tpl , 'game2' ); $row['game3'] = '<option></option>'.arliste ( $row['game3'] , get_nationality_array3() , $tpl , 'game3' );
Und noch einmal
Unter:
staat = '".escape($_POST['staat'], 'string')."',
Einfügen:
game1 = '".escape($_POST['game1'], 'string')."', game2 = '".escape($_POST['game2'], 'string')."', game3 = '".escape($_POST['game3'], 'string')."',
In der
/include/contents/user/ profil_edit.htm
Folgendes hinzufügen
Unter:
<label style="float:left; width:35%;">{_lang_state}</label><select style="margin-bottom:2px;" name="staat">{_list_staat@<option%1 value="%2">%3</option>}</select><br style="clear:both;" />
Einfügen:
<label style="float:left; width:35%;">{_lang_game1}</label><select style="margin-bottom:2px;" name="game1">{_list_game1@<option%1 value="%2">%3</option>}</select><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_game2}</label><select style="margin-bottom:2px;" name="game2">{_list_game2@<option%1 value="%2">%3</option>}</select><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_game3}</label><select style="margin-bottom:2px;" name="game3">{_list_game3@<option%1 value="%2">%3</option>}</select><br style="clear:both;" />
In der
/include/contents/user/ userdetails.htm
An beliebiger Stelle Folgendes einfügen
<tr> <td height="25">Spiele</td> <td height="25"> {GAME1} {GAME2} {GAME3}</td> </tr>
Jetzt kommen wir zum ende
In der
/include/includes/func/ profilefields.php
Folgendes hinzufügen
Unter:
function profilefields_show_spez_staat ($value,$uid) { global $lang; return ( profilefields_show_echo_standart ( $lang['state'], ((!empty($value) AND file_exists('include/images/flags/'.$value))?'<img src="include/images/flags/'.$value.'" alt="'.$value.'" title="'.$value.'" />':'') ) ); }
Einfügen:
function profilefields_show_spez_game1 ($value,$uid) { global $lang; return ( profilefields_show_echo_standart ( $lang['game1'], ((!empty($value) AND file_exists('include/images/game_icon/'.$value))?'<img src="include/images/game_icon/'.$value.'" alt="'.$value.'" title="'.$value.'" />':'') ) ); } function profilefields_show_spez_game2 ($value,$uid) { global $lang; return ( profilefields_show_echo_standart ( $lang['game2'], ((!empty($value) AND file_exists('include/images/game_icon/'.$value))?'<img src="include/images/game_icon/'.$value.'" alt="'.$value.'" title="'.$value.'" />':'') ) ); } function profilefields_show_spez_game3 ($value,$uid) { global $lang; return ( profilefields_show_echo_standart ( $lang['game3'], ((!empty($value) AND file_exists('include/images/game_icon/'.$value))?'<img src="include/images/game_icon/'.$value.'" alt="'.$value.'" title="'.$value.'" />':'') ) ); }
Und
Unter:
function get_nationality_array () { $ar = array(); $o = opendir ( 'include/images/flags' ); while ( $f = readdir ( $o ) ) { if ( $f != '.' AND $f != '..' ) { $ar[$f] = $f; } } return ( $ar ); }
Einfügen:
function get_nationality_array1 () { $ar = array(); $o = opendir ( 'include/images/game_icon' ); while ( $f = readdir ( $o ) ) { if ( $f != '.' AND $f != '..' ) { $ar[$f] = $f; } } return ( $ar ); } function get_nationality_array2 () { $ar = array(); $o = opendir ( 'include/images/game_icon' ); while ( $f = readdir ( $o ) ) { if ( $f != '.' AND $f != '..' ) { $ar[$f] = $f; } } return ( $ar ); } function get_nationality_array3 () { $ar = array(); $o = opendir ( 'include/images/game_icon' ); while ( $f = readdir ( $o ) ) { if ( $f != '.' AND $f != '..' ) { $ar[$f] = $f; } } return ( $ar ); }
Jetzt die letzten zwei sachen
Einmal in der datenbank
Unter ic1_user
Folgende 3 Felder hinzufügen
game1 varchar 50
game2 varchar 50
game3 varchar 50
Und noch unter /include/images/ einen ordner namens game_icon anlegen
Die game bilder sollten 16 x 16px sein und im Format .gif
Vorschau bilder
1. externer Link
2. externer Link
Hoffe es ist verständlich.
Zuletzt modifiziert von whazza am 23.11.2010 - 20:31:28