Compare commits
3
Commits
4925b345bc
...
c6a210f281
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6a210f281 | ||
|
|
ad1ed7e45a | ||
|
|
6aeee287f8 |
@@ -1,7 +1,18 @@
|
||||
in macMahon export -> under country copy clubs.
|
||||
Edit in delete button in line
|
||||
make update person per person
|
||||
Remove update egd data
|
||||
|
||||
https://stackoverflow.com/questions/18796221/creating-a-select-box-with-a-search-option
|
||||
|
||||
|
||||
<input list="brow">
|
||||
<datalist id="brow">
|
||||
<option value="Internet Explorer">
|
||||
<option value="Firefox">
|
||||
<option value="Chrome">
|
||||
<option value="Opera">
|
||||
<option value="Safari">
|
||||
</datalist>
|
||||
|
||||
```json
|
||||
{"retcode":"Ok","Pin_Player":"12098053","AGAID":"0","Last_Name":"Podavini","Name":"Aldo","Country_Code":"IT","Club":"Mila","Grade":"5k","Grade_n":"25","EGF_Placement":"0","Gor":"1576","DGor":"0","Proposed_Grade":"","Tot_Tournaments":"36","Last_Appearance":"T101212A","Elab_Date":"2009-04-03","Hidden_History":"0","Real_Last_Name":"Podavini","Real_Name":"Aldo"}
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
$macmahonfirst = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<Tournament typeversion="9">
|
||||
<NumberOfRounds>5</NumberOfRounds>
|
||||
<CurrentRoundNumber>1</CurrentRoundNumber>
|
||||
<TakeCurrentRoundInAccount>true</TakeCurrentRoundInAccount>
|
||||
<DefaultAsianName>false</DefaultAsianName>
|
||||
<RatingAllowed>false</RatingAllowed>
|
||||
<RatingLowestOneDanRating>2050</RatingLowestOneDanRating>
|
||||
<RatingDeterminesRank>false</RatingDeterminesRank>
|
||||
<RatingDeterminesStartScore>false</RatingDeterminesStartScore>
|
||||
<LowerMacMahonBar>true</LowerMacMahonBar>
|
||||
<LowerMacMahonBarLevel>10k</LowerMacMahonBarLevel>
|
||||
<UpperMacMahonBar>true</UpperMacMahonBar>
|
||||
<UpperMacMahonBarLevel>2k</UpperMacMahonBarLevel>
|
||||
<UpperMacMahonBarRating>0</UpperMacMahonBarRating>
|
||||
<ByeShouldResultInZeroSOSetc>false</ByeShouldResultInZeroSOSetc>
|
||||
<HalfScoreGroupsRoundDown>false</HalfScoreGroupsRoundDown>
|
||||
<HalfScoreGroupsRoundDownNotJigo>true</HalfScoreGroupsRoundDownNotJigo>
|
||||
<PreliminaryDefaultRegistration>false</PreliminaryDefaultRegistration>
|
||||
<OnlineEgdSupport>true</OnlineEgdSupport>
|
||||
<OnlineEgdSupportByPin>false</OnlineEgdSupportByPin>
|
||||
<HandicapUsed>true</HandicapUsed>
|
||||
<HandicapBelow>false</HandicapBelow>
|
||||
<HandicapBelowLevel>1d</HandicapBelowLevel>
|
||||
<HandicapByLevel>true</HandicapByLevel>
|
||||
<HandicapAdjustment>true</HandicapAdjustment>
|
||||
<HandicapAdjustmentValue>-2</HandicapAdjustmentValue>
|
||||
<HandicapLimit>true</HandicapLimit>
|
||||
<HandicapLimitValue>9</HandicapLimitValue>
|
||||
<HandicapIncludeInTieBreakers>true</HandicapIncludeInTieBreakers>
|
||||
<AllowJigo>false</AllowJigo>
|
||||
<Boardsize>19</Boardsize>
|
||||
<PairingsMarkFixedBoardnumbers>true</PairingsMarkFixedBoardnumbers>
|
||||
<PairingsMarkMissingResults>true</PairingsMarkMissingResults>
|
||||
<PairingsMarkWinner>true</PairingsMarkWinner>
|
||||
<PairingsMarkUnwantedPairings>true</PairingsMarkUnwantedPairings>
|
||||
<PairingsShowLevels>true</PairingsShowLevels>
|
||||
<PairingsShortNotationForLevel>false</PairingsShortNotationForLevel>
|
||||
<PairingsShowScores>false</PairingsShowScores>
|
||||
<PairingsShowHandicaps>true</PairingsShowHandicaps>
|
||||
<PairingsFontsize>18</PairingsFontsize>
|
||||
<PairingsBlackColumnWidth>283</PairingsBlackColumnWidth>
|
||||
<PairingsWhiteColumnWidth>301</PairingsWhiteColumnWidth>
|
||||
<ImportEncoding>UTF-8</ImportEncoding>
|
||||
<ExportColumnDelimiter><![CDATA[f]]></ExportColumnDelimiter>
|
||||
<ExportWalllistShowTournamentTitle>true</ExportWalllistShowTournamentTitle>
|
||||
<ExportEncoding>UTF-8</ExportEncoding>
|
||||
<VersionCreated>MacMahon 3.10</VersionCreated>
|
||||
<VersionSaved>MacMahon 3.10</VersionSaved>
|
||||
<MakePairingTopGroup>true</MakePairingTopGroup>
|
||||
<MakePairingTopGroupEverywhere>false</MakePairingTopGroupEverywhere>
|
||||
<MakePairingTopGroupStrictlyByTopBar>false</MakePairingTopGroupStrictlyByTopBar>
|
||||
<MakePairingTopGroupByNumberOfPlayersAuto>true</MakePairingTopGroupByNumberOfPlayersAuto>
|
||||
<MakePairingTopGroupByNumberOfPlayers>0</MakePairingTopGroupByNumberOfPlayers>
|
||||
<MakePairingTopGroupSeeding>true</MakePairingTopGroupSeeding>
|
||||
<MakePairingSeedingPlacementCriterion typeversion="2">
|
||||
<ShortName>SOS</ShortName>
|
||||
</MakePairingSeedingPlacementCriterion>
|
||||
<MakePairingTopGroupSeedingByRating>false</MakePairingTopGroupSeedingByRating>
|
||||
<MakePairingTopGroupSeedingByRatingRound>2</MakePairingTopGroupSeedingByRatingRound>
|
||||
<MakePairingOutsideTopGroupSameCountry>true</MakePairingOutsideTopGroupSameCountry>
|
||||
<MakePairingOutsideTopGroupSameClub>true</MakePairingOutsideTopGroupSameClub>
|
||||
<MakePairingOutsideTopGroupSameNationality>false</MakePairingOutsideTopGroupSameNationality>
|
||||
<MakePairingOutsideTopGroupStrengthDifference>true</MakePairingOutsideTopGroupStrengthDifference>
|
||||
<MakePairingOutsideTopGroupStrengthDifferenceValue>3</MakePairingOutsideTopGroupStrengthDifferenceValue>
|
||||
<MakePairingOutsideTopGroupColorBalance>true</MakePairingOutsideTopGroupColorBalance>
|
||||
<MakePairingOutsideTopGroupWeakOddMan>true</MakePairingOutsideTopGroupWeakOddMan>
|
||||
<MakePairingOutsideTopGroupSeeding>false</MakePairingOutsideTopGroupSeeding>
|
||||
<PrintWalllistFont>SansSerif</PrintWalllistFont>
|
||||
<PrintWalllistFontsize>9</PrintWalllistFontsize>
|
||||
<PrintWalllistIndentationTop>0</PrintWalllistIndentationTop>
|
||||
<PrintWalllistIndentationLeft>0</PrintWalllistIndentationLeft>
|
||||
<PrintWalllistColumnDistance>2</PrintWalllistColumnDistance>
|
||||
<PrintWalllistAbbreviateName>true</PrintWalllistAbbreviateName>
|
||||
<PrintWalllistAbbreviateNameLength>28</PrintWalllistAbbreviateNameLength>
|
||||
<PrintPairingsFont>SansSerif</PrintPairingsFont>
|
||||
<PrintPairingsFontsize>10</PrintPairingsFontsize>
|
||||
<PrintPairingsIndentationTop>0</PrintPairingsIndentationTop>
|
||||
<PrintPairingsIndentationLeft>0</PrintPairingsIndentationLeft>
|
||||
<PrintPairingsColumnDistance>3</PrintPairingsColumnDistance>
|
||||
<PrintPairingsAbbreviateName>true</PrintPairingsAbbreviateName>
|
||||
<PrintPairingsAbbreviateNameLength>35</PrintPairingsAbbreviateNameLength>
|
||||
<Walllist typeversion="3">
|
||||
<ShowCountry>true</ShowCountry>
|
||||
<ShowClub>true</ShowClub>
|
||||
<ShowClubEgdName>false</ShowClubEgdName>
|
||||
<ShowClubAbbreviateName>true</ShowClubAbbreviateName>
|
||||
<ShowLevels>true</ShowLevels>
|
||||
<ShortNotationForLevel>false</ShortNotationForLevel>
|
||||
<ShowBarMembership>true</ShowBarMembership>
|
||||
<ShowRatings>true</ShowRatings>
|
||||
<MarkPreliminaryRegisteredParticipants>true</MarkPreliminaryRegisteredParticipants>
|
||||
<MarkResultsByReferree>true</MarkResultsByReferree>
|
||||
<ShowColors>false</ShowColors>
|
||||
<ShowHandicap>true</ShowHandicap>
|
||||
<ShowWarningMissingPairing>true</ShowWarningMissingPairing>
|
||||
<Fontsize>18</Fontsize>
|
||||
<NameColumnWidth>221</NameColumnWidth>
|
||||
<ClubColumnWidth>0</ClubColumnWidth>
|
||||
<ClubColumnAlignmentCenter>true</ClubColumnAlignmentCenter>
|
||||
<WeakSortCriteria>1</WeakSortCriteria>
|
||||
<SortCriterionDescriptor typeversion="2">
|
||||
<ShortName>Score</ShortName>
|
||||
</SortCriterionDescriptor>
|
||||
<SortCriterionDescriptor typeversion="2">
|
||||
<ShortName>SOS</ShortName>
|
||||
</SortCriterionDescriptor>
|
||||
<SortCriterionDescriptor typeversion="2">
|
||||
<ShortName>SOSOS</ShortName>
|
||||
</SortCriterionDescriptor>
|
||||
<SortCriterionDescriptor typeversion="2">
|
||||
<ShortName>ScoreX</ShortName>
|
||||
</SortCriterionDescriptor>
|
||||
</Walllist>';
|
||||
|
||||
$macmahonlast = '<TournamentRound typeversion="2">
|
||||
<RoundNumber>1</RoundNumber>
|
||||
<LastUpdated>2026-05-13 21:30:31</LastUpdated>
|
||||
</TournamentRound>
|
||||
<TournamentRound typeversion="2">
|
||||
<RoundNumber>2</RoundNumber>
|
||||
<LastUpdated>2026-05-13 21:30:21</LastUpdated>
|
||||
</TournamentRound>
|
||||
<TournamentRound typeversion="2">
|
||||
<RoundNumber>3</RoundNumber>
|
||||
<LastUpdated>2026-05-13 21:30:10</LastUpdated>
|
||||
</TournamentRound>
|
||||
<TournamentRound typeversion="2">
|
||||
<RoundNumber>4</RoundNumber>
|
||||
<LastUpdated>2026-05-13 21:29:20</LastUpdated>
|
||||
</TournamentRound>
|
||||
<TournamentRound typeversion="2">
|
||||
<RoundNumber>5</RoundNumber>
|
||||
<LastUpdated>2026-05-13 21:29:04</LastUpdated>
|
||||
</TournamentRound>
|
||||
</Tournament>';
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
go_form_admin_action('export_mcmahon');
|
||||
go_form_admin_action('export_macmahon');
|
||||
if (!isset($_POST['value_one'])) {
|
||||
wp_redirect(admin_url('admin.php?page=go-form-settings'));
|
||||
exit;
|
||||
@@ -15,9 +15,43 @@ header('Content-Type: text/xml; charset=utf-8');
|
||||
header('Content-Disposition: attachment; filename="go-form-' . sanitize_title($form_name) . '-export-macmahon.xml"');
|
||||
|
||||
$output = fopen('php://output', 'w');
|
||||
include_once 'mcmahon-help.php';
|
||||
include_once 'macmahon-help.php';
|
||||
|
||||
fwrite($output, $mcmahonfirst);
|
||||
fwrite($output, $macmahonfirst);
|
||||
|
||||
// Gather the distinct clubs used per country among the actual participants
|
||||
$clubs_by_country = [];
|
||||
foreach ($entries as $e) {
|
||||
$country_code = strtoupper(trim($e->country));
|
||||
$club = trim($e->club);
|
||||
if ($country_code === '' || $club === '') {
|
||||
continue;
|
||||
}
|
||||
if (!isset($clubs_by_country[$country_code])) {
|
||||
$clubs_by_country[$country_code] = [];
|
||||
}
|
||||
if (!in_array($club, $clubs_by_country[$country_code], true)) {
|
||||
$clubs_by_country[$country_code][] = $club;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($countries as $code => $name) {
|
||||
$out = ' <Country typeversion="1">
|
||||
<InternetCode>' . esc_html(strtolower($code)) . '</InternetCode>
|
||||
<Name>' . esc_html($name) . '</Name>';
|
||||
if (!empty($clubs_by_country[$code])) {
|
||||
foreach ($clubs_by_country[$code] as $club) {
|
||||
$out .= '
|
||||
<Club typeversion="1">
|
||||
<Name>' . esc_html($club) . '</Name>
|
||||
<EGDName>' . esc_html($club) . '</EGDName>
|
||||
</Club>';
|
||||
}
|
||||
}
|
||||
$out .= '
|
||||
</Country>';
|
||||
fwrite($output, $out);
|
||||
}
|
||||
|
||||
foreach ($entries as $i => $e) {
|
||||
$rank = $ranks[$e->rank];
|
||||
@@ -44,6 +78,6 @@ foreach ($entries as $i => $e) {
|
||||
fwrite($output, $out);
|
||||
}
|
||||
|
||||
fwrite($output, $mcmahonlast);
|
||||
fwrite($output, $macmahonlast);
|
||||
|
||||
fclose($output);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -378,13 +378,13 @@ function go_form_export_opengotha()
|
||||
}
|
||||
add_action('admin_post_go_form_export_opengotha', 'go_form_export_opengotha');
|
||||
|
||||
function go_form_export_mcmahon()
|
||||
function go_form_export_macmahon()
|
||||
{
|
||||
global $ranks;
|
||||
include_once 'export/mcmahon.php';
|
||||
global $ranks, $countries;
|
||||
include_once 'export/macmahon.php';
|
||||
exit;
|
||||
}
|
||||
add_action('admin_post_go_form_export_mcmahon', 'go_form_export_mcmahon');
|
||||
add_action('admin_post_go_form_export_macmahon', 'go_form_export_macmahon');
|
||||
|
||||
// ========== Custom Field Admin Actions ==========
|
||||
function go_form_create_custom_field()
|
||||
|
||||
@@ -61,7 +61,7 @@ if (isset($_GET['error']) && $_GET['error'] == 'egd_update_failed')
|
||||
action_button('go_form_export_csv', 'Export to CSV', 'Confirm Export', $selected_form_id);
|
||||
action_button('go_form_export_pairgoth', 'Export to Pairgoth', 'Confirm Export', $selected_form_id);
|
||||
action_button('go_form_export_opengotha', 'Export to Opengoth', 'Confirm Export', $selected_form_id);
|
||||
action_button('go_form_export_mcmahon', 'Export to McMahon', 'Confirm Export', $selected_form_id);
|
||||
action_button('go_form_export_macmahon', 'Export to MacMahon', 'Confirm Export', $selected_form_id);
|
||||
action_button('go_form_update_egd_data', 'Update EGD Data', 'Update rank and rating from EGD for all entries with EGD numbers?', $selected_form_id);
|
||||
|
||||
echo '</div>';
|
||||
|
||||
Reference in New Issue
Block a user