Hi, really quick post, sorry, so forgive me if I am being ignorant of what is available in the module currently!
I am developing a module called LeagueSite, and think that this is exactly what I need to work on knockout tournaments - currently the module just does leagues, but I want it to do knockouts too!
In the interest of not duplicating work and keeping the function of modules on Drupal nice and separated, would there be a way of progressing a knockout tournament programatically, so that people could manage the bracket from entering other results? EG, in my module, each match is a node, and by entering the result of that match, the leaguesite module can work out the winner, pass the details to Bracket and the details on the Bracket are updated accordingly..
I look forward to your reply!
Thanks
Alun

Comments

jimbullington’s picture

Thanks for the suggestion Alun.

I will definitely work on this - it will be useful to me as well! I probably should have done this in the first place...

Some API calls I thought of:

bracket_api_create_bracket()
bracket_api_update_bracket()
bracket_api_get_competitors()
bracket_api_get_rounds()
bracket_api_get_matches()
bracket_api_get_results()
bracket_api_update_competitor()
bracket_api_update_round()
bracket_api_update_match()

etc...

MasterChief’s picture

I just saw your 2 posts and it would be great leaguesite that Alun's module uses the module bracket to display tournament results, since this function is essential for me.

Anyway jimbullington, good idea for this module bracket and thank you to both of you for your work and I am very impatient to see more.

PS: I'm French so sorry for my English :)

Alun’s picture

Excellent. I'm developing LeagueSite to add players and scoring details at the moment, so I'm in no particular rush. I'll leave it in your capable hands, either post here or contact me if you want to discuss thoughts on API calls. From what you've posted, I'm happy with the calls you outlined!

MasterChief’s picture

Hi jimbullington,

I'd like to know if you can provide a date for a new version for API, I saw you was helping also on other modules, but API is really necessary for the Alun's module, it would great to have some news.

Thank you again for your work :)

jimbullington’s picture

I'll try to have at least a first cut in a couple of days. Sorry, this is the busiest time of year for me at work - no time for open source :-(

MasterChief’s picture

Thank you for your fast answer,

i hope you have not too much stress at work :)

janis_lv’s picture

offtopic.

Thank you for this module! I'm looking forward for both of these modules! :)
You are my heroes! :D

MasterChief’s picture

Hi jimbullington,

could we have some news about API ?

Thanks

jimbullington’s picture

Should be finishing soon - completing unit testing and documentation.

Sorry for the delay.

jimbullington’s picture

A new release has been created that contains an API for the module. The api functions are defined in bracket-api.inc. Unit tests for the api have been created in tests/bracket-api.test - the tests also give some good examples of the interface in practice. API documentation is also available and contains some technical information about the module.

Please let me know if this is helpful or if there are any suggestions or questions.

MasterChief’s picture

Hi jimbullington,

i think Alun will send a message here to give his impressions about API, i read a little your API documentation and it's seems to be complete enough.

I saw your TO DO list on Tournament Bracket Page, "Node and/or User referenced competitors" will be very usefull.

When you say HTML Output, could we personnalize the design with this ?

Thanks again for your work.

MasterChief

Alun’s picture

Hi yeah I saw the update, haven't had a chance to look yet, will prob take me some time to get around to it, but I'll feedback here when I do.
Thanks Jim for all your work on this!
Alun

jimbullington’s picture

When you say HTML Output, could we personnalize the design with this ?

Yes, the intent is to make it "themeable" - as with other Drupal output.

MasterChief’s picture

Yes, the intent is to make it "themeable" - as with other Drupal output.

It's great!

Do you have a date for the integration of this feature?

Thanks again for your work :)

jimbullington’s picture

Nothing definite - hopefully in the coming weeks - thank you for your patience!

MasterChief’s picture

Hi jimbullington,

Thanks for your answer!

Have a good day :)

Alun’s picture

Status: Active » Fixed

Hi Jim,

I had a brief look at the API, I'll be starting getting some work on the integration done next month,
As a result, to get some ideas on the best way to integrate the module into yours, I have started a forum post here:
http://www.drupal.org/node/919066

I'm gathering information about the best way forward, so any input would be appreciated!

In the meantime, I'll mark this as fixed, since the API works well, and the tests are pretty handy.

Many thanks
Alun

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Alun’s picture

Status: Closed (fixed) » Needs work

Actually, I hope you don't mind me opening this issue up again, as I have had some time to work with the module, and have further thoughts on possible work.
The API allows me to feed information into the Bracket, which is great, but I would like a way to feed off information also - perhaps it would be possible to include some hooks in the module? At the moment, I am using hook_form_alter and hook_node_api to get when a bracket is updated, though it would be easier to use hooks provided by Bracket.

If you like, I could go through and provide a patch for the kind of thing I am looking for, and you can just review it? I'll be able to do that over the week I hope.
Let me know your thoughts.
Regards
Alun

MasterChief’s picture

Hi Jim!

i make a post just to know if you have a date for the next update ?

Thank you

MasterChief’s picture

Hi jimbullington !

I put just a message to have some news about the next update :)

Thanks.

MasterChief’s picture

I seen you are making the HTML output part, it's great!

Thank you again for your work!

When it will be available to download, i will test it :)

jimbullington’s picture

I should have all the templates ready in the next week or so...

MasterChief’s picture

Great news!

I saw you added 4 Single Elimination.

Is it possible to have 32 and 64 double elimination?

128 single and double elimination will be usefull too!

Thank you in advance :)

jimbullington’s picture

Please open a new issue for this.

MasterChief’s picture

Very fast answer, thanks :)

I opened a new issue, you are right, this thread isn't the right.

jimbullington’s picture

Status: Needs work » Closed (fixed)

HTML output is in the new beta release.

I am closing this issue. Please leave any beta feedback under a new issue.