Changeset 2552
- Timestamp:
- 04/27/11 20:11:20 (13 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 modified
-
lib/phpcommon/playersPrefs.class.php (modified) (4 diffs)
-
site/admin/players_prefs.TBU.trigger.php (added)
-
site/admin/players_prefs.php (modified) (3 diffs)
-
site/includes/strings.inc (modified) (3 diffs)
-
site/manage_profil.php (modified) (2 diffs)
-
site/style/base-style.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/phpcommon/playersPrefs.class.php
r2548 r2552 59 59 function getPrefValue($key) { 60 60 $value = $this->playerclass->getPref($key); 61 if (is_null($value)) return null; 61 if (is_null($value)) { 62 switch($key) { 63 case 'lang_ihm' : 64 return getCurrentLang(); 65 default : 66 return null; 67 } 68 } 62 69 return $value['pref_value']; 63 70 } … … 108 115 109 116 function baseDropDown($key, $list) { 110 $value = $this-> playerclass->getPref($key);117 $value = $this->getPrefValue($key); 111 118 $str = "<select name=\"pref_$key\" class=\"selectpref\" id=\"".$this->getId($key)."\">"; 112 119 foreach ($list as $k =>$v) { 113 120 $str .= "<option value=\"$k\""; 114 if ($k == $value ['pref_value']) $str .= " selected";121 if ($k == $value) $str .= " selected"; 115 122 $str .= ">$v</option>"; 116 123 } … … 120 127 121 128 function baseDropDownMultiple($key, $list) { 122 $value = $this-> playerclass->getPref($key);123 $values = explode(',', $value ['pref_value']);129 $value = $this->getPrefValue($key); 130 $values = explode(',', $value); 124 131 $str = "<select title=\"".getLocalizedString("pref_helper_$key")."\" name=\"pref_$key"."[]\" multiple class=\"selectpref\" id=\"".$this->getId($key)."\">"; 125 132 foreach ($list as $k =>$v) { … … 137 144 $str = "<select size=\"2\" name=\"perm_$key"."[]\" multiple class=\"selectperm\" id=\"perm-".$this->getId($key)."\">"; 138 145 foreach ($plist as $k =>$v) { 139 $str .= "<option value=\"$k\"";146 $str .= "<option class=\"selectperm\" value=\"$k\""; 140 147 if ($value['permissions'] & $k) $str .= " selected"; 141 148 $str .= ">$v</option>"; -
trunk/site/admin/players_prefs.php
r2539 r2552 5 5 6 6 include('adminheader.php'); 7 7 require('playersPrefs.class.php'); 8 8 /* RACE TABLE */ 9 9 … … 61 61 ); 62 62 63 $opts['fdd']['permissions'] = array( 64 'name' => 'Permissions', 65 'help' => nl2br("Permissions"), 66 'select|FLDV' => 'M', 67 'select|ACP' => 'C', 68 'values2' => Array( 69 VLM_ACL_BOATSIT => "Boatsitter", 70 VLM_ACL_AUTH => "VLM Players", 71 ), 72 'sql' => 'MAKE_SET(`PMEtable0`.`permissions`, 1, 2)', 73 // 'maxlen' => 11, 74 // 'default' => '0', 75 'sort' => true 76 ); 77 78 63 79 $opts['fdd']['updated'] = array( 64 80 'name' => 'Last change', … … 68 84 ); 69 85 86 $opts['triggers']['update']['before'][0] = 'players_prefs.TBU.trigger.php'; 87 88 //force basic pme class. 89 require_once('../externals/phpMyEdit/phpMyEdit.class.php'); 90 $pmeinstance = new phpMyEdit($opts); 91 70 92 include('adminfooter.php'); 71 93 -
trunk/site/includes/strings.inc
r2547 r2552 17 17 18 18 "This is not your boat, only boat owner may abandon !" => "This is not your boat, only boat owner may abandon !", 19 "Please connect to create your first boat" => "Please connect to create your first boat", 20 19 "Please connect to create your first boat" => "Please connect to create your first boat", 21 20 "You seem to try to use an old account with boat" => "You seem to try to use an old account with boat", 22 21 "You should do following steps" => "You should do following steps", … … 454 453 'fr' => 455 454 array ( 455 'Visible for' => 'Visible pour', 456 456 'pref_helper_contact_taverne' => 'Copiez l\'url de votre profil ou entrez votre identifiant numérique', 457 457 'pref_helper_contact_revatua' => 'Copiez l\'url de votre profil ou entrez votre identifiant numérique', … … 481 481 'prefsgroup_lang' => 'Préférences de langue', 482 482 'pref_lang_ihm' => 'Langue de l\'interface', 483 'pref_lang_communication' => 'Langue(s) que vous parlez suffisament pour communiquer',483 'pref_lang_communication' => 'Langue(s) connue(s)', 484 484 'prefsgroup_contact' => 'Infos pour vous contacter', 485 485 'pref_contact_email' => 'Courriel', -
trunk/site/manage_profil.php
r2546 r2552 34 34 echo "<div>"; 35 35 echo "<form name=\"prefs\" method=\"post\">"; 36 echo "<table >";36 echo "<table class=\"prefsetter\">"; 37 37 38 38 echoSaveCancel(); … … 48 48 foreach ($pg as $pkey) { 49 49 echo "<tr class=\"prefsetter\">"; 50 echo "<td >".getLocalizedString("pref_$pkey")."</td>";51 echo "<td >".$pp->getform($pkey)."</td>";52 echo "<td >".$pp->permissions($pkey)."</td>";50 echo "<td class=\"prefsetter\">".getLocalizedString("pref_$pkey")."</td>"; 51 echo "<td class=\"prefsetter\">".$pp->getform($pkey)."</td>"; 52 echo "<td class=\"prefsetter\">".$pp->permissions($pkey)."</td>"; 53 53 echo "</tr>"; 54 54 } -
trunk/site/style/base-style.css
r2547 r2552 483 483 } 484 484 485 486 485 .racesummary-type1 { 487 486 font-style: italic; … … 492 491 background-color: #eeeeee; 493 492 } 493 494 td.prefsetter { 495 vertical-align: top; 496 } 497 498 select.selectperm { 499 background-color: #eeeeee; 500 overflow: auto; 501 empty-cells: hide; 502 } 503 504 option { 505 background-color: #eeeeee; 506 }
