@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | function chess_ratings_adj_cxr($white_rating, $white_games, $black_rating, $black_games, $pgn_result) |
| 46 | 46 | { |
| 47 | 47 | // compute score: +1 for win, 0 for draw, -1 for loss |
| 48 | - switch($pgn_result) { |
|
| 48 | + switch ($pgn_result) { |
|
| 49 | 49 | case '1-0': |
| 50 | 50 | $S = 1; |
| 51 | 51 | break; |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | if (($white_games < 5 and $black_games < 5) or ($white_games > 5 and $black_games > 5)) { |
| 62 | 62 | |
| 63 | 63 | // Formula 1: Rnew = Rold + (S x 21) + (Ropponent - Rold) / 25 |
| 64 | - $w_new = ( $S * 21) + ($black_rating - $white_rating) / 25; |
|
| 64 | + $w_new = ($S * 21) + ($black_rating - $white_rating) / 25; |
|
| 65 | 65 | $b_new = (-$S * 21) + ($white_rating - $black_rating) / 25; |
| 66 | 66 | |
| 67 | 67 | } elseif ($white_games > 5 and $black_games < 5) { |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | /**#@+ |
| 31 | 31 | */ |
| 32 | -require_once XOOPS_ROOT_PATH . '/modules/chess/include/functions.inc.php'; |
|
| 32 | +require_once XOOPS_ROOT_PATH.'/modules/chess/include/functions.inc.php'; |
|
| 33 | 33 | /**#@-*/ |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | if (!empty($value_list)) { |
| 92 | 92 | $values = implode(',', $value_list); |
| 93 | 93 | $xoopsDB->query("INSERT INTO $ratings_table (player_uid, rating) VALUES $values"); |
| 94 | - $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR); |
|
| 94 | + $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | // calculate new ratings using configured rating system |
@@ -106,14 +106,14 @@ discard block |
||
| 106 | 106 | SET rating = '$white_rating_new', $white_col = $white_col + 1 |
| 107 | 107 | WHERE player_uid = '{$row['white_uid']}' |
| 108 | 108 | "); |
| 109 | - $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR); |
|
| 109 | + $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR); |
|
| 110 | 110 | |
| 111 | 111 | $xoopsDB->query(" |
| 112 | 112 | UPDATE $ratings_table |
| 113 | 113 | SET rating = '$black_rating_new', $black_col = $black_col + 1 |
| 114 | 114 | WHERE player_uid = '{$row['black_uid']}' |
| 115 | 115 | "); |
| 116 | - $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR); |
|
| 116 | + $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR); |
|
| 117 | 117 | |
| 118 | 118 | return true; |
| 119 | 119 | } |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | $values = implode(',', $value_list); |
| 197 | 197 | |
| 198 | 198 | $xoopsDB->query("INSERT INTO $ratings_table (player_uid, rating, games_won, games_lost, games_drawn) VALUES $values"); |
| 199 | - $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR); |
|
| 199 | + $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR); |
|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | return true; |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | // determine function for getting number of provisional games using configured rating system |
| 219 | - $file = XOOPS_ROOT_PATH . "/modules/chess/include/ratings_{$rating_system}.inc.php"; |
|
| 219 | + $file = XOOPS_ROOT_PATH."/modules/chess/include/ratings_{$rating_system}.inc.php"; |
|
| 220 | 220 | file_exists($file) or trigger_error("missing file '$file' for rating system '$rating_system'", E_USER_ERROR); |
| 221 | 221 | require_once $file; |
| 222 | 222 | $func = "chess_ratings_num_provisional_games_{$rating_system}"; |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | */ |
| 234 | 234 | function chess_ratings_get_func_adj($rating_system) |
| 235 | 235 | { |
| 236 | - $file = XOOPS_ROOT_PATH . "/modules/chess/include/ratings_{$rating_system}.inc.php"; |
|
| 236 | + $file = XOOPS_ROOT_PATH."/modules/chess/include/ratings_{$rating_system}.inc.php"; |
|
| 237 | 237 | file_exists($file) or trigger_error("missing file '$file' for rating system '$rating_system'", E_USER_ERROR); |
| 238 | 238 | require_once $file; |
| 239 | 239 | $func = "chess_ratings_adj_{$rating_system}"; |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | */ |
| 254 | 254 | function chess_ratings_get_columns($pgn_result) |
| 255 | 255 | { |
| 256 | - switch($pgn_result) { |
|
| 256 | + switch ($pgn_result) { |
|
| 257 | 257 | case '1-0': |
| 258 | 258 | $white_col = 'games_won'; |
| 259 | 259 | $black_col = 'games_lost'; |
@@ -59,10 +59,10 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | } else { // for use within a block |
| 61 | 61 | |
| 62 | - $module_handler =& xoops_gethandler('module'); |
|
| 63 | - $module =& $module_handler->getByDirname('chess'); |
|
| 64 | - $config_handler =& xoops_gethandler('config'); |
|
| 65 | - $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); |
|
| 62 | + $module_handler = & xoops_gethandler('module'); |
|
| 63 | + $module = & $module_handler->getByDirname('chess'); |
|
| 64 | + $config_handler = & xoops_gethandler('config'); |
|
| 65 | + $moduleConfig = & $config_handler->getConfigsByCat(0, $module->getVar('mid')); |
|
| 66 | 66 | |
| 67 | 67 | if (isset($moduleConfig[$option])) { |
| 68 | 68 | $value = $moduleConfig[$option]; |
@@ -85,10 +85,10 @@ discard block |
||
| 85 | 85 | global $xoopsUser; |
| 86 | 86 | |
| 87 | 87 | if (isset($uid)) { |
| 88 | - $member_handler =& xoops_gethandler('member'); |
|
| 89 | - $user =& $member_handler->getUser($uid); |
|
| 88 | + $member_handler = & xoops_gethandler('member'); |
|
| 89 | + $user = & $member_handler->getUser($uid); |
|
| 90 | 90 | } elseif (is_object($xoopsUser)) { |
| 91 | - $user =& $xoopsUser; |
|
| 91 | + $user = & $xoopsUser; |
|
| 92 | 92 | } else { |
| 93 | 93 | $user = null; |
| 94 | 94 | } |
@@ -117,10 +117,10 @@ discard block |
||
| 117 | 117 | global $xoopsUser; |
| 118 | 118 | |
| 119 | 119 | if (isset($uid)) { |
| 120 | - $member_handler =& xoops_gethandler('member'); |
|
| 121 | - $user =& $member_handler->getUser($uid); |
|
| 120 | + $member_handler = & xoops_gethandler('member'); |
|
| 121 | + $user = & $member_handler->getUser($uid); |
|
| 122 | 122 | } elseif (is_object($xoopsUser)) { |
| 123 | - $user =& $xoopsUser; |
|
| 123 | + $user = & $xoopsUser; |
|
| 124 | 124 | } else { |
| 125 | 125 | $user = null; |
| 126 | 126 | } |
@@ -193,8 +193,8 @@ discard block |
||
| 193 | 193 | $criteria->add(new Criteria('uname', MyTextSanitizer::addSlashes($uname))); |
| 194 | 194 | $criteria->setLimit(1); |
| 195 | 195 | |
| 196 | - $member_handler =& xoops_gethandler('member'); |
|
| 197 | - $users =& $member_handler->getUserList($criteria); |
|
| 196 | + $member_handler = & xoops_gethandler('member'); |
|
| 197 | + $users = & $member_handler->getUserList($criteria); |
|
| 198 | 198 | |
| 199 | 199 | $uids = array_keys($users); |
| 200 | 200 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | function chess_ratings_adj_linear($white_rating, $white_games, $black_rating, $black_games, $pgn_result) |
| 43 | 43 | { |
| 44 | 44 | // compute score: +1 for win, 0 for draw, -1 for loss |
| 45 | - switch($pgn_result) { |
|
| 45 | + switch ($pgn_result) { |
|
| 46 | 46 | case '1-0': |
| 47 | 47 | $S = 1; |
| 48 | 48 | break; |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | if ($oldversion < 102) { // old version < 1.02: direct update not supported. |
| 58 | 58 | |
| 59 | - $docfile = XOOPS_ROOT_PATH . '/modules/chess/docs/INSTALL.TXT'; |
|
| 59 | + $docfile = XOOPS_ROOT_PATH.'/modules/chess/docs/INSTALL.TXT'; |
|
| 60 | 60 | chess_set_message($module, sprintf(_MI_CHESS_OLD_VERSION, strval($oldversion), $docfile), true); |
| 61 | 61 | return false; |
| 62 | 62 | |
@@ -259,12 +259,12 @@ discard block |
||
| 259 | 259 | * @param string $default Default language subdirectory, used if file for configured language isn't found. |
| 260 | 260 | * @return mixed Return value from including the file. |
| 261 | 261 | */ |
| 262 | -function chess_load_lang_file( $filename, $module = '', $default = 'english' ) |
|
| 262 | +function chess_load_lang_file($filename, $module = '', $default = 'english') |
|
| 263 | 263 | { |
| 264 | 264 | $lang = $GLOBALS['xoopsConfig']['language']; |
| 265 | - $path = XOOPS_ROOT_PATH . ( empty($module) ? '/' : "/modules/$module/" ) . 'language'; |
|
| 266 | - if ( !( $ret = @include_once( "$path/$lang/$filename.php" ) ) ) { |
|
| 267 | - $ret = include_once( "$path/$default/$filename.php" ); |
|
| 265 | + $path = XOOPS_ROOT_PATH.(empty($module) ? '/' : "/modules/$module/").'language'; |
|
| 266 | + if (!($ret = @include_once("$path/$lang/$filename.php"))) { |
|
| 267 | + $ret = include_once("$path/$default/$filename.php"); |
|
| 268 | 268 | } |
| 269 | 269 | return $ret; |
| 270 | 270 | } |
@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | /**#@+ |
| 37 | 37 | */ |
| 38 | -require_once XOOPS_ROOT_PATH . '/modules/chess/include/constants.inc.php'; |
|
| 39 | -require_once XOOPS_ROOT_PATH . '/modules/chess/include/functions.inc.php'; |
|
| 38 | +require_once XOOPS_ROOT_PATH.'/modules/chess/include/constants.inc.php'; |
|
| 39 | +require_once XOOPS_ROOT_PATH.'/modules/chess/include/functions.inc.php'; |
|
| 40 | 40 | /**#@-*/ |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $limit = intval($options[0]); // sanitize with intval() |
| 60 | 60 | |
| 61 | 61 | $where = 'white_uid != black_uid'; |
| 62 | - switch($options[1]) { |
|
| 62 | + switch ($options[1]) { |
|
| 63 | 63 | case 1: |
| 64 | 64 | $where .= " AND pgn_result = '*'"; |
| 65 | 65 | break; |
@@ -109,9 +109,9 @@ discard block |
||
| 109 | 109 | $xoopsDB->freeRecordSet($result); |
| 110 | 110 | |
| 111 | 111 | // get mapping of user IDs to usernames |
| 112 | - $member_handler =& xoops_gethandler('member'); |
|
| 113 | - $criteria = new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'); |
|
| 114 | - $usernames = $member_handler->getUserList($criteria); |
|
| 112 | + $member_handler = & xoops_gethandler('member'); |
|
| 113 | + $criteria = new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'); |
|
| 114 | + $usernames = $member_handler->getUserList($criteria); |
|
| 115 | 115 | |
| 116 | 116 | // add usernames to $games |
| 117 | 117 | foreach ($games as $k => $game) { |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $limit = intval($options[0]); // sanitize with intval() |
| 147 | 147 | |
| 148 | - switch($options[1]) { |
|
| 148 | + switch ($options[1]) { |
|
| 149 | 149 | case 1: |
| 150 | 150 | $where = "game_type = 'open'"; |
| 151 | 151 | break; |
@@ -192,9 +192,9 @@ discard block |
||
| 192 | 192 | $xoopsDB->freeRecordSet($result); |
| 193 | 193 | |
| 194 | 194 | // get mapping of user IDs to usernames |
| 195 | - $member_handler =& xoops_gethandler('member'); |
|
| 196 | - $criteria = new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'); |
|
| 197 | - $usernames = $member_handler->getUserList($criteria); |
|
| 195 | + $member_handler = & xoops_gethandler('member'); |
|
| 196 | + $criteria = new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'); |
|
| 197 | + $usernames = $member_handler->getUserList($criteria); |
|
| 198 | 198 | |
| 199 | 199 | // add usernames to $challenges |
| 200 | 200 | foreach ($challenges as $k => $challenge) { |
@@ -224,12 +224,12 @@ discard block |
||
| 224 | 224 | return array(); |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - require_once XOOPS_ROOT_PATH . '/modules/chess/include/ratings.inc.php'; |
|
| 227 | + require_once XOOPS_ROOT_PATH.'/modules/chess/include/ratings.inc.php'; |
|
| 228 | 228 | |
| 229 | - $module_handler =& xoops_gethandler('module'); |
|
| 230 | - $module =& $module_handler->getByDirname('chess'); |
|
| 231 | - $config_handler =& xoops_gethandler('config'); |
|
| 232 | - $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); |
|
| 229 | + $module_handler = & xoops_gethandler('module'); |
|
| 230 | + $module = & $module_handler->getByDirname('chess'); |
|
| 231 | + $config_handler = & xoops_gethandler('config'); |
|
| 232 | + $moduleConfig = & $config_handler->getConfigsByCat(0, $module->getVar('mid')); |
|
| 233 | 233 | $block['rating_system'] = $moduleConfig['rating_system']; |
| 234 | 234 | $block['provisional_games'] = chess_ratings_num_provisional_games(); |
| 235 | 235 | |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | |
| 243 | 243 | $limit = intval($options[0]); // sanitize with intval() |
| 244 | 244 | |
| 245 | - switch($options[1]) { |
|
| 245 | + switch ($options[1]) { |
|
| 246 | 246 | case 1: |
| 247 | 247 | $block['show_provisional_ratings'] = false; |
| 248 | 248 | $where = "(games_won+games_lost+games_drawn) >= '{$block['provisional_games']}'"; |
@@ -285,9 +285,9 @@ discard block |
||
| 285 | 285 | |
| 286 | 286 | // get mapping of user IDs to usernames |
| 287 | 287 | if (!empty($userids)) { |
| 288 | - $member_handler =& xoops_gethandler('member'); |
|
| 289 | - $criteria = new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'); |
|
| 290 | - $usernames = $member_handler->getUserList($criteria); |
|
| 288 | + $member_handler = & xoops_gethandler('member'); |
|
| 289 | + $criteria = new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'); |
|
| 290 | + $usernames = $member_handler->getUserList($criteria); |
|
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | // add usernames to $players |
@@ -36,17 +36,17 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | include '../../mainfile.php'; |
| 38 | 38 | $xoopsOption['template_main'] = 'chess_games.html'; |
| 39 | -include_once XOOPS_ROOT_PATH . '/header.php'; |
|
| 40 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 41 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 42 | -require_once XOOPS_ROOT_PATH . '/modules/chess/include/constants.inc.php'; |
|
| 43 | -require_once XOOPS_ROOT_PATH . '/modules/chess/include/functions.inc.php'; |
|
| 39 | +include_once XOOPS_ROOT_PATH.'/header.php'; |
|
| 40 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 41 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 42 | +require_once XOOPS_ROOT_PATH.'/modules/chess/include/constants.inc.php'; |
|
| 43 | +require_once XOOPS_ROOT_PATH.'/modules/chess/include/functions.inc.php'; |
|
| 44 | 44 | |
| 45 | 45 | #var_dump($_REQUEST);#*#DEBUG# |
| 46 | 46 | |
| 47 | 47 | chess_get_games(); |
| 48 | 48 | |
| 49 | -include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
| 49 | +include_once XOOPS_ROOT_PATH.'/footer.php'; |
|
| 50 | 50 | /**#@-*/ |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | // offset of first row of games table to display (default to 0) |
| 66 | 66 | $gstart = intval(isset($_POST['gstart']) ? $_POST['gstart'] : @$_GET['gstart']); |
| 67 | 67 | // challenges display option |
| 68 | - $cshow = intval(isset($_POST['cshow']) ? $_POST['cshow'] : @$_GET['cshow']); |
|
| 68 | + $cshow = intval(isset($_POST['cshow']) ? $_POST['cshow'] : @$_GET['cshow']); |
|
| 69 | 69 | // games display option 1 |
| 70 | 70 | $gshow1 = intval(isset($_POST['gshow1']) ? $_POST['gshow1'] : @$_GET['gshow1']); |
| 71 | 71 | // games display option 2 |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $games_table = $xoopsDB->prefix('chess_games'); |
| 103 | 103 | |
| 104 | 104 | $where = 'white_uid != black_uid'; |
| 105 | - switch($gshow1) { |
|
| 105 | + switch ($gshow1) { |
|
| 106 | 106 | case 1: |
| 107 | 107 | $where .= " AND pgn_result = '*'"; |
| 108 | 108 | break; |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | $challenges_table = $xoopsDB->prefix('chess_challenges'); |
| 167 | 167 | |
| 168 | - switch($cshow) { |
|
| 168 | + switch ($cshow) { |
|
| 169 | 169 | case _CHESS_SHOW_CHALLENGES_OPEN: |
| 170 | 170 | $where = "game_type = 'open'"; |
| 171 | 171 | break; |
@@ -222,9 +222,9 @@ discard block |
||
| 222 | 222 | // --------- |
| 223 | 223 | |
| 224 | 224 | // get mapping of user IDs to usernames |
| 225 | - $member_handler =& xoops_gethandler('member'); |
|
| 226 | - $criteria = new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'); |
|
| 227 | - $usernames = $member_handler->getUserList($criteria); |
|
| 225 | + $member_handler = & xoops_gethandler('member'); |
|
| 226 | + $criteria = new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'); |
|
| 227 | + $usernames = $member_handler->getUserList($criteria); |
|
| 228 | 228 | |
| 229 | 229 | // add usernames to $games |
| 230 | 230 | foreach ($games as $k => $game) { |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | $challenges[$k]['username_player2'] = isset($usernames[$challenge['player2_uid']]) ? $usernames[$challenge['player2_uid']] : '?'; |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | - $xoopsTpl->assign('chess_games', $games); |
|
| 241 | + $xoopsTpl->assign('chess_games', $games); |
|
| 242 | 242 | $xoopsTpl->assign('chess_challenges', $challenges); |
| 243 | 243 | |
| 244 | 244 | $xoopsTpl->assign('chess_rating_system', chess_moduleConfig('rating_system')); |
@@ -264,16 +264,16 @@ discard block |
||
| 264 | 264 | $form2 = new XoopsThemeForm('', 'form2', 'index.php'); |
| 265 | 265 | $form2->addElement(new XoopsFormButton('', 'submit', _MD_CHESS_SUBMIT_BUTTON, 'submit')); |
| 266 | 266 | $menu_gshow1 = new XoopsFormSelect('', 'gshow1', $gshow1, 1, false); |
| 267 | - $menu_gshow1->addOption(_CHESS_SHOW_GAMES_INPLAY, _MD_CHESS_SHOW_GAMES_INPLAY); |
|
| 267 | + $menu_gshow1->addOption(_CHESS_SHOW_GAMES_INPLAY, _MD_CHESS_SHOW_GAMES_INPLAY); |
|
| 268 | 268 | $menu_gshow1->addOption(_CHESS_SHOW_GAMES_CONCLUDED, _MD_CHESS_SHOW_GAMES_CONCLUDED); |
| 269 | - $menu_gshow1->addOption(_CHESS_SHOW_GAMES_BOTH, _MD_CHESS_SHOW_GAMES_BOTH); |
|
| 269 | + $menu_gshow1->addOption(_CHESS_SHOW_GAMES_BOTH, _MD_CHESS_SHOW_GAMES_BOTH); |
|
| 270 | 270 | $form2->addElement($menu_gshow1); |
| 271 | 271 | $menu_gshow2 = new XoopsFormSelect('', 'gshow2', $gshow2, 1, false); |
| 272 | - $menu_gshow2->addOption(_CHESS_SHOW_GAMES_RATED, _MD_CHESS_SHOW_GAMES_RATED); |
|
| 272 | + $menu_gshow2->addOption(_CHESS_SHOW_GAMES_RATED, _MD_CHESS_SHOW_GAMES_RATED); |
|
| 273 | 273 | $menu_gshow2->addOption(_CHESS_SHOW_GAMES_UNRATED, _MD_CHESS_SHOW_GAMES_UNRATED); |
| 274 | 274 | $form2->addElement($menu_gshow2); |
| 275 | 275 | $form2->addElement(new XoopsFormHidden('cstart', $cstart)); |
| 276 | - $form2->addElement(new XoopsFormHidden('cshow', $cshow)); |
|
| 276 | + $form2->addElement(new XoopsFormHidden('cshow', $cshow)); |
|
| 277 | 277 | $form2->assign($xoopsTpl); |
| 278 | 278 | |
| 279 | 279 | #*#DEBUG# - trying something unrelated to the chess module |
@@ -11,41 +11,41 @@ |
||
| 11 | 11 | * @ignore |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -define('_AM_CHESS_CONF', 'Chess'); |
|
| 14 | +define('_AM_CHESS_CONF', 'Chess'); |
|
| 15 | 15 | |
| 16 | -define('_AM_CHESS_PREFS', 'Preferences'); |
|
| 16 | +define('_AM_CHESS_PREFS', 'Preferences'); |
|
| 17 | 17 | define('_AM_CHESS_PREFS_DESC', 'Edit module preferences'); |
| 18 | 18 | |
| 19 | -define('_AM_CHESS_SUSPENDED_GAMES', 'Suspended games'); |
|
| 19 | +define('_AM_CHESS_SUSPENDED_GAMES', 'Suspended games'); |
|
| 20 | 20 | define('_AM_CHESS_SUSPENDED_GAMES_DES', 'View games that have been suspended'); |
| 21 | 21 | |
| 22 | -define('_AM_CHESS_ACTIVE_GAMES', 'Active games'); |
|
| 22 | +define('_AM_CHESS_ACTIVE_GAMES', 'Active games'); |
|
| 23 | 23 | define('_AM_CHESS_ACTIVE_GAMES_DES', 'View games that are active'); |
| 24 | 24 | |
| 25 | -define('_AM_CHESS_CHALLENGES', 'Challenges'); |
|
| 25 | +define('_AM_CHESS_CHALLENGES', 'Challenges'); |
|
| 26 | 26 | define('_AM_CHESS_CHALLENGES_DES', 'View challenges'); |
| 27 | 27 | |
| 28 | -define('_AM_CHESS_GAME', 'Game'); |
|
| 29 | -define('_AM_CHESS_CHALLENGE', 'Challenge'); |
|
| 30 | -define('_AM_CHESS_VS', 'vs.'); |
|
| 31 | -define('_AM_CHESS_CHALLENGED', 'challenged'); |
|
| 32 | -define('_AM_CHESS_CREATED', 'created'); |
|
| 28 | +define('_AM_CHESS_GAME', 'Game'); |
|
| 29 | +define('_AM_CHESS_CHALLENGE', 'Challenge'); |
|
| 30 | +define('_AM_CHESS_VS', 'vs.'); |
|
| 31 | +define('_AM_CHESS_CHALLENGED', 'challenged'); |
|
| 32 | +define('_AM_CHESS_CREATED', 'created'); |
|
| 33 | 33 | |
| 34 | -define('_AM_CHESS_WHEN_SUSPENDED', 'When suspended'); |
|
| 35 | -define('_AM_CHESS_SUSPENDED_BY', 'Suspended by'); |
|
| 36 | -define('_AM_CHESS_SUSPENSION_TYPE', 'Suspension type'); |
|
| 34 | +define('_AM_CHESS_WHEN_SUSPENDED', 'When suspended'); |
|
| 35 | +define('_AM_CHESS_SUSPENDED_BY', 'Suspended by'); |
|
| 36 | +define('_AM_CHESS_SUSPENSION_TYPE', 'Suspension type'); |
|
| 37 | 37 | define('_AM_CHESS_SUSPENSION_REASON', 'Suspension reason'); |
| 38 | 38 | define('_AM_CHESS_SUSP_TYPE_ARBITER', 'Suspended by arbiter'); |
| 39 | -define('_AM_CHESS_SUSP_TYPE_PLAYER', 'Arbitration requested'); |
|
| 39 | +define('_AM_CHESS_SUSP_TYPE_PLAYER', 'Arbitration requested'); |
|
| 40 | 40 | |
| 41 | -define('_AM_CHESS_ARBITRATE_SUBMIT', 'Arbitrate'); |
|
| 41 | +define('_AM_CHESS_ARBITRATE_SUBMIT', 'Arbitrate'); |
|
| 42 | 42 | |
| 43 | 43 | define('_AM_CHESS_NO_SUSPENDED_GAMES', 'No suspended games'); |
| 44 | -define('_AM_CHESS_NO_ACTIVE_GAMES', 'No active games'); |
|
| 45 | -define('_AM_CHESS_NO_CHALLENGES', 'No challenges'); |
|
| 44 | +define('_AM_CHESS_NO_ACTIVE_GAMES', 'No active games'); |
|
| 45 | +define('_AM_CHESS_NO_CHALLENGES', 'No challenges'); |
|
| 46 | 46 | |
| 47 | -define('_AM_CHESS_UNKNOWN_USER', '*unknown*'); |
|
| 48 | -define('_AM_CHESS_ERROR', '*error*'); |
|
| 47 | +define('_AM_CHESS_UNKNOWN_USER', '*unknown*'); |
|
| 48 | +define('_AM_CHESS_ERROR', '*error*'); |
|
| 49 | 49 | |
| 50 | 50 | /**#@-*/ |
| 51 | 51 | |
@@ -71,11 +71,11 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | define('_HE_CHESS_RATINGS_TITLE', 'Player rating system'); |
| 73 | 73 | |
| 74 | -define('_HE_CHESS_RATINGS_CXR', ' |
|
| 74 | +define('_HE_CHESS_RATINGS_CXR', ' |
|
| 75 | 75 | CXR - An adaptation of the ELO rating system, used by permission of <a target="_blank" href="http://chess-express.com/">Chess Express Ratings, Inc.</a> |
| 76 | 76 | '); |
| 77 | 77 | |
| 78 | -define('_HE_CHESS_RATINGS_LINEAR', ' |
|
| 78 | +define('_HE_CHESS_RATINGS_LINEAR', ' |
|
| 79 | 79 | Linear - A very simple system that adds (subtracts) a fixed number of points for a win (loss). |
| 80 | 80 | '); |
| 81 | 81 | |
@@ -248,22 +248,22 @@ discard block |
||
| 248 | 248 | define('_HE_CHESS_NOTATION_020', ' |
| 249 | 249 | The notation for a move is composed of four parts (and an optional fifth part for pawn promotion): |
| 250 | 250 | '); |
| 251 | -define('_HE_CHESS_NOTATION_020_1', 'Piece'); |
|
| 252 | -define('_HE_CHESS_NOTATION_020_1_A', 'K (King)'); |
|
| 253 | -define('_HE_CHESS_NOTATION_020_1_B', 'Q (Queen)'); |
|
| 254 | -define('_HE_CHESS_NOTATION_020_1_C', 'R (Rook)'); |
|
| 255 | -define('_HE_CHESS_NOTATION_020_1_D', 'B (Bishop)'); |
|
| 256 | -define('_HE_CHESS_NOTATION_020_1_E', 'N (Knight)'); |
|
| 257 | -define('_HE_CHESS_NOTATION_020_1_F', 'P (Pawn)'); |
|
| 258 | -define('_HE_CHESS_NOTATION_020_2', 'Initial tile'); |
|
| 259 | -define('_HE_CHESS_NOTATION_020_2_A', 'Examples: e4, f2, h8'); |
|
| 260 | -define('_HE_CHESS_NOTATION_020_3', 'Action'); |
|
| 261 | -define('_HE_CHESS_NOTATION_020_3_A', '- (move)'); |
|
| 262 | -define('_HE_CHESS_NOTATION_020_3_B', 'x (capture)'); |
|
| 263 | -define('_HE_CHESS_NOTATION_020_4', 'Destination tile'); |
|
| 264 | -define('_HE_CHESS_NOTATION_020_4_A', 'Examples: a8, c6, g5'); |
|
| 265 | -define('_HE_CHESS_NOTATION_020_5', 'Pawn promotion (when applicable)'); |
|
| 266 | -define('_HE_CHESS_NOTATION_020_5_A', 'Possible values: =Q, =R, =B, =N'); |
|
| 251 | +define('_HE_CHESS_NOTATION_020_1', 'Piece'); |
|
| 252 | +define('_HE_CHESS_NOTATION_020_1_A', 'K (King)'); |
|
| 253 | +define('_HE_CHESS_NOTATION_020_1_B', 'Q (Queen)'); |
|
| 254 | +define('_HE_CHESS_NOTATION_020_1_C', 'R (Rook)'); |
|
| 255 | +define('_HE_CHESS_NOTATION_020_1_D', 'B (Bishop)'); |
|
| 256 | +define('_HE_CHESS_NOTATION_020_1_E', 'N (Knight)'); |
|
| 257 | +define('_HE_CHESS_NOTATION_020_1_F', 'P (Pawn)'); |
|
| 258 | +define('_HE_CHESS_NOTATION_020_2', 'Initial tile'); |
|
| 259 | +define('_HE_CHESS_NOTATION_020_2_A', 'Examples: e4, f2, h8'); |
|
| 260 | +define('_HE_CHESS_NOTATION_020_3', 'Action'); |
|
| 261 | +define('_HE_CHESS_NOTATION_020_3_A', '- (move)'); |
|
| 262 | +define('_HE_CHESS_NOTATION_020_3_B', 'x (capture)'); |
|
| 263 | +define('_HE_CHESS_NOTATION_020_4', 'Destination tile'); |
|
| 264 | +define('_HE_CHESS_NOTATION_020_4_A', 'Examples: a8, c6, g5'); |
|
| 265 | +define('_HE_CHESS_NOTATION_020_5', 'Pawn promotion (when applicable)'); |
|
| 266 | +define('_HE_CHESS_NOTATION_020_5_A', 'Possible values: =Q, =R, =B, =N'); |
|
| 267 | 267 | |
| 268 | 268 | define('_HE_CHESS_NOTATION_030', ' |
| 269 | 269 | Examples of complete moves: |