This forum topic is a spin off from the LeagueSite issue (http://drupal.org/node/665648)
Hello, for those who are interested, as a late Christmas present, here is the League Module code I have been working on.
I am in the process of getting a CVS account and access to the LeagueSite module. Until this time, I would like to post up my code here and get some feedback on what I have done so far, and some sort of roadmap on what can be done in the future for the module.
The code is on its way, I wll post it up by tonight. I am running the system using PHP 5.2, MySQL and Drupal 6.15
As this is my first module, if you are a Drupal developer, I would like some feedback on how well the module is written. Otherwise, some ideas on how to lay things out and what could be done with the project would be great.
So far, I have completed the main 'core' of the module, which manages seasons, leagues and teams. A season must be created to hold leagues, and teams must be created to exist within leagues. The admin section allows a user to directly alter the 'played, won, drawn, lost' table, which is then rendered for display on a page. The points scoring system is also manageable to allow people to create different points systems (e.g. 3 for a win, 1 for a draw, 0 for a loss)
The next module I will create for this will be the matches module, which will allow a user to display individual games in a league as matches, and record individual results. This also has the added bonus of giving user permissions for users to alter their own teams, so a more easier form of management is achievable.
I will post the code up here when I have added sufficient help and information to the pages in a few hours.
Comments
As promised
Download the module files here
http://www.a-king.com/league.zip
Thanks
Al
Hi Thanks for your module, i
Hi
Thanks for your module, i download and i installed to my website and it work fine, the only available league is Rugby and i am using a Soccer League, is there a chance to get this to work with soccer?
Thanks for your response
Thanks for your response Toma, I did intend to add some others aside from Rugby, but you can add your own anyway - If you go to admin/content/leagues/scores you can add a scoring type for soccer - all you need to add is the points given for a win, a draw and a loss. You can then edit your leagues to follow this scoring method.
Hope that helps.
I realised that I haven't quite finished the league view yet - it will only display a current season, so I will add in support to view older seasons soon.
Thanks
Al
Thanks for your reply, i am
Thanks for your reply, i am working to create a soccer website and to have something to manage a league like soccer world cup, african cup, some feature i need to add is a prediction module, a drupal module for drupal 5 (http://drupal.org/node/65199) and http://drupal.org/project/tipping
I am planing to use cck and views to acheive the results and seasons until i find your module.
Is your module can work with views, because i try and i add some league etc but i can't display any result!!!
Good luck
Hi Toma, So far, the leagues
Hi Toma,
So far, the leagues only display on their own page (www.yoursite.com?q=leagues)
I have a lot of work to do with regards to adding matches to the module, which will give permissions for users to enter results.
At the moment, you can add teams, leagues and seasons and manage their won/drawn/lost standings directly, but not individual games, which is something I will add.
A tipping module is something I had not thought of, I am currently more focused towards getting statistics of teams and results available once the matches had been sorted, as well as integrating result into views. I guess game prediction is something that could be added though.
As far as I know, converting the code for use in Drupal 5 is something I had really not considered doing. I can see this module taking up to the summer to complete, in which time Drupal 7 will be released / very near completion. I would be more focused on moving the code to D7 rather than back to D5. Given the simplicity of the code thus far, I guess it could be done, but I wouldn't want to have people think I would be actively supporting the module under D5. I hope thats OK.
In the meantime, the module below is a pickem for american football, but it might be worth considering for adaption to what you need.
http://drupal.org/project/pickem
Thanks for your feedback, it is all very useful for me.
Hi
I am interested in what you create.
I am using the exiting sports manager modules for my site, www.midek.org.
The mods are a little buggy, but pretty good. But I would love the ability to record game stats for each game, and then have the program take those stats and tally them, for both individuals and teams.
I am toying with the idea of trying to edit the "game view" to input goals/assists/penalties
I think I have learned enough about Drupal to do such a thing, though it would take mucho time.
As for using Drupal to tally the stats, that's something about which I have no idea.
Hi Midek. I had a go of the
Hi Midek.
I had a go of the Sports Club Manager module, hoping it would solve what I wanted to do with my website. To be honest I found it too buggy for what I want, and far too dependent on development versions of modules. I did email rötzi about helping out with the module, but he didn't email me back, so I focused my attention on this seemingly abandoned module.
My aim is to get this module set up with minimum dependencies, but in the long run to be just as functional as the Sports Club Manager module.
Stats is something I want to add to the module, but I can't see it happening quickly. On the other hand, the score feature is something I would like to add to the module. Its something I'm going to look at fairly soon, once I have got the leagues and matches modules working well.
[edit] rötzi did email me back eventually, but its too late now!
I have updated the match
I have updated the match module to create a new content type - matches.
Still lots of work going on in it, but it does provide a way forward to display individual games in a calendar.
Running a League
Hey Alun,
I am currently running a flag-football league at www.turfburnsports.com, using drupal for my site. i have stats and such configured as well as I can for now, but am definitely interested in your module, and would be happy to help out in any way I can. I would imagine that because this module is so specific, youd really want to limit its dependencies on stuff that is constantly changing, simply because you may not wanna maintain it forever?
-Tony
Hi Tony, Thanks for your
Hi Tony,
Thanks for your interest. I'm in the process of getting a CVS account and taking over the leaguesite project at the moment, but I will hopefully all be up and running by the end of January. I am indeed looking to minimise dependencies - the core of the module should be able to work with very little to depend on (perhaps Date API) and I want to build additional modules around the core which will use modules such as Views to improve the operation of the project.
I am interested in having some Stats on the project. I think what I would like to do intially would be to get the core up and running, get views Calendar working to allow the display of matches, and some other basic things like that, then I think where to go from there depends on what features people want. A lot of this might take place in the summer - I am a teacher, and so have a lot of spare time in the summer holidays!
Let me know if you'd like any input...
Stuff that I think is important over time:
Right now, I use Taxonomy, CCK, Views for stats display, with a views hack to allow for aggregation of a particular field (so i can list season total stats on a single line). I use the webform module for sign-up, and there are no accounts created on my site, just various cck fields with team/player info populated manually as text (or with the use of the node import module, for bulk stat imports.
I know I am kinda all over the place on this post, but I'd be happy to show you what I have (I know I am not doing it the best way, but it is getting the job done for now), and what I have doesn't account for all of the wishlist above. I just figured I would start off by mentioning what would be good to have after everything is said and done, and would be available to help out in whatever small way I can, if you need it.
-Tony
Thats great - I'm looking for
Thats great - I'm looking for input like this. I'd love to have a look at your website and get an idea of how you have things laid out.
Currently, teams are set up as nodes in my module, so adding images onto this would be easy. I want to look at adding sections to the page, like upcoming matches for the team and such, so having the teams as a node is a good place to start. I must say I haven't seen organic groups (a lot of drupal modules pass me by, I don't browse much!) So I will check it out and see what it does.
Now this is something which I can do, given the structure of my database tables, but might take some time to implement. Exactly what stats would you be thinking of? percentages / totals? there are so many possible stats, it would be difficult to think about how exactly to implement this. I definitely do want to do it though.
This is already built in, albeit on a minor scale. I know a large number of people will be using this for football (or soccer) but I want to use it for rugby (being Welsh!!). Currently you can assign a scoring method to a league, such as 3 points for a win, 1 for a draw, for a loss, which means you can adapt the leagues for different sports. For rugby to work, I also need to look at bonus point scoring systems, which I will add in. What other features would you be thinking of to adapt for other sports? Perhaps different vocabularies for each sport type - I have thought of something like this.
This is already done. My initial thought was to use taxonomies to set up leagues and seasons, but then because I wanted multiple leagues that could assign to multiple seasons, and teams that could change between leagues depending on the season, I decided to create my own structure to hold it. Multiple leagues allows you to create various different sports types to run through the season. It is also possible to create multiple overlapping seasons for different sports types) using my module.
An interesting point you have here. I'm not sure how exactly this would work - I have a forum on my website I am developing it for, and members of the website are welcome to discuss games there. I will have a look further into the modules you suggest, see what I can find.
I'm looking at integrating matches into Views Calendar to deal with this nicely. I also would like to display upcoming games on the team page.
I think this would be a cool feature, and is built into the initial code of LeagueSite (which I did not code). I think, however it should be looked at down the line. I would be a fairly easy bolt on though. The difficult bit would be thinking about players switching teams after a season - would this result in the player being completely removed from the team, or would there be a history page with old team members? That could get messy!
Hope this helps with your thoughts. I'm waiting a few more days and then I can get CVS access to LeagueSite. I'm also launching two websites this month which is distracting me! Once I have CVS and the websites are up, I'll be spurred on to get more work done!
Thanks for the response...
As requested, here is a link to what I do (This is american football):
http://turfburnsports.com/2010/flag/stats/offense
Guys, thanks for the interest
Guys, thanks for the interest in the module. Over such a small amount of time, I have had plenty of interest and feedback on the module and how it should be set up.
This is my first Drupal module contribution, so please accept that I will be a little slow getting things off the ground, but I am learning loads while I do it!
I have just put out an alpha release for leaguesite. It is very basic and may contain bugs, but if any people are available to test it and feedback to me, that would be great. Thanks in advance for your help.
Please visit the main project page to find the download.
If anyone has any feature requests they would like to add, please do so through the means of the issue queue on the main project page.
Thanks
Alun
feedback for the alpha release
menu problem in the league setup:
when i want to add or select a season or a league, then i can't see the menu at the top.
missing values in the drop-down menu for the league and season, when i create a match.
should i create a sports team for each season or one for all?
in my opinion it should exist one sports team for each season (and each age, each gender, each club and so on - but it doesn't matter at the moment), cause of the different players/trainer (for example). but then you get a problem with the drop-down menu "Home Team" or "Away Team" cause some of them has the same name!
i think the leage manager phpmysport is a good example of a (database) structure:
season --> league --> scoring
club --> team (age, gender, season) --> players/trainer
match (choose league/age/gender/season and get pre-selected home/away teams)
best regards!
Thanks sechsgott I will have
Thanks sechsgott
I will have to have a look at the menu issue. That should be OK to sort.
With regards to the missing dropdown values, had you added the league to the season? Creating a league does not automatically add it into a season. I am taking into consideration that a user may want to manage multiple seasons in the module, eg, two seasons for two different sports. If you create a league, you can add it to a season, and then it will appear in the dropdown box on the 'create match' screen.
The sports teams only need to be created once, and then can be added to each season. When creating leagues on my site, I found that entering the information for over 100 teams was very boring work. I am trying to reduce that work by being able to reuse the entered teams. This obviously causes a problem with regards to history of clubs, as keeping a team node up to date results in the loss of the history. When I am able to turn my focus on to managing players within teams, I may look at building history into the nodes, but I see it as a slight drift from the purpose of the module, which is primarily to manage leagues and results, not so much the information on the teams themselves.
I was aware of the dropdown box issue on the create match, but I forgot to fix it before I released alpha due to my rushing! I have listed it as a critical bug and will look at fixing it soon.
Thank you for the example database structure, I'll be sure to check it out :-)
Hope this helps.
Alun
Hi Alun I've been waiting for
Hi Alun I've been waiting for this module and and I have been testing it in two local sites but the standings don't work. I create a season, a league, varius teams, assigned the league to the season check the teams but when i create matches and assigned the match result the table is always in all it's values at zero. And would be possible put the table in one block.
I'm still learning english then i hope you understand me.
Hi Jean, your English is very
Hi Jean, your English is very good, thanks for your feedback.
I will look into this and file an issue in the project queue. You can keep up to date with things there. I believe I know the cause of the problem - I will get a patch out soon.
I will also file a support request in the module for the block view - it is something that I should get working soon.
Thanks
Alun
Problem Solved (I hope!)
I found the problem, I had not added in the code in hook_insert() and hook_update(). Incredibly stupid of me leaving that out - I even had put a TODO in the code to remind me to add the code!
Find the related issue and patch here (http://drupal.org/node/696030).
This is my first patch - I hope it works!
Thanks
Alun
I tested the patch and now
I tested the patch and now update the Standings except the points(column "B") that is still in zero now the problem is that when i edit the matches the Standings keeps incremented like a new match and some times does the oposite some matches are missing for example there are two matches for a team and in the table only appears one. When i edited a match i think the values most change but not increase.
Thanks for the feedback,
Thanks for the feedback, turns out I rushed the last patch, I've been working on the fix for this today. I will get back to you soon with a solid fix.
Also: The column 'B' in the administer standings table allows you to add bonus points. This is not the points row. To view the standings, you should go to www.example.com?q=standings (where example.com is your website)
I will work on this fix tomorrow.
Sorry for the poor patching! Glad that it worked though, seems like I'm doing something right at least!
Al
I think you do a great work.
I think you do a great work. I couldn't find the standing but finaly i did it this are in www.example.com?=leaguesite. Points work good. Thanx i look up for the new patch.
Thank you Jean. I have
Thank you Jean.
I have created a new patch and commited the changes - I'm pretty sure this works now.
I created an issue in the project queue for this - lets continue the conversation there as we have strayed a little off topic in this forum!
Issue is here: http://drupal.org/node/696030
thanks for picking up the module
Alun,
Thanks for all the efforts to get this module back up and running. I downloaded the dev version and installed it, works pretty easily out of the box.
I was wondering what it would take to:
Build in a secondary list to assign a team to a division e.g. minors, majors, Babe ruth
Entry form where an admin can enter the scores for all games for the week
Enter and track games behind, shutouts, Calculate winning percentage and ties
if the division was a cck type it would allow a view to filter by the division
Thats what I can think of right now but Im sure I'll have a bit more once I keep playing with it.
Thanks eric, I will look at
Thanks eric,
I will look at the points you have raised. I've already got the match entry form done. You should find it in your navigation block as Match Admin. When a match has passed its fixture date, it will show up on the match admin form and you can enter the score fairly easily. I want to build a filter onto this form, so if people have a large amount of matches, they can filter the form a bit before entering results.
Let me know if that is what you are looking for.
More feedback is welcome. If you have any problems with what is currently there, bring it up in the issue queue.
Cheers!
Al
I am very interested in this
I am very interested in this module, been waiting for this module for a long time, haven't tried it yet and for sure i may try this over the weekend, just want to double check if this module can be useful for basketball league? Thanks alun for giving some time on this module we appreciate it very much!
Thanks for your post
Thanks for your post emave,
The module can currently be used with any sport that has vs matches and/or uses a points-based league table to record the positions of teams/players over time.
I think basketball league falls into that category! Being from Wales, we don't play much basketball so forgive me for being a little ignorant of whether it will be suitable. It should be.
I will be updating the module as I go along to be more suitable for more sports. Please have a go and let me know what you think. Any feature requests or issues can be brought up in the project issue queue.
Thanks!
Alun
subscribing to the
subscribing to the thread.
Also, Alun - please could you list the main differences between this module and the http://drupal.org/project/sport
Want to know before I go too deep into it... Thanks
Anyone interested in this
Anyone interested in this question will find my response here
http://drupal.org/node/695058#comment-2563696
Thanks!
Al
Very interested in this module...
I'm very interested in this module as I'm in the process of developing a website to report on high school soccer throughout a state (i.e., multiple leagues and many teams). I suspect you've seen the WordPress LeagueManager plugin, if not take a look. It's a nice plugin with extensible stats (I've not tried that aspect of the plugin yet, but haven't seen any reports that it doesn't work).
However, it isn't quite what I want for two reasons:
1) I'd rather use Drupal for it's much greater flexibility
2) I'd like to restrict score entry in some way (don't know if this is per team or per league at this point) and possibly require score approval to prevent "spamming" of the scores (I'm planning on giving accounts to a handful of people to enter scores and will try to pick trustworthy folks, but you never know and I want to prevent anyone from submitting inaccurate scores)
Take a look at this website that implements LeagueManager (note that this is NOT my website!). One of the nice aspects of LeagueManager is that it can generate what is essentially a "block" (widget in WordPress terminology) that displays the latest results for a league and/or the next upcoming match. Also note that there is a link from the score to the report of the game. Very nice...
If you can get this level of functionality in Drupal that would be a killer combo!
This should be the ticket.. in time.
Hi gopher_indy
Thanks for your interest. To be honest when I did a search for a module like this, I was pretty surprised at the lack of League Management modules, so I'm pretty chuffed I can be helping out with such a sorely needed Drupal module.
As you may be aware, I have built in score entry restriction, so there are a few levels of editing capabilities. I have the same consideration that I don't want to have to enter all the results myself, but I want to limit who edits the results. you raise an interesting point about approval.. perhaps this is a feature to be added in the future..
Block content that displays upcoming games and recent results is very much something I intend to provide. In fact it isn't difficult at all to add, I just haven't been focusing on that yet. Match reports (for now) can be entered in the body of a match, but I intend to build on this in the future, adding details such as times for each score, and players who scored etc.. if I have time.
The next addition to the module will be views integration, which will also give you the ability to display upcoming games with a bit of configuration. I've posted in the forum about it as I am having some issues working out how to do it, but once it is set up, a lot of options you have outlined will be possible. I will be sure to post here when I add it, and you can give it a go and let me know if I have achieved the "killer combo" ;-)
Thanks
Alun
I have just committed some
I have just committed some changes for views integration. Things should be a little more extensible now.
I will continue to work on Views integration, its not quite finished, but the latest dev snapshot is good for testing.
Just to keep everyone
Just to keep everyone informed, I committed the latest version of the project tonight, which adds Views integration, jQuery on Create Match pages, and fixes known bugs that are in alpha1. I am going to have a play around with Views next week and get some views together that I can include with the module. Pending that, you can consider the latest dev snapshot as the alpha2 release.
If anyone has a play before me and wants to suggest a view for inclusion, please message me or open a feature request on the project queue. I'll be happy to include it if it does the job!
Thanks
Alun
Hi, i'm from Russia, so, my
Hi, i'm from Russia, so, my english is not very good) I installed your module, but...I have questions.
1. How can i see standings? I look for it in Content, in all menus, bot didn't find anything(
2. What for Match Admin? I have this message "You have no outstanding matches!" when click...
3. Do you plan to add statistics of players from the entire teams? Such as goals, falls etc.
p.s. I create Season, League, Teams, add League to entire Season, create some matchs, but Standisg is hidden from me
1. Hi, the standings can be
1. Hi, the standings can be found at www.example.com/leaguesite
I will add a more obvious link on installation for the next release.
2. The match admin will display matches which have a missing result once the date of the match has passed. So if you create a match in the past, or the date of a match passes, it will show up on the match admin screen.
The idea is you can enter multiple match results on one screen.
3. I do plan to add stats and such, but this is not the current priority. I am still perfecting the basics of the module for the moment, so the other features will come in time.
Let me know if you get on Ok with your first question!
Hm, something wrong...i don't
Ok, thanks, it works))) i'am veeeery glad) but, i go http://localhost/leaguesite/1 and see the results)))
Thank you very very much!!!
p.s. what about goal difference?
forexample:
F A Z(or something)
12 3 9
I'm not sure what you mean by
I'm not sure what you mean by seeing the results? I hope it is working OK.
Goal difference should be something I will add into views when I release it in the next week.
For the benefit of myself and everyone using the module,
I have added a roadmap of where I see this module going. Have a read and input on features there:
http://drupal.org/node/712474
yes, it's all works! and i'l
yes, it's all works! and i'l read roadmap of course!!! but the last question...i have to monitoring about 25 leagues, so the number of teams about 500, so when adding match i must choose team, can you include feature of choose league/team, step by step...for example, first choose league, and than choose teams from a specific league, but not from all teams?
Fixed in the latest Dev release
Hopefully, that team selection problem should be solved if you download the latest .dev release.
I have implemented it using a simple bit of jQuery. I've not tested it with 500 teams though!!
Yes, thank you, one more
Yes, thank you, two more questions, how to edit "v" in "first team v second team" in name of match i need to put here my own text... and how to make "first_team 5 - 3 second_team" in name of match result?
Thats something I need to
Thats something I need to add.
I will put it into the project issue queue as a feature request. It should be able to make alpha2
Hello, Allun, i have one more
Hello, Allun, i have one more question, how do i separate one playing week, from another? in my views i have all the results, but i need to show results from only one week...
There is nothing in my module
There is nothing in my module that allows you to do that, have you had a look at views calendar? That should help you out.
I'll add some pre-built views into the module soon. I'm hoping to sort it all out at the end of this week.
Hello, I've added views
Hello, I've added views integration, and there is a points field! Have a play and let me know if its working OK for everyone in the latest dev release.
Hi, Alun, thank you for such
Hi, Alun, thank you for such a good addding!!! But, it would be wonderful if it is not need to uninstall all past seasons and leagues, when installing new version((( i need to add 500 teams again...
and one more, i don't see
and one more, i don't see field Points in the Sort Criteria( i want sort items by Points and can't do that...And not Points difference, but Goals difference)
Hi, as far as I know, you
Hi, as far as I know, you don't have to? Did the seasons teams and leagues all get deleted when you updated the module? Please let me know if so, because that should not happen.
Sort criteria. Hmm, yeah its in field, but not sort. If you sort by games won, then drawn, then goals for, it should be in the right order, but yeah I will have to add a sort handler.
Points difference is goals difference - I just named it points difference.
About deleting, sorry i was
About deleting, sorry i was wrong...it was my fault, you are right, but about sorting i try to sort by games won, then drawn, then goals, but it is sorted only by games won and ignoring other two items...
"Points difference is goals difference - I just named it points difference." i understand that) i only pointing you on that...
Phew!
Cool, you had me worried there with the installation :-)
I named it points difference because not all games have goals in them - I am doing a rugby union league table, which has scoring in tries, conversions and penalties. I thought it more appropriate to collectively call it points difference. Of course, you can override the name in Views, so that should be cool either way.
I'll get working on the sort handlers this week I hope. Will keep you updated. I thought Views would deal with that problem, but it seems, based on what you have posted that the sorting doesn't work.
Ok, i understud...do you have
Ok, i understud...do you have icq? i can help you with testing work and it would be more quickly if we talk about it in icq
No, I don't have it, I'm
No, I don't have it, I'm currently in work anyway, so I can't use messaging programs.
I do occasionally hang around on the IRC channels, so we shall have to arrange a meet up if you like.
Ok, if you need my help in
Ok, if you need my help in testing you can ask))
I have one question about Goals difference, can you make it like:
Goals difference
45:12
but not
Goals difference
33
p.s. 33=(45-12)
Hi real_stranger, I was going
Hi real_stranger, I was going to add this, but I realised, after Jean pointed out, that you can do it easily in views. If you add the field, you can choose 'Rewrite the output of this field' which means you can set the way points difference is displayed.
To add the two fields, you just need to add 'points scored' and 'points conceded' and hide the output, so you can add them in the 'Rewrite the output of this field' option.
Let me know if this works for you. It would be a better way of doing things than me adding an option which works in pretty much the same way.
Hi, Sorry for taking so long
Hi,
Sorry for taking so long on this, I just created a league table with Views and the sorting works fine without a points field.. I just sort first by wins, then by draws, then by points scored (all descending). It sorts it nicely.
Are you sure you have the correct setup for it?
Anyway, I spoke to some people IRC and because the points field isn't in the database, it means I can't create a sort handler, so you will have to sort using the above method.
I am going to add a points difference field as that is obviously needed to sort teams who have an equal number of draws. I will get on that now.I have just committed some code that adds points difference as a sortable field.Let me know if you have any problems with the sorting.
As for the goals difference field thing, that can be done, I'll see if I can add an option to choose the display as either 42:12 or 30 (for example) as I like it as just one number.
Thanks
Alun
Hi Alun, I think that the
Hi Alun, I think that the goal difference should be 33 and not 45:12 this last way anyone can do it using views, but if you want do add it is ok I only think it's double work. Both ways 33 and 45:12 it's very thoughtful of you. Thanks.
Hi, Alun! About points
Hi, Alun!
About points difference...sorry me, you were right! It's All work wonderfull. No need to make 45:12))
But, about sorting...i have no idea what is wrong with my view...it's sorting wrong...
Is there a way of providing a
Is there a way of providing a screenshot of your views setup?
Otherwise what fields do you have in your sort, and in what order.
A good way of showing how the view is being constructed is by copying the SQL output from the preview section on your views UI.
If you post that here, then I can see where you need to correct your setup.
Here is SQL output SELECT
Here is SQL output
SELECT node.nid AS nid,
node.title AS node_title,
node.language AS node_language,
leaguesite_standings.won AS leaguesite_standings_won,
leaguesite_standings.lost AS leaguesite_standings_lost,
leaguesite_standings.drawn AS leaguesite_standings_drawn,
leaguesite_standings.goals_for AS leaguesite_standings_goals_for,
leaguesite_standings.goals_against AS leaguesite_standings_goals_against,
leaguesite_standings.bonus AS leaguesite_standings_bonus,
leaguesite_scores.win AS leaguesite_scores_win,
leaguesite_scores.draw AS leaguesite_scores_draw,
leaguesite_scores.loss AS leaguesite_scores_loss
FROM node node
LEFT JOIN leaguesite_standings leaguesite_standings ON node.nid = leaguesite_standings.team_id
LEFT JOIN leaguesite_relation leaguesite_relation ON leaguesite_standings.relation_id = leaguesite_relation.relation_id
LEFT JOIN leaguesite_season leaguesite_season ON leaguesite_relation.sid = leaguesite_season.sid
LEFT JOIN leaguesite_league leaguesite_league ON leaguesite_relation.lid = leaguesite_league.lid
LEFT JOIN leaguesite_scores leaguesite_scores ON leaguesite_league.score_id = leaguesite_scores.score_id
WHERE (leaguesite_season.name in ('Россия 2009')) AND (leaguesite_league.name in ('Премьер лига'))
ORDER BY leaguesite_standings_won DESC, leaguesite_standings_drawn DESC, leaguesite_standings_goals_for DESC
Here is screenshot
http://i.imagehost.org/0314/1_118.jpg
Thanks for that. I can see
Thanks for that. I can see the problem is with the module, as obviously the sorting is set up as best as possible, but it isn't going to work unless I can add a points to sort by field. I'm sure there must be a way to work it out, I'll have a think about it and see if I can work it out this week.
I will get back to you.
Cheers!
Al
Ok, Alun, thank you for such
Ok, Alun, thank you for such attention!!
hi, Alun, i have one new
hi, Alun, i have one new question) maybe you can help me...
I have views in a block with match results, i have center horizontal align, but, i need align by "-" how can i do this?
http://img715.imageshack.us/img715/2299/71672594.jpg
If you have the views in a
If you have the views in a block, the best way would be to display it as a table.
Have one column for home teams
one column for away teams
middle column just separating the values using -.
That sound OK? let me know how you get on.
That's not ok, because it's a
That's not ok, because it's a titles of matches, but not teams...
I guess the best way to do it
I guess the best way to do it would be to display the teams then, using relationships in the view, this is possible. You can then override the link to the team and link to the match node.
Ok, but there no field home
Ok, but there no field home team and away team in views fields
You need to add a
You need to add a relationship for home team and a relationship for away team, then you will be able to select node title from the fields, and select relationship (home_team) to get the home team name.
Ok. it's all done, thank you
Ok. it's all done, thank you very much! What about update of youк module?
Glad it works :-) I am going
Glad it works :-) I am going to upload a patch on the views points order by field issue later.
If you subscribe to this issue (http://drupal.org/node/695286#comment-2664966)
I will upload a patch for you to test. It works on my tables, but I need to check if it works OK on drupal databases with a table name prefix.
Sounds wonderful!! Already
Sounds wonderful!! Already subscribed)
about views patch
it's all works right, thank you very much!
About Players...how much time do you need to add this feature? I think it's more necessary right now!
Glad to know it is working!
Glad to know it is working! Thats a load off my mind.
I'm currently working a little slower on this module than I was, players are something that I will add, but I can't see it happening too soon.
I'm working on adding score breakdowns to matches at the moment, then I want to add bonus point scoring. Its a bit selfish, but I need this for myself so I want to get it working. I might also look at getting tournament games set up.
Players will be added after I've got that out, you will be looking at an alpha4 release. If anyone fancies starting the work for the module, and can submit some code to me, I can add you as a maintainer and allow you to work on it in your own time if you like.
Hi Alum I just create a new
Hi Alum I just create a new season and new league(i had one before and work perfectly) and of course new matches for this league but not update correctly fortunately the first league seems to work ok(I've dont update the pending matches yet). Did you try your module with various seasons or leagues?
That sounds wierd. No, I
That sounds wierd. No, I haven't tried various seasons and leagues, but the way its coded should mean that there isn't a problem.
Hmm, I'll have to give it some testing and figure it out if I have any problems.
I'm sure that it would have been mentioned if there was a problem updating when using multiple leagues, as I have tested it, and I think others have too. Maybe it is the multiple season thing.
Will get back to you.
Thanks!
Hi, Alun i got new problem in
Hi, Alun i got new problem in views, i try to sort by Error: handler match time, but got the message: Error: handler for leaguesite_match > match_time doesn't exist!
Ah, thanks for that. I'll
Ah, thanks for that. I'll have a look and fix it in the next update. Will also post a patch when I get the chance.
I'm currently in the middle of moving house, I have pretty much added match breakdowns that I wanted to complete for alpha3, but my lack of internet in the new place is slowing up releases.
Will post back soon.
Alun
Ok, waiting for you to
Ok, waiting for you to look...
Sorted the problem. You need
Sorted the problem.
You need to change the code around line 73 of leaguesite.views.inc from
to
so your final code should look a bit like this
I think.. its working on mine at the moment, but I haven't got a proper connection to the internet on my development computer to create a patch or properly upload changes.. sorry!
Ok, it works, thank you)
Ok, it works, thank you) Waiting for Alpha3, i need team photos very much..
Subscribing!!!
Subscribing!!!
---~~~***~~~---
aac
Hi, Alun i got one new
Hi, Alun i got one new problem, i use Match Admin to apply results, but, if match time passed, then match disappears from Match Admin, so i need to go to Node and change the result there...can you help me?
Hi man, sorry I have been
Hi man, sorry I have been rather quiet of late on the forums, I've had a busy time recently since moving house.
The match admin screen is work in progress, In the near future, I'm going to add a filter option to the screen to help people with over 20 or so matches effectively manage them.
For the moment, you need to have a play around with the code to change the way the match admin screen displays stuff. On line 174 of leaguesite_match.admin.inc, you will see the SQL statement which specifies matches that are forthcoming. Replace that line with one of the following options..
1) To show all matches, including past ones, use the following line
2) To show matches where the time has passed, use the following line
If you are familiar with SQL, you can do whatever you want here.
Hope that helps. I will keep working away on LeagueSite, thanks for the patience!
Alun
Thank you very much, Alun! I
Thank you very much, Alun! I have new question! Can you add views argument "Team id" and what with arguments "league and season id", "season name"...about Sport team, i try to show All Matches in season for only 1 team...but i don't understand how to do it...and one more where can i find Team id?
Views Arguments
Hey,
A team is a node, so you should be able to just have node id, rather than team id - its the same thing.. team id == node id.
I will have to have a look at the way team & season id work. Its worth noting that, 'league and season id' is not the same as the separate 'league id' and 'season id'. Confusing I know!
Hopefully using node id as the argument, that should let you filter by teams to show all matches. I'll have a look at season and league id when I can and see if I can make it easier to implement.
Apologies for my lack of updates on the board, its a busy time for me, and the development of the module is not at the forefront of my priorities. It is happening though, don't worry!
Alun
Just to let everyone know, I
Just to let everyone know, I have added some code to the latest development snapshot, which I think is pretty much good enough for marking as alpha3. If you are using the development code, please update to the latest version and let me know this week if there are any problems. If all is good, I will mark the release and can move onto the next set of features.
I'm raising some points on
I'm raising some points on the next few additions on the issue queues in LeagueSite, please go there and chip in with input if you would like to help out with some opinions!
#711976: Player and Roster Support
#776920: Add scoring details for games
#776932: Integration with Bracket
Choose a topic and help out! Input is much appreciated. Please keep input to the relevant issues, if you have separate requests for the project, create a new issue in the queue!
Many thanks!
Alun
can i show all league tables
can i show all league tables on homepage. must i add view & create a block?
Hi homomensura, yes you would
Hi homomensura, yes you would have to do this using a View. if you want multiple league tables, try using Panels to create multiple Views in one page.
In the next release, I'll try to get some pre-made views included to save people the hassle.
Cheers!
Alun
Some nice stuff to display on the "standings" page
Hey Alun,
Keep up the good work. I would like to know if you could create a canned view that displayed:
Wins
Losses
Winning Percentage
Streak (Number of Wins or Losses in a row)
Weeks Won (Number of games where that team scored the highest number of points)
Games Back (# of games behind the team with the best record)
Points for (total points scored during the season)
Points against (total points scored against a particular team thus far in the season)
Similar to this:
http://www.turfburnsports.com/2010/flag/stats/season2/standings
Thanks seabrawk, the view
Thanks seabrawk, the view will be possible in the future, when I add statistics, which will track progress such as winning streaks and such. Weeks won and Games back are new concepts for me, this might be difficult depending on the type of sport run in the module.
I'm happy to say wins, losses, Points for and points against are already available in the module, you can use Views to set up a view with them. Win percentage isn't instantly available, but I'm sure Views calc could sort that out for you :-)
Thanks
Alun
Unfortunately for me, I
Unfortunately for me, I require points back, winning percentage and games back, to all appear inline in a table, so I don't *think* views calc will work. I am not sure how to get views to calculate "take the highest number in category "x" and subtract all other numbers in category "x" from this highest number. This is how my brain calculates games/points back, i just have no clue how to automate it in drupal.
Wow!
I just found this module and love it. I'm actually building a Video Game web site and was looking for some type of league software to mimic http://gamebattles.com/ and this seems to come pretty close. Anyone used it for a gaming site yet?
Very good Implementation
Hello Alun,
I've been shopping around for a good implementation of a league manager module and this is clearly the best one for Drupal thus far. I have implemented the module for a site that I am working on for an American Football League in Secondlife (http://www.secondlifefootballleague.com).
I haven't fully setup the entire league but from what I can tell it does MUCH of what I was looking for right out of the box. One of the things that I know the players are really interested in having is player stats and so forth. For example all of the various categories of player stats for the NFL such as rushing yards, passing yards, tackles, interceptions, etc...
I wasn't sure how much more work you were planning on putting into the module but I would like to express my interest in an addition to the leaguesite_player module that would allow you to add various categories of player stats, much the same way you would add scoring types for a league. I hope this is something that you release although I understand about being busy and having other obligations. I would offer my help to add this functionality in but I would first need to familiarize myself with module development. I haven't developed Drupal modules although I have experience developing other software so learning the process may come pretty quickly for me.
Let me know what plans you have and what help I can provide. Thanks for the great module!