Menu

How can I add a 4th place Scenerio?

Help
sledge4
2010-03-26
2013-03-27
  • sledge4

    sledge4 - 2010-03-26

    My pool pays outs the top-4 spots, is there an easy way to add 4th place to the PoW/Paths page?

    Thanks!

     
  • John Holder

    John Holder - 2010-03-26

    in admin/calculate_paths_to_victory.php:
    after line 75, which reads:

    updateProbabilities( $roundMap, $seedMap, $childGraph, $scoring, $master_data, 3, $db );
    

    add this line:

    updateProbabilities( $roundMap, $seedMap, $childGraph, $scoring, $master_data, 4, $db );
    

    THIS WILL ADD a lot more with to the calculate paths code, and may require you to run the calculate_paths_to_victory from a command line in the admin dir.

    In endgamesummary, change the code that displays the end game scenarios from one wide table to a series of tables, like this:

                    <table border="0">
                        <tr valign="top">
                            <td><?php createSummaryTable($db, 1, "First Place", $viewAll, $summary_data['num_scenarios'], $_REQUEST['sort']); ?></td>
                        </tr></table><br/>
                    <table border="0">
                        <tr valign="top">
                            <td><?php createSummaryTable($db, 2, "Second Place", $viewAll, $summary_data['num_scenarios'], $_REQUEST['sort']); ?></td>
                        </tr></table><br/>
                    <table border="0">
                        <tr valign="top">
                            <td><?php createSummaryTable($db, 3, "Third Place", $viewAll, $summary_data['num_scenarios'], $_REQUEST['sort']); ?></td>
                        </tr></table><br/>
                    <table border="0">
                        <tr valign="top">
                            <td><?php createSummaryTable($db, 4, "Fourth Place", $viewAll, $summary_data['num_scenarios'], $_REQUEST['sort']); ?></td>
                        </tr></table><br/>
                    <table border="0">
                    <tr>
                            <td colspan='3'><?php createSummaryTable($db, $lowestRank, "Last Place", $viewAll, $summary_data['num_scenarios'],$_REQUEST['sort']); ?></td>
                        </tr></table>
                    </table>
    

    I imagine the bbcode editor will mess up some of this.  I could send you the diffs.

     
  • sledge4

    sledge4 - 2010-03-26

    That did it, thanks a bunch!

     
  • Rob J

    Rob J - 2010-03-26

    That was easy enough. Maybe be able tomake it a config option

     
  • sledge4

    sledge4 - 2010-03-26

    Was thinking the same thing.

     
  • John Holder

    John Holder - 2010-03-29

    I've made it a config setting as a variable in database.php
    There is a good reason to take 1.5.3.5 for you, sledge4 - the mods above did not fully fix everything, as the mods above will still mark all but the top3 people (or people who have a chance to win) as eliminated.  1.5.3.5 makes the change to dynamically set that.

     
  • sledge4

    sledge4 - 2010-03-30

    Ok, I will look at the new updates. Thanks!

     

Log in to post a comment.