5

I'm running Drupal 7.2 web site embedding a multiplayer card game and am looking for a module, which would help me to run a tournament between users.

It should at least show a list of participants and a tree of games with 3 players and 1 referee.

I've searched around already and suspect there is no such module waiting for me (surprise suprise), so my question is more about how would you try to program such module yourself or maybe adapt some core module (seemingly there aren't many non-core modules for Drupal 7).

I have a bit experience in programming custom blocks and menus. I've read, but haven't understood the documentation on programming nodes yet.

3
+50

You will need to create a custom module to do this. Not having experience with Drupal development it will be hard.

Since you are doing this in Drupal 7 you should not use nodes for this, but instead create your own entity. It takes a bit of extra effort, but it will help you, as you can design your entity to fit your needs. The entity API will help you do create an entity without having to think about much of the boring CRUD stuff.

You will also need to define a database table, where you entities can be stored, you will need a unique identifier, store the participants and the referee, the outcome and other useful data like when the entity was create, when the game was held etc.

Using the entity API module you can also create views integration for you entity which will allow you to display lists of games, like the 5 most recent and those sort of things, For displaying a tree of games you might need to do some custom coding. I'm guessing you want to display a tournament style list, which won't be easy. If that is the case you'll need to create some relationship between the games and use advanced CSS to create the display you want.

0

Your description is a bit vague really. It sounds like what you're trying to implement is very specific: "a list of participants and a tree of games with 3 players and 1 referee."

It does sounds like it is going to be very custom I'm afraid. One option might be picking up a copy of Pro Drupal 7 Development and learning how to write the module yourself. Another is paying a Drupal shop to write at least the basic framework for the module on your behalf.

I am struggling to think of contrib modules, already written, which would serve your purpose. There might well be some, and you could possibly use those in conjuction with rules to cobble something together, but it's my opinion that you probably wouldn't get quite what you want with this approach.

  • Of course there is no contrib module for that. I'm looking for hints/directions to implement such a module myself or maybe somehow adapt a core module (Taxonomy?). That book I already have. – Alexander Farber Jul 8 '11 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.